Sct_deepseg - Output quality - v5.0.0

Hello again!

After installing SCT v5.0.0 and trying something else i got this from the terminal

extop@:/aran/testing$ sct_deepseg -i 3D_T1.nii -task seg_sc_t2star

--
Spinal Cord Toolbox (5.0.0)


--
Spinal Cord Toolbox (5.0.0)


WARNING: fname_roi has not been specified, then the entire volume is processed.

Loaded 255 axial slices.
/home/extop/.local/lib/python3.6/site-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'ivadomed.models.Unet' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/home/extop/.local/lib/python3.6/site-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'ivadomed.models.Encoder' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/home/extop/.local/lib/python3.6/site-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.container.ModuleList' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/home/extop/.local/lib/python3.6/site-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'ivadomed.models.DownConv' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/home/extop/.local/lib/python3.6/site-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/home/extop/.local/lib/python3.6/site-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/home/extop/.local/lib/python3.6/site-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.dropout.Dropout2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/home/extop/.local/lib/python3.6/site-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.MaxPool2d' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/home/extop/.local/lib/python3.6/site-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'ivadomed.models.Decoder' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)
/home/extop/.local/lib/python3.6/site-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'ivadomed.models.UpConv' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
  warnings.warn(msg, SourceChangeWarning)

Done! To view results, type:
fsleyes n4_CNS_001_0_3D_T1_MS-P.nii -cm greyscale n4_CNS_001_0_3D_T1_MS-P_seg.nii.gz -cm red -a 70.0 &

The function is able to produce an output, but we found it questionable

Perhaps the task is wrong, using a T1 but a t2star model? Looking forward to your answer!

thanks!

aran

@Aran, as you rightfully pointed out, the model T2* was trained on T2*w data, whereas the input you used has a very different contrast, which explains the poor performance.

Hello,

That’s what i thought. Correct me if I am wrong, the only way to obtain a SC segmentation would be to use sct_deepseg_sc or sct_propseg? I guess sct_deepseg is only for these “weird” cases that you can download and install?

Thanks

Aran

the only way to obtain a SC segmentation would be to use sct_deepseg_sc or sct_propseg ? I guess sct_deepseg is only for these “weird” cases that you can download and install?

I’m not sure what you are referring to by “weird cases”, but sct_deepseg can also be used if the input data match the image type of the model you are using. Example below for the sct_example_data/t2s data:

That being said, we would like to stress that while sct_deepseg has just been released, the performance of the seg_sc_t2star model is still lower than when using sct_deepseg_sc. We are working actively to fix the remaining bugs so that sct_deepseg will eventually become a replacement for all deep learning segmentation tools in SCT. Feedback from users is always welcome for us to improve the functionalities and performance :blush:

Hi,

My bad, with “weird cases” I was referring to the different models available to download with sct_deepseg, such sa the mice model.
Expanding my previous question, from a T1-image, the proper ways to obtain a SC segmentation’d be to use sct_deepseg_sc or sct_propseg?

Thanks!

yup! until we develop new models for sct_deepseg