/playing-with-simpleitk

Playing with SimpleITK and nnU-Net to process data from the CHAOS challenge on Google Colab.

Primary LanguageJupyter NotebookMIT LicenseMIT

Playing with SimpleITK

Build status Updates Python 3 Code coverage Code Quality

This repository contains Python code to play with SimpleITK.

Requirements

  • Install version 3.7 of Python 3.X,
  • Install the required packages:
pip install -r requirements.txt

NB: As of November 2019, the PyPI package of SimpleITK does not work with Python 3.8.

Data

Usage

Prepare data

  • Convert data from DICOM to NifTI with SimpleITK:
python convert_to_nii.py

Train nnU-Net

Training was performed with:

  • a training dataset of 5 images downsampled to 4x4x4mm,
  • no cross-validation (in which case the validation dataset is the same as the training dataset to find the best checkpoint and to decrease the learning rate).

Training for 1 epoch can require 2m30s, but up to 10m, depending on the machine which you obtained.

Results obtained after ~ 100 epochs are shown below:

Training

where:

  • training loss is in blue,
  • validation loss is in red,
  • evaluation metric (to maximize) is in green.

In terms of Dice scores, the average is:

  • 99.1% for the 5 patients of the training data,
  • 94.8% for the 15 patients of the validation data (training data not used).

References