Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ventral rootlets - results of first segmentation model #36

Closed
LouisThomasLapointe opened this issue Mar 14, 2024 · 3 comments
Closed

Ventral rootlets - results of first segmentation model #36

LouisThomasLapointe opened this issue Mar 14, 2024 · 3 comments

Comments

@LouisThomasLapointe
Copy link
Contributor

LouisThomasLapointe commented Mar 14, 2024

1) Dataset
The first training was done on 14 subjects (segmented manually by LTL) from the spine-generic and OpenNeuro datasets. Manual segmentation of the ventral rootlets was done while the dorsal rootlets' segmentation were taken from the D5 dataset described here.
2) Model training
nnUNet 3d_fullres model trained on 14 subjects.
To initialize the dataset, the following command was used:
nnUNetv2_plan_and_preprocess -d 101 --verify_dataset_integrity -c 3d_fullres

For starting the training, the following command was used:
CUDA_VISIBLE_DEVICES=0 nnUNetv2_train 101 3d_fullres 0

For running the inference on new images, the following command was used:
nnUNetv2_predict -i nnUNet_raw/Dataset103_M1/imagesTr -o nnUNet_raw/Dataset103_M1/labelsTr -d 101 -c 3d_fullres -f 0
Where the Dataset103_M1 folder contains the images on which inference was run.

3) Results

Here are the learning curves for the training.

progress

Here is an example of the prediction the model give:
The image
image
The segmentation
image

We can see that, while not perfect, the predictions the model can produce are promising for a first training on a relatively small dataset. There is some obvious problem with the model, mainly incorrect labelisation of pixels around the rootlets as rootlets pixel, incomplete segmentation of an individual rootlet and incorrect labelisation of rootlets pixels as background pixel. Those errors are all visible in the image below.
image
image

Finally, there is some rootlets, especially in the lower cervical levels, that are associated with the wrong spinal level. The problem is rare, but tends to happen in already challenging to segment MRI images or ones where the levels are really close one to another.
image

@valosekj valosekj changed the title Results of first model on automatic spinal rootlets segmentation Ventral rootlets - results of first segmentation model Mar 14, 2024
@jcohenadad
Copy link
Member

Very nice results @LouisThomasLapointe ! Keep up the good work 😊

@valosekj
Copy link
Member

valosekj commented Mar 15, 2024

@LouisThomasLapointe nice results! 🚀

Finally, there is some rootlets, especially in the lower cervical levels, that are associated with the wrong spinal level. The problem is rare, but tends to happen in already challenging to segment MRI images or ones where the levels are really close one to another.

This happened to us during dorsal rootlets training in a few subjects too. We QCed the predicted images and fixed the problematic levels manually.

A two minor comments/suggestions:

  1. Could you upload a TSV file listing the subjects you used for the training/testing to training/dataset_creation? You can name the file V1.tsv (V = ventral). Please inlcude two columns: file_name (e.g., sub-amu01_T2w.nii.gz) and folder (train/test). You can do so by cloning the repo, creating a new branch, adding the file, committing the file, pushing the file, and opening a PR. Tutorial here. - done in Datasets V1 and V2 for training of the ventral model #38
  2. Can you please try to generate QC for the predicted images? It will allow us a convenient assessment of the rootlets across all subjects. To do so: download and install the latest SCT, run the first sct_qc command from this comment (you will need SC seg which is used to crop the image; you can get it by running sct_deepseg_sc), loop across all predicted images.

@valosekj
Copy link
Member

Closing -- see summary: #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants