Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mirroring instead of zero-padding when cropping images #68

Open
jcohenadad opened this issue Feb 11, 2023 · 1 comment
Open

Use mirroring instead of zero-padding when cropping images #68

jcohenadad opened this issue Feb 11, 2023 · 1 comment

Comments

@jcohenadad
Copy link
Member

Data are CenterCroped during preparation. However, if images are too small, the output cropped image is zero-padded. I have the intuition that when the model is exposed to data that include zeros, the model performance is reduced because these zeros represent a strong discontinuity:

image

I would like to try using mirroring instead of zero-padding and see how training goes.

Related to #1259 #1018 #1231

@jcohenadad
Copy link
Member Author

jcohenadad commented Mar 11, 2023

Additional motivation: mirror padding was used for GM segmentation (with np.pad): https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/d6d5bace26b96710b3db6666e7bc1903187a154d/spinalcordtoolbox/deepseg_/gm.py#L57

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

No branches or pull requests

1 participant