Add RingArtifactTransform: GPU CT ring-artifact augmentation (#201)#1020
Open
pscamillo wants to merge 2 commits into
Open
Add RingArtifactTransform: GPU CT ring-artifact augmentation (#201)#1020pscamillo wants to merge 2 commits into
pscamillo wants to merge 2 commits into
Conversation
|
@pscamillo is attempting to deploy a commit to the scroll Team on Vercel. A member of the Team first needs to authorize it. |
…te to a central blob/corner arc; document scan-axis usage. Validated on real Scroll-5 CT.
Contributor
Author
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.

RingArtifactTransform: GPU CT ring-artifact augmentation
Adds a scroll/CT-specific augmentation that simulates ring artifacts — the
concentric rings produced by miscalibrated or defective detector elements in
reconstructed CT. They appear in the axial plane, centered on the center of
rotation, extruded along the scan axis and consistent across stacked slices.
This is a real, common scroll-CT acquisition artifact, and follows the
"additional augmentations welcome" note in #201 (after the merged Squeeze /
Decohesion / Warp transforms).
Grounding in the Vesuvius pipeline. Per the project FAQ, the scrolls are
reconstructed with filtered backprojection from synchrotron parallel-beam scans.
Ring artifacts are the classic FBP signature of detector-element inconsistency,
so this models an artifact actually present in the reconstructed volumes (this is
augmentation for robustness on the reconstructed images, not reconstruction).
Amplitudes are kept in per-channel std units because the released reconstructions
are unitless / relative intensities (raw floats ~[-0.1, 0.1]); a fixed absolute
amplitude would not transfer across scans. The transform is additive and
non-destructive, consistent with the project keeping reconstruction values
unaltered.
Design
ImageOnlyTransform(batchgeneratorsv2 style), fully on-device, in-place.the volume by per-voxel radius with linear interpolation; the field is H×W and
broadcasts along the rotation axis (no per-voxel materialization).
nnU-Net inputs.
(C,X,Y)and(C,X,Y,Z); singleton spatial axes are never used forthe axial plane (pseudo-2D safe); no-op when < 2 non-singleton spatial axes.
jitter, sign probability, rotation axis, per-channel prob, channel sync.
Speed (RTX 5070, Blackwell sm_120, single sample)
Sub-millisecond per sample at every size, up to ~14.9 Gvox/s. Cost is
essentially flat as the stack (rotation) axis grows (64→128 in Z stays
~0.32–0.37 ms) because a single 2-D radial field is broadcast along that axis
rather than generating per-voxel values. Runs natively on GPU. (Benchmark
script included;
GaussianNoiseTransformin the vendored 0.2.1 build is CPU-only,so it is reported as a CPU reference rather than a GPU comparison.)
Ablation (controlled, synthetic — same format as the merged transforms)
Two identical
SmallSeg3Dnets, same seed/data/steps (400, patch 64³, RTX 5070).A = baseline (flips only); B = baseline +
RingArtifactTransform. Both areevaluated on a sweep of test-time ring severities. Crucially the test rings are
generated by an independent mechanism (hard-edged top-hat annuli, absolute
amplitude) — not by the trained transform — so this is not testing on the
training augmentation.
The augmentation buys monotonically increasing robustness as ring severity rises
(the baseline degrades to 0.906 Dice while B holds at ~0.999), with zero
clean-data cost. A sweep rather than a single operating point avoids a
cherry-picked result.
Figure
Illustrative effect of
RingArtifactTransform, rendered at 256² for visibility(training patches are 64³). Left: clean synthetic papyrus. Centre: the additive
field (after − before) — concentric rings as produced by the transform. Right:
corrupted result. Parameters here are stronger than the proposed training
defaults (
intensity=(0.05,0.3)) to make the rings legible.Open questions for bruniss / giorgioangel
ring_axes=[2]) to match the scan geometry,or leave axis-agnostic (
None) for robustness? Defaulting to Z for now.