ivadomed / canproco

Code for preprocessing the CanProCo brain and spinal cord dataset
MIT License
4 stars 1 forks source link

Shifted GT spinal cord segmentations for PSIR and STIR contrasts #102

Open naga-karthik opened 4 months ago

naga-karthik commented 4 months ago

There is a slight shift in the GT segmentations of PSIR and STIR contrasts of the canproco dataset. We used these shifted segmentations in training the contrast-agnostic model v2.4. This is a problem as it risks making the model biased and keep outputting shifted predictions in the future versions of the model.

example sub-edm010 ![ezgif com-animated-gif-maker](https://github.com/user-attachments/assets/a6c076a6-0250-408c-9b88-3e3c774e7a78)

Mitigation strategy 1 (short term):

Mitigation strategy 2 (long term):

jcohenadad commented 4 months ago

QC each segmentation 1-by-1 and correct the manual segmentations

isn't there a more efficient way to do it? Eg: running sct_deepseg_sc if it works better.

valosekj commented 4 months ago

isn't there a more efficient way to do it? Eg: running sct_deepseg_sc if it works better.

I tried sct_deepseg_sc 3D, sct_deepseg_sc 2D, and sct_propseg on STIR and PSIR images in the past, but none of the methods worked well. Details in https://github.com/ivadomed/canproco/issues/4#issuecomment-1430250475

valosekj commented 4 months ago

There is a slight shift in the GT segmentations of PSIR and STIR contrasts of the canproco dataset. We used these shifted segmentations in training the contrast-agnostic model v2.4. This is a problem as it risks making the model biased and keep outputting shifted predictions in the future versions of the model.

If the shift is related to v2.4 (i.e., after adding PSIR and STIR contrasts), how would you explain that the shift is also presented for v2.3 predictions (i.e., before adding PSIR and STIR contrasts)? See v2.3 vs 2.4 comparison: https://github.com/valosekj/dcm-brno/issues/19#issuecomment-2241085876

jcohenadad commented 4 months ago

I would like to understand the cause for this shift. Could it be as simple as an interpolation issue?

jcohenadad commented 4 months ago

If the shift is related to v2.4

IIUC this is not what Naga implied-- the GT were already existing before, and they were used to train the v2.4 model (TLDR: shift exists for 2.3 and, consequently, 2.4)

jcohenadad commented 4 months ago

Another example from https://github.com/valosekj/dcm-brno/issues/19: sub-1860B6472B_ses-1860B_acq-ZOOMit_dir-AP_dwi_crop_crop_moco_dwi_mean.nii.gz

sct_deepseg -i sub-1860B6472B_ses-1860B_acq-ZOOMit_dir-AP_dwi_crop_crop_moco_dwi_mean.nii.gz -task seg_sc_contrast_agnostic -qc qc -thr 0

Further investigation in https://github.com/sct-pipeline/contrast-agnostic-softseg-spinalcord/issues/113