Skip to content

Refactor normalization, evaluation, and preview generation for z-scored training#30

Merged
MattsonCam merged 9 commits into
normalization_refactorfrom
review_normalization_refactor
Jul 15, 2026
Merged

Refactor normalization, evaluation, and preview generation for z-scored training#30
MattsonCam merged 9 commits into
normalization_refactorfrom
review_normalization_refactor

Conversation

@MattsonCam

Copy link
Copy Markdown
Member

This pr switches the training pipeline to train-split z-score normalization, removes the output sigmoid so predictions stay aligned with z-scored targets during optimization, computes validation loss and reconstruction metrics in original intensity space, and improves saved example images by denormalizing and applying robust percentile-based display scaling.

@MattsonCam
MattsonCam requested a review from wli51 July 14, 2026 01:26
@MattsonCam MattsonCam changed the title Review normalization refactor Refactor normalization, evaluation, and preview generation for z-scored training Jul 14, 2026

@wli51 wli51 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Great additions to the normalization and export module.

Comment thread callbacks/utils/SaveEpochCrops.py
Comment thread train.py Outdated
Cameron Mattson added 6 commits July 14, 2026 17:57
Experiment ID:3
Run ID:763e5f09e64b455ba6981cfdf5fa60d7
Run Name:bittersweet-tern-183

Optimization of a DAPI-to-Gold image-to-image translation model with:
- ConvNeXtUNet Generator
- Single 2D crop input and single 2D crop target
- Cache-backed filtered nucleus crops generated from the configured data directory
- Train-split z-score normalization for inputs and targets
- L1 optimization objective in z-score space with denormalized L2, PSNR, SSIM, and Pearson correlation metric logging
- Resampling of dataset w/o anti-aliasing -> dtype clipping (to stay within the correct range) -> z-score normalization
- Means and stds from the training set were stored for z-scoring of the validation set
- No final activation function after the model output (such as sigmoid)
Experiment ID:3
Run ID:4feeef6283384834b907e9b1af611524
Run Name:aged-dove-229

Optimization of a DAPI-to-Gold image-to-image translation model with:
- ConvNeXtUNet Generator
- Single 2D crop input and single 2D crop target
- Cache-backed filtered nucleus crops generated from the configured data directory
- Train-split z-score normalization for inputs and targets
- L1 optimization objective in z-score space with denormalized L2, PSNR, SSIM, and Pearson correlation metric logging
- Resampling of dataset w/o anti-aliasing -> dtype clipping (to stay within the correct range) -> z-score normalization
- Means and stds from the training set were stored for z-scoring of the validation set
- No final activation function after the model output (such as sigmoid)
@MattsonCam

Copy link
Copy Markdown
Member Author

Thanks for the review @wli51 ! Merging now

@MattsonCam
MattsonCam merged commit c8ddcd4 into normalization_refactor Jul 15, 2026
@MattsonCam
MattsonCam deleted the review_normalization_refactor branch July 15, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants