ivadomed / model_seg_ms_mp2rage

Model repository for MS lesion segmentation on MP2RAGE data from University of Basel
MIT License
2 stars 0 forks source link

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

Open jcohenadad opened 1 year ago

jcohenadad commented 1 year ago

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 commented 1 year ago

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