Skip to content

Labeling of intervertebral discs using the Hourglass deep learning architecture.

License

Notifications You must be signed in to change notification settings

spinalcordtoolbox/disc-labeling-hourglass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️‎‎‎ For more information regarding state-of-the-art disc labeling techniques, a recent initiative has led to the creation of an open-source benchmark: the code is available here https://github.com/spinalcordtoolbox/disc-labeling-benchmark

Intervertebral disc labeling with the hourglass approach

Description

This is the continuation of the work made by Reza Azad, Lucas Rouhier, and Julien Cohen-Adad on a deeplearning based architecture called Stacked Hourglass Network to detect and classify vertebral discs automatically on MR images.

Their work was published in a paper called "Stacked Hourglass Network with a Multi-level Attention Mechanism: Where to Look for Intervertebral Disc Labeling" for a MICCAI Workshop in 2021

This repository will be used to train and test the Stacked Hourglass Network in different MR case scenario.

Cross references

In this section are referenced repositories and issues related to this work.

Issues

  • Summary issue by @joshuacwnewton on the work previously done to replace the current sct_label_vertebrae.

Older repositories

Getting Started

To get started with this repository, follow the steps below:

  1. Clone the repository to your local machine using the command:
git clone https://github.com/spinalcordtoolbox/disc-labeling-hourglass.git
cd disc-labeling-hourglass/
  1. Set up the required environment and dependencies.
conda create -n myenv python=3.8
conda activate myenv
pip install -r requirements.txt
pip install -e .

(in development) --> cf #18

  1. Gather only the relevant images for the training in a TEXT file (The input dataset needs to be in BIDS format): The free multi-center spinegeneric dataset is available in https://github.com/spine-generic/data-multi-subject.
find ~+ -type f -name *_label*.nii.gz | grep -v MTS | sort > ../../data_config/spinegeneric_vert.txt
python src/dlh/data_management/init_data_config.py --txt CONFIG_DATA --type LABEL
  1. Train hourglass on the vertebral data

🐝 Currently the training is monitored using wandb (please check here). Please log using wandb login in the command or train offline with wandb offline before training.

In this example T2 weighted images will be used and 15 classes corresponding to the 15 first discs will be identified by the hourglass network.

python src/dlh/train/main.py --datapath VERTEBRAL_DATA -c t2 --ndiscs 15

Contributions and Feedback

Contributions to this repository are welcome. If you have developed a new method or have improvements to existing methods, please submit a pull request. Additionally, feedback and suggestions for improvement are highly appreciated. Feel free to open an issue to report bugs, propose new features, or ask questions.

License

For more information regarding the license, please refere to the LICENSE file.

About

Labeling of intervertebral discs using the Hourglass deep learning architecture.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages