cd ./landmark_segmentation_uncertainty
The approach and implementation of the vertebrae localization and segmentation is based on the paper and its project:
- Coarse to Fine Vertebrae Localization and Segmentation with SpatialConfiguration-Net and U-Net
- MedicalDataAugmentationTool-VerSe
We also used the following toolkits:
Vertebrae localization and segmentation are performed by a three-stage fully automatic approach:
- Spine localization,
- Vertebrae localization
- Binary segmentation of each localized and identified vertebrae
Additionally, the segmentation network in the final stage is reformed to the Bayesian 3D U-Net to estimate segmentation uncertainty by multiple test-time MC dropout samples
The models trained by the dataset VerSe 2019 in the repo are from the project MedicalDataAugmentationTool-VerSe.
We also released the new models: (To be updated)
- Spine localization and vertebrae localization: trained by 1180 CT cases (1000 cases from J-MID and 80 cases from VerSe 2019)
- Vertebrae Bayesian segmentation: trained by 180 CT cases (100 cases from J-MID and 80 cases from VerSe 2019)
The requirment.txt is provided in the repo.
pip install -r requirements.txt
Make a new directory named img and put your CT images in it.
cd ./test
mkdir ./img
The added environment variable of the MedicalDataAugmentationTool needs to be revised according to you local path in the following files.
./inference/main_spine_localization.py
./inference/main_vertebrae_localization.py
./inference/main_vertebrae_segmentation.py
Run the bash script for the inference.
bash inference_verse19_models.sh
Run the bash script for the visuliazatrion of results.
bash visualization_all.sh
Examples of visuliazation
cd ./alignment_analysis
To be updated.