Drop mean std - #9
Merged
Merged
Conversation
The U-Nets of cochlea-net start with an InstanceNorm, which cancels a global mean and standard deviation. cochlea-net stops writing mean_std.json, so the apply jobs must not require it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first step of the SGN, IHC and synapse pipelines now only creates mask.zarr. Update the pipelines, the README and the comments which name the step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Drop the mean/std step
The cochlea-net pipelines no longer compute a global mean and standard deviation before the prediction. The first step of the SGN, IHC and synapse pipelines now only creates
mask.zarr.Why the step can go
Every production U-Net of cochlea-net (synapse AnisotropicUNet, SGN/IHC UNet3d) starts with
InstanceNorm3d(affine=False). This layer standardizes each input block by the mean and std of the block itself. A global(x - m) / sis one affine map for the whole block, so the layer cancels it. Onlyepsand float rounding remain. The measured relative difference of the predictions is 6e-6 to 2e-5. The later steps read onlypredictions.zarrandmask.zarr. Each run saves one pass over the volume.Changes
apply_SGN,apply_IHCandapply_synapsesno longer requiremean_std.json. They still requiremask.zarr.mean_std_{SGN,IHC,synapses}.templateare renamed tomask_*. Only the job name changes. The pipelines, the README and the template comments use the new names.Compatibility and merge order
mean_std.jsonis missing.mean_std.json, and the prediction applies it.mean_std_*names.Follow-up
The
mask_*jobs keep the resources of the mean/std step, for example 128G and 40 min formask_SGN. Adapt them after thereportseffdata of the first runs.