Labeling vertebral discs from MRI scans is crucial for the proper assessment of spine-related diseases. Challenges such as complex background of MRI images, the similarity between discs and bone area to name a few, usually exacerbates the notorious problem in segmentation of vertebral discs. To overcome this issue, we propose to incorporate shape information within the learning process. Moreover, as labelling anatomical structures such as intervertebral discs usually produces both false positive (FP) and false negative (FN) detections, we propose a look-once approach for the post-processing step in the intervertebral disc labeling procedure.
If this code helps with your research please consider citing the following paper:
R. Azad, Moein Heidari, Ehsan Adeli, Julien Cohen-Adad and Dorit Merhof , "Intervertebral Disc Labeling With Learning Shape Information, A Look Once Approach", download link.
@article{azad2022intervertebral,
title={Intervertebral Disc Labeling With Learning Shape Information, A Look Once Approach},
author={Azad, Reza and Heidari, Moein and Cohen-Adad, Julien and Adeli, Ehsan and Merhof, Dorit},
journal={arXiv preprint arXiv:2204.02943},
year={2022}
}
- April 7, 2022: First release (Complete implemenation for Spine Generic Dataset added)
This code has been implemented in python language using Pytorch libarary and tested in ubuntu, though should be compatible with related environment. The required libraries are included in the requiremetns.txt
file. Please follow the bellow steps to train and evaluate the model.
1- Download the Spine Generic Public Database (Multi-Subject).
2- Run the create_dataset.py
to gather the required data from the Spin Generic dataset.
3- Run prepare_trainset.py
to creat the training and validation samples.
Notice: To avoid the above steps we have provided the processed data for all train, validation and test sets here
(should be around 150 MB) you can simply download it and continue with the rest steps. Please unzip the file in the prepared_data
folder.
4- Run the main.py
to train and evaluate the model. It only takes couple of hours to train with 5GB GPU memory. Use the following command with the related arguments to perform the required action:
A- Train and evaluate the model python src/main.py
. You can use --att true
to use the attention mechanisim.
B- Evaluate the model python src/main.py --evaluate true
it will load the trained model and evalute it on the validation set.
C- You can run make_res_gif.py
to creat a prediction video using the prediction images generated by main.py
for the validation set.
D- You can change the number of stacked hourglass by --stacks
argument. For more details check the arguments section in main.py
.
5- Run the test.py
to evaluate the model on the test set alongside with the metrics.
Perceptual visualization of the proposed post-processing approach to eliminate the rate of FP / FN detections.
Our analysis was based on the publicly available Spine Generic Dataset. In bellow, results of the proposed approach illustrated.
Table 1 : Intervertebral disc labeling results on the spine generic public dataset (T1 Modality). Note that DTT indicates Distance to target
Methods | DTT (mm) | FNR (%) | FPR (%) |
---|---|---|---|
Ullmann et. all Template Matching | 1.97(±4.08) | 8.1 | 2.53 |
Rouhier et. all Countception | 1.03(±2.81) | 4.24 | 0.9 |
Azad et. all Pose Estimation | 1.32(±1.33) | 0.32 | 0.0 |
Baseline Proposed | 1.45(±2.70) | 7.3 | 1.2 |
Azad et. all Proposed | 1.2(±1.90) | 0.7 | 0.0 |
Table 2 : Intervertebral disc labeling results on the spine generic public dataset (T2 Modality). Note that DTT indicates Distance to target
Methods | DTT (mm) | FNR (%) | FPR (%) |
---|---|---|---|
Ullmann et. all Template Matching | 2.05(±3.21) | 11.1 | 2.11 |
Rouhier et. all Countception | 1.78(±2.64) | 3.88 | 1.5 |
Azad et. all Pose Estimation | 1.31(±2.79) | 1.2 | 0.6 |
Baseline Proposed | 1.80(±2.80) | 5.4 | 1.8 |
Azad et. all Proposed | 1.28(±2.61) | 0.9 | 0.0 |
(a): Intervertebral labeling results of three representative T2 images. upper row: ground truth, lower row: predictions. (b): Before (left) and after (right) applying look-once approach on the T1 generated noisy prediction.
for eliminating FP detection.
Methods | F1 | Accuracy | Specificity | Sensitivity | AUC |
---|---|---|---|---|---|
Rouhier et. all Condition based | 0.850 | 0.881 | 0.891 | 0.902 | 0.890 |
Azad et. all Search tree | 0.902 | 0.921 | 0.925 | 0.914 | 0.920 |
Proposed without geometrical relationship module | 0.914 | 0.932 | 0.941 | 0.917 | 0.9292 |
Proposed Only look once | 0.942 | 0.958 | 0.967 | 0.942 | 0.955 |
For more results of the proposed method for intervertebral disc labeling please refer to the paper
All implementations are done by Reza Azad and Moein Heidari. For any query please contact us for more information.
rezazad68@gmail.com
moeinheidari7829@gmail.com