sct-pipeline / contrast-agnostic-softseg-spinalcord

Contrast-agnostic spinal cord segmentation project with softseg
MIT License
4 stars 3 forks source link

Training separately on the two `MTS` contrasts #25

Closed uzaymacar closed 11 months ago

uzaymacar commented 2 years ago

The spine-generic-processed dataset include acq-MTon_MTS and acq-T1w_MTS contrast. As noted in the previous meeting, these contrasts were not picked by pybids==0.15.1. We discovered two solutions to the problem:

  1. Add the subject paths to force_index similar to how it is done for microscopy and CT at these lines
  2. Upgrade to pybids==0.15.2 which introduced MTS support and rename the files according to https://github.com/spine-generic/data-multi-subject/issues/116.

However, in both of these solutions, the ivadomed loader with pybids considers the last part of the filename (after the last underscore) as the modality as mentioned here. This means the two contrasts are treated as one in effect as both have the suffix MTS.

To train separately (which I assume is the goal), it looks like we would have to use different suffixes. However, this doesn't look like a clean solution and I am open to any other suggestions!

jcohenadad commented 2 years ago

To me this is a limitation of ivadomed and the problem needs to be fixed there, sooner rather than later. Ongoing discussions:

uzaymacar commented 2 years ago

Below are the BIDS-compliant files we need to support (on the right) and their older names (on the left) as mentioned in https://github.com/spine-generic/data-multi-subject/issues/116:

acq-MTon_MTS → flip-1_mt-on_MTS
acq-MToff_MTS → flip-1_mt-off_MTS
acq-T1w_MTS → flip-2_mt-off_MTS
jcohenadad commented 1 year ago

The issue with the ivadomed loader will be addressed here: https://github.com/ivadomed/ivadomed/pull/1240

jcohenadad commented 1 year ago

Once fixed, please edit README: https://github.com/sct-pipeline/contrast-agnostic-softseg-spinalcord/blob/main/README.md#dataset

naga-karthik commented 11 months ago

I see that the file names have been changed but not updated in the ReadMe yet. @sandrinebedard could you please briefly describe it in the ReadMe? Thanks!

sandrinebedard commented 11 months ago

I removed all instances of training with ivadomed, where is mentionned the MTS contrasts:

https://github.com/sct-pipeline/contrast-agnostic-softseg-spinalcord/commit/6123aadae6679e44859ae722a9204edaace3d20e