Total 4 classes: background, brainstem, left/right parotids

Note that this script is for inference only. Hence, no label information required. But if you have label of images and want to evaluate the performance, or further training based on the model, please see here.

1. Latest results

Table 1. Dice score of validation on PDDCA dataset (train/valid: 33/15)

ROI

Brainstem

Left Parotid

Right Parotid

Average

Score

0.86830

0.75442

0.75059

0.79111

2. How to use

2.1. Prerequisites

Check the installation if needed.

2.2. Download the trained model

make download_model

There will be a trained model weight downloaded and named as model.pt.

2.3. Check the data format

The required data format is

DATA_DIR
├── DATA_INDEX
│   └──  img.nrrd
...

2.4. Configure the inference behavior

infering.yaml
gpus: 0                 <-- YOU CAN SET "gpus: 0,1" IF THERE'RE TWO AVAILABE GPUS
output_threshold: 0.2
output_dir: outputs
model_weight: model.pt

loader:
  name: NRRDLoader
  data_dir: data        <-- SPECIFY A DATA DIRECTORY
  roi_map:
    Brainstem: 1
    Parotid_L: 2
    Parotid_R: 3
  spacing: 1
  test: false
  resample: false

generator:
  BlockGenerator : ...

  Augmentor      : ...

  BatchGenerator :
    n_workers    : 1
    batch_size   : 12      <-- CHOOSE A PROPER BATCH SIZE
    verbose      : False

model: ...

2.5. Make inference

make infer

The output results will be in NRRD format like

OUTPUT_DIR
├── DATA_INDEX
│   └── structures
│       ├── BrainStem.nrrd
│       ├── Parotid_L.nrrd
│       └── Parotid_R.nrrd
...