This code performs automatic segmentation of L4-L5 and L5-S1 CEPs from sagittal UTE (Ultra-short Echo Time) spine MR images
Segmentation is performed via a U-net (Ronneberger et al., 2015) that was trained on UTE images and manual segmentations.
Set up a conda environment if you do not have all the packages/compatible versions (the list of dependencies is listed in environment.yml
).
Create and activate virtual environment using conda
Set-up environment using conda (make sure you are in the CEP-seg
code repository):
conda env create -f environment.yml
The default name of the environment is CEPseg
. Activate the environment with source activate CEPseg
, and deactivate with source deactivate
.
Use conda info CEPseg
to see more information about the environment and ensure that it was installed properly.
Make sure you are in the CEP-seg
directory.
source activate CEPseg
jupyter notebook
Open prediction.ipynb
.
Under User inputs
, change level
('l4l5inf', 'l4l5sup', 'l5s1inf', 'l5s1sup'), img_path
(where MR images are stored) and pred_path
(where masks will be created) as desired.
Run prediction.ipynb
. Masks will be created in the directory specified as pred_path
.