Skip to content

configs: ship PALETTE alone without the Voronoi split, the label remap or unblurred speckle - #150

Open
Hendrik-code wants to merge 1 commit into
mainfrom
hm/palette-clean-config
Open

Hendrik-code wants to merge 1 commit into
mainfrom
hm/palette-clean-config

Conversation

@Hendrik-code

Copy link
Copy Markdown
Collaborator

What

One config, transform_params_paper-palette-clean.json (hash ba46ce7b). It is the Palette alone arm plus three RandomPaletteGPU keys. Palette alone is transform_params_paper-synthseg.json with RandomSynthSegGPU replaced by RandomPaletteGPU at p: 1.0, hash 4b92045c, the same config #142 ships as transform_params_paper-palette.json.

key value removes
skip_sub_parc_prob 1.0 the Voronoi sub-parcellation, which cuts straight polygon edges through anatomy: edges no imaging modality produces
label_remap_prob 0.0 the per-label affine remap, which steps the intensity exactly on the ground-truth boundary
blur_sigmas [0.5, 0.8] unblurred speckle: the k-means bucketing is hard, so voxels next to a cluster threshold flip between two remaps

Every other key is Palette alone's, so the two differ only in these three. No code change: all three are existing RandomPaletteGPU parameters. Based on main rather than #142, so it does not wait on that PR; the .gitignore entry is its own.

Why

Seen in renders of the PALETTE arm on four SpineGAN datasets:

  • polygonal regions crossing vertebrae;
  • salt-and-pepper, worst on CT;
  • label-shaped steps.

In 9 of 40 measured feature-only samples, intensity no longer separated the labels at all. The config asks whether PALETTE's measured gain on Dataset804 survives without those artifacts.

Tests

unit_tests/test_palette_clean_config.py:

  • the config sets the three knobs and has no SynthSeg;
  • it builds and runs;
  • with Voronoi and label remap off (blur off for the check), voxels of equal input intensity map to equal outputs across both labels, over five seeds;
  • the defaults break that, so the check can fail.

Full suite: 477 passed, 13 skipped. Pre-commit passes.

🤖 Generated with Claude Code

…p or unblurred speckle

transform_params_paper-palette-clean.json is the `Palette alone` arm
(transform_params_paper-synthseg.json with RandomSynthSegGPU replaced by
RandomPaletteGPU at p=1, hash 4b92045c) plus three PALETTE keys:

* skip_sub_parc_prob 1.0: no Voronoi sub-parcellation, which cuts straight
  polygon edges through anatomy.
* label_remap_prob 0.0: no per-label affine remap, which steps the
  intensity exactly on the ground-truth boundary.
* blur_sigmas [0.5, 0.8]: a blur floor. The k-means bucketing is hard, so
  voxels next to a cluster threshold flip between two remaps and come out
  as salt-and-pepper.

With the first two off, the synthesis before the blur is a function of input
intensity alone; the test checks that, and that the defaults break it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant