ivadomed / ivadomed/model-spinal-rootlets
Testing lumbar rootlets models on `nrc-lumbar-balgrist`
- Dominant language
- Python
- Stars
- 8
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
I tested the `Dataset322_LumbarRootlets` model (more details on this model [here](https://github.com/ivadomed/model-spinal-rootlets/issues/67#issuecomment-2265361106)) on T2w axial images from the `nrc-lumbar-balgrist` dataset.
Commands
NOTE: we have to crop the image first, as the `Dataset322_LumbarRootlets` model was trained on cropped images.
```console
cd nrc-lumbar-balgrist/sub-02/anat
# Segment spinal canal
python packaging_lumbar_rootlets/run_inference_single_subject.py -i sub-02_acq-tseTra_chunk-2_T2w.nii.gz -path-model $SCT_DIR/data/deepseg_models/model_seg_canal_t2w/nnUNetTrainer__nnUNetPlans__3d_fullres -fold 0 -o sub-02_acq-tseTra_chunk-2_T2w_canal_seg.nii.gz
# Crop
sct_crop_image -i sub-02_acq-tseTra_chunk-2_T2w.nii.gz -m sub-02_acq-tseTra_chunk-2_T2w_canal_seg.nii.gz -dilate 32x32x32 -o sub-02_acq-tseTra_chunk-2_T2w_crop.nii.gz
# Segment rootlets
python packaging_lumbar_rootlets/run_inference_single_subject.py -i sub-02_acq-tseTra_chunk-2_T2w_crop.nii.gz -path-model $HOME/models/rootlets/Dataset322_LumbarRootlets/nnUNetTrainerDA5__nnUNetPlans__3d_fullres/ -fold 0 -o ub-02_acq-tseTra_chunk-2_T2w_crop_rootlets_322_DA5.nii.gz
```
GIF - unfortunately, the performance is pretty low
Some rootlets are segmented, but there are also some false positives outside the spinal canal.

I also tried the `Dataset302_LumbarRootlets` model (trained on uncropped data), but there were a looot of false positives outside of the spinal canal. Running the models on other subjects (`sub-01` and `sub-03`) got similar results (not shown).
A few important considerations:
- current `Dataset30X` lumbar models are very much _**alpha**_ versions, trained on 6 images from a single dataset (`lumbar-marseille`)
- images from `lumbar-marseille` used to train the models were _**single-chunk**_ 3T T2* ZOOMit with resolution `0.292969, 0.292969, 0.5` covering T10-S2 region
- while `nrc-lumbar-balgrist` images are 1.5T T2w TSE with resolutions `0.260417, 0.260417, 3.3` to `0.446429, 0.446429, 4.6` (i.e., much higher slice thickness) covering L1-L4 acquired in chunks, each chunk covering max 2 discs; example below
`sub-02_acq-tseTra_chunk-1_T2w.nii.gz` and `sub-02_acq-tseTra_chunk-2_T2w.nii.gz`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported commands in packaging_lumbar_rootlets/run_inference_single_subject.py on the nrc-lumbar-balgrist subjects, including canal segmentation and cropping. Compare the Dataset322_LumbarRootlets and Dataset302_LumbarRootlets outputs with the linked examples; done would require an agreed resolution to the false-positive and missed-rootlet performance problem.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100