Building a deeplabv3 segmentation model - cerr/CERR GitHub Wiki
User-defined inputs
- Directory containing DICOM images and segmentations (one sub-directory per patient).
- JSON configuration file defining structure names, data split, hyperparameters etc.
Sample : CERR/CERR_core/DLSegmentationTraining/sample_train_params.json
Exporting to .h5
-
DICOM data is converted to .h5 format required to train the deep learning model.
-
Example call:
prepareSegDataset(paramFilename);
Building a model
Requirements:
-
Pytorch
Follow instructions for installation available at https://pytorch.org/ -
DeeplabV3
Pull the PyTorch implementation of DeepLab-V3-Plus
git pull https://github.com/jfzhang95/pytorch-deeplab-xception.git
-
Customize wrapper functions
- mypath.py : Provide paths to .h5 datasets (training, validation and test directories)
- dataloaders/init.py : Define dataloaders for the input dataset
- dataloaders/utils.py : Map labels to colors for display of segmentation masks
- datasets/yourscript.py : Define valid classes and image transformations