Repository navigation
feat: make RandomRedistributeSegGPU's bump-width floor configurable - #149
Open
Hendrik-code wants to merge 1 commit into
Open
Hendrik-code wants to merge 1 commit into
Hendrik-code wants to merge 1 commit into
Conversation
The remap adds a signed Gaussian bump per label at that label's mean intensity and rescales the sum to a peak-to-peak of 2 in the [0, 1] min-max units it works in. Each bump's width is floored at a hardcoded 0.01. A bump of width s rescaled that way has a slope of about 1.2/s, so at the floor a thin band of intensities swings by more than the whole input range and voxel noise inside the band comes out as salt-and-pepper. Measured on a ramp with the floor binding: maximum slope 123 / 26 / 13 at floors 0.01 / 0.05 / 0.1. On real spine patches the high-frequency share of the image at least doubled in 24% of applications. `min_redist_std` exposes the floor. Default 0.01 is the historical value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
What
RandomRedistributeSegGPUtakesmin_redist_std(default0.01, the hardcoded value it replaces): the floor on each label's Gaussian bump width, in the[0, 1]min-max units the remap is built in.Why
The remap adds a signed Gaussian bump per label at that label's mean intensity, then rescales the sum to a peak-to-peak of 2. A bump of width s, rescaled that way, has a slope of about 1.2 / s. At s = 0.01 a thin band of intensities swings by more than the whole input range, so voxel noise inside that band comes out as salt-and-pepper.
Measured on an intensity ramp with the floor binding (voxel-random labels,
std_noise_range=(0, 0)), mean of the maximum slope over 20 seeds:On real SpineGAN MR/CT patches, the high-frequency share of the image (std of what a σ=1 blur removes ÷ std) at least doubled in 24% of Redistribute applications, and in 47% when it ran after SynthSeg. It is the most frequent TA in the paper config (
p: 0.4).Behaviour
Default unchanged (tested: bit-identical with and without the key at 0.01). A non-positive floor is refused.
all_augmentations.jsonregenerated.Tests
unit_tests/test_redistribute_std_floor.py:Full suite:
477 passed, 13 skipped.mypy smauglab/clean, pre-commit passes.🤖 Generated with Claude Code