Closed jcohenadad closed 11 months ago
@ebadrian @louisfb01 pls see how this was done for sct_deepseg_sc and sct_deepseg_gm -- document everything you find (link to training script, preprocessing, etc)
EDIT 20230116_122839: sct_deepsegsc first finds the centerline and then extract patches, on a slice-by-slice basis, around that centerline. See [code](https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/master/spinalcordtoolbox/deepseg/sc.py). Also same idea as in https://github.com/ivadomed/ivadomed/issues/1259#issuecomment-1371528151
@louisfb01 @jcohenadad Here are the script lines related to the cropping strategy for the different version of sct_deepseg:
Based on the current version of the model, here are the updates:
64x192x320
. Larger RL and AP crop sizes ensure that we deal with cases with high curvature. As for SC not being in the center --> this could still be a problem, but aggressive data augmentation tries to deal with this. We also had a decent result on a scoliotic spine segmentation (result shared on slack)320
is the max size of all images in the training set in S-I direction so there is no cropping hereFor updated dataset, find max(Z)-- or maybe not required because at inference, the CenterCrop parameter can be removed (to make sure the ENTIRE image is segmented)
Yes, for inference, we're currently leaving the Z to be -1
meaning that the model takes the original size in the S-I dim. (whatever it might be). Removing CenterCrop did not result as good results as the one with cropping. The errors were mainly spurious segmentations outsdie the SC (which can be removed in postprocessing)
Based on these (final) updates, closing this issue
The CenterCrop might be problematic for datasets where:
Suggestions: