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)
Pull image from Docker Hub.
docker pull tomo2321/landmark_segmentation_uncertainty:latest
Or create a brand new docker image from Dockerfile.
docker build -t <YOUR_IMAGE_NAME> .
Make a new directory named img and put your CT images in it.
cd ./test
mkdir ./img
Choose a model from models and modify the MODEL variable in the bash script. Run the bash script for the inference.
bash inference.sh
If you get an error regarding carriage return in the bash script, try the following command first.
sed -i 's/\r//g' inference.sh
Choose a model from models and modify the MODEL variable in the bash script. Run the bash script for the visuliazatrion of results.
bash visualization_all.sh
Examples of visuliazation
cd ./alignment_analysis
To be updated.