WarpTransform: reflection padding to remove edge striping at warped-axis faces#1025
Open
pscamillo wants to merge 1 commit into
Open
WarpTransform: reflection padding to remove edge striping at warped-axis faces#1025pscamillo wants to merge 1 commit into
pscamillo wants to merge 1 commit 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. |
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.
Follow-up to the scroll-specific Warp augmentation (merged in #999, issue #201).
While validating
WarpTransformon a real Scroll 5 CT crop, I found a thin striped band along the warped-axis end-faces. Root cause: the coherent displacement is constant along the normal axis (by design — the stacked sheets bend together as a unit), so at the two end-faces the shift pushes the sampling grid off-volume. Withpadding_mode="border", those out-of-bounds samples clamp to the single edge value; since the displacement varies in-plane, adjacent columns clamp by different amounts, leaving a striped band at the face.Fix: switch the
grid_samplein_warpfrompadding_mode="border"to"reflection". Out-of-bounds samples now mirror interior texture instead of replicating the edge value, so the band disappears. The displacement field is untouched, so the coherent (constant-along-normal) bend and the strictly-monotonic / no-fold guarantee are preserved. One-line change.Validation on a real Scroll 5 crop
(1, 48, 512, 512), with the normal axis forced to an in-plane axis so the face is visible in the viewed plane:border): striped band at the warped-axis facereflection): face is clean; interior warp unchangedThe


__main__self-test still passes (identity when disabled, shape preserved, finite values, labels a subset, coherent bend).