add feature registration and slice-to-slice correlation#42
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds dataset-wide analysis and visualization tooling to evaluate style-transfer outputs, including feature-based similarity (Dice) and slice-to-slice correlation, plus scripts to generate combined “sanity check” figures and example output artifacts.
Changes:
- Add
dataWideStyletransAnalysis.pyto compute SSIM, feature Dice (including blob-based feature detection), and adjacent-slice correlation metrics and export CSV + summary plots. - Add
makeCombinedSanityFigures.pyto render combined multi-panel sanity figures from the exported CSV metrics and input tar slices (including feature overlays). - Add example result artifacts under
results/dataWideStyletransAnalysis/(CSV summary + SVG figure).
Reviewed changes
Copilot reviewed 3 out of 20 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/preEvaluation/makeCombinedSanityFigures.py | New CLI/script to build combined image + metric trend sanity figures (standard, gradient, and feature modes). |
| src/preEvaluation/dataWideStyletransAnalysis.py | New dataset-wide metric computation pipeline producing SSIM/feature/correlation CSVs and summary plots. |
| results/dataWideStyletransAnalysis/summary_stats.csv | Example summary metric export. |
| results/dataWideStyletransAnalysis/L20_L1/content_preservation.svg | Example generated figure export. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ax_corr.set_xlabel("Adjacent pair index (i vs i+1)") | ||
| ax_corr.set_ylabel("Correlation") | ||
| ax_corr.grid(alpha=0.25) | ||
| ax_corr.legend(loc="bottom right", frameon=False) |
Comment on lines
+694
to
+703
| for i in range(len(valid_slice_ids) - 1): | ||
| corr_o = compute_flat_correlation(o_imgs[i], o_imgs[i + 1]) | ||
| corr_t = compute_flat_correlation(t_imgs[i], t_imgs[i + 1]) | ||
| corr_rows.append( | ||
| { | ||
| "tar_file": tar_name, | ||
| "sample_id": sample_id, | ||
| "pair_idx": i, | ||
| "slice_idx_i": valid_slice_ids[i], | ||
| "slice_idx_ip1": valid_slice_ids[i + 1], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.