ivadomed / ivadomed/model-spinal-rootlets

Testing cervical model on 7T ME-GRE

Open
#61 0 comments 0 reactions 0 assignees View on GitHub
contrast: T2star strength: 7T
Dominant language
Python
Stars
8
Forks
2
PR merge metrics
No merged PRs in 30d

Description

This issue summarizes testing of the model for dorsal cervical rootlets (`sct_deepseg -task seg_spinal_rootlets_t2w`) on an axial 7T ME-GRE (T2*w) image (0.24 x 0.24 x 3.0 mm) from Caroline.

## TL;DR

The model does not perform well on the provided image out of the box. The performance is significantly lower compared to 3T ME-GRE images (see https://github.com/ivadomed/model-spinal-rootlets/issues/60).

## 0) Preparing data

Data structure

```console
tree
.
...
├── sub-002_run-03_echo-1_t2space.json
├── sub-002_run-03_echo-1_t2space.nii.gz
├── sub-002_run-03_echo-2_t2space.json
├── sub-002_run-03_echo-2_t2space.nii.gz
├── sub-002_run-03_echo-3_t2space.json
├── sub-002_run-03_echo-3_t2space.nii.gz
...
```

`run-03` has the largest FOV --> using it

averaging across echoes

```console
# Combine echos (individual 3D images) into a single 4D image (better for sct_maths)
sct_image -i sub-002_run-03_echo-1_t2space.nii.gz sub-002_run-03_echo-2_t2space.nii.gz sub-002_run-03_echo-3_t2space.nii.gz -concat t -o sub-002_run-03_combined_echos_t2space.nii.gz
# Mean across 4th dim
sct_maths -i sub-002_run-03_combined_echos_t2space.nii.gz -mean t -o sub-002_run-03_combined_echos_t2space_mean.nii.gz
# RMS across 4th dim
sct_maths -i sub-002_run-03_combined_echos_t2space.nii.gz -rms t -o sub-002_run-03_combined_echos_t2space_rms.nii.gz
```

## 1) `mean` image

First trying the model on the `mean` image:

```console
sct_deepseg -i sub-002_run-03_combined_echos_t2space_mean.nii.gz -o sub-002_run-03_combined_echos_t2space_mean_rootlets.nii.gz -task seg_spinal_rootlets_t2w
```

Segmentation is totally off -- no rootlets segmented.

image

image

## 2) Cropped `mean` image

Trying to crop (manually using the FSLeyes crop feature) the image around the SC to limit the FOV before running inference.

```console
sct_deepseg -i sub-002_run-03_combined_echos_t2space_mean_roi.nii.gz -o sub-002_run-03_combined_echos_t2space_mean_roi_rootlets.nii.gz -task seg_spinal_rootlets_t2w
```

Cropping is not helping much -- only a few rootlets were segmented.

image

image

## 3) Cropped `mean` image resampled to 0.8 mm

Trying to manually resample the image to iso 0.8 mm to match the resolution of the training data before running inference.

```console
sct_resample -i sub-002_run-03_combined_echos_t2space_mean_roi.nii.gz -mm 0.8x0.8x0.8 -o sub-002_run-03_combined_echos_t2space_mean_roi_r.nii.gz
sct_deepseg -i sub-002_run-03_combined_echos_t2space_mean_r_roi.nii.gz -o sub-002_run-03_combined_echos_t2space_mean_r_roi_rootlets.nii.gz -task seg_spinal_rootlets_t2w
```

Some rootlets are now segmented, but most of the rootlets are still missing.

image

image

Interestingly, the model performs slightly better on the manually resampled image. This is slightly surprising to me because `sct_deepseg` should do the resampling before running the inference as well.

---

Results for the `rms` image are pretty similar --> not showing.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the documented sct_image, sct_maths, sct_resample, and sct_deepseg commands on the provided 7T ME-GRE data, comparing the mean, RMS, cropped, and resampled results. No source file or test is named; done would require identifying why the model performs poorly and why manual resampling differs from sct_deepseg behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
machine-learning, 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.