AlyssaAmod / UNN_BraTS23

MICCAI 2023 Brain Tumour Segmentation Challenge
GNU General Public License v3.0
0 stars 0 forks source link

MICCAI 2023 Brain Tumour Segmentation Challenge: Team UNN (Umuntu Ngumuntu Ngabantu)

Using this repository

This repository contains newly developed code as well as slightly modified version of the Optimised U-Net model as found in the Nvidia Deep Learning Examples repository for nnUnet

BraTS2023 final submission only uses the Optimised Unet framework. 4 main models were trained and evaluated:

  1. training with only SSA data
  2. training with only BraTS-GLIOMA data
  3. training with SSA and BraTS-GLIOMA data combined
  4. training with only BraTS-GLIOMA data and then fine-tuning the model with SSA data

The newly developed code was created in order to further explore the effect of additional data augmentations on the generalisability of this framework. The aim was also to simplify the process and reduce computational capacity such that the model can be run from low resource settings possibly using open source computing infrastructure. These are found in the folder scripts, as well as within several notebooks. Due to time, resource and capacity contraints, this was not completed in the 2 month period of the challenge.

Scripts in this repository

Team UNN code: All folders except for OptiNet contain original code authored by SPARK team UNN. Below are some of the main scripts.

Notebooks

Below outlines key notebooks created for use during EDA, script development and evaluations.

├──notebooks
  Explorations and code used for challenge submission
    └──data-exploration.ipynb
        Key for initial EDA of the multimodal data provided for the BraTS2023 challenge. Provides visuals of all subjects across all planes (when N is 60)
    └──inference_opti.ipynb
        Final steps of inference for validation submissions. Contains postprocessing steps taken and visualisations of predicted segments
    └──prepdata-exploration.ipynb
        Used to double check data prep script created
  Explorations for modifying OptiNet to allow for more generalised training to SSA data:
    └──transforms-exploration.ipynb
        Initial exploration of potential transforms functions, and working with torchio subjects
        Requires local copy of data
        └──transforms-exploration_SynapseData.ipynb
        Visually explore the effects of trasformations on the original data. To assist with determining which additional augmentations are likely to improve model.
        Requires synapse login.
    └──transforms-exploration_MRS+SNP.ipynb
        Exploring augmentations from literature that directly apply formula to volume intensities
        Requires synapse login
    └──dataloader_exploration.ipynb
        Used for checking data loader function
    └──usefulFx.ipynb
  └─playground
        └──Augmentations_Efficient.ipynb
        └──test_scripts.ipynb
  └─results
    These files are used for comparing validation submissions to determine differences in model performance.
        └──Box_Whisker.ipynb
        └──inference_monai.ipynb
            This code is to be used in conjunction with the team UNN created training scripts
        └──inference_opti.ipynb
            This is the code used to generate final nifti files for submission during validation phase
        └──predictions_SynapseData.ipynb
        └──Statistics.ipynb
        └──Statistics_F_statistic.ipynb

Modified Model Training

  1. data_prep : is an independent script, meant to only be run once to preprocess (and save) all raw data provided from the challenge, so that the data is ready to be put into dataloaders

  2. data_loader : reads from data_class and data_transforms, gets the data ready for model (will be read in from training script)

  3. training script: The training and validation data from the data_loader are passed to the trainer, respectively.

  4. Inference: the trained model is used to make predictions (i.e segmentating the brain tumor).

    |--scripts
    |--This folder contains all scripts created for modified training procedures. Attempts to successfully deploy OptiNet 2022 model with the code is currently unsuccessful
    |--data_preparation_OptiNet.py
        |--duplication of Futrega et al. data preparation code as found in their notebook "Brats22.ipynb"
    |--trainer.py
        |--main call to run all trainig procedures.
        |--calls on other scripts within folder
        |--monai_functions.py defines all functions used for training and validation. This script calls helper functions from the utils folder.
    |-- inference.py
        |--incomplete, refer to notebook playground

    Compute Canada

    Compute Canada ~bashrc aliases for quick access: scr="cd /scratch/guest187" data="cd /scratch/guest187/Data" results="cd /scratch/guest187/Results" home="cd /home/guest187" oN="cd /home/guest187/BraTS23_SSA/train/OptiUnet_run" mon="cd /home/guest187/BraTS23_SSA/train/MON_UNet" gh="cd /home/guest187/GitRepo_Brats23/UNN_BraTS23" ghON="cd /home/guest187/GitRepo_Brats23/nnUnet"

    Folder & File Structure Requirements

    Training & Validation Data

    Total file: Training data

    • BraTS glioma dataset = 1251
    • BraTS SSA dataset = 60

All data files are labelled as follows in the new data release:

data preparation outputs:

data augmentation outputs: currently nothing is saved

Submission: Validation

Refer to Challenge page on Synapse for submission requirements The segmentation files need to adhere to the following rules:

Segmentations should be contained in a zip or tarball archive and upload this to Synapse To submit click: File Tools > Submit File to Challenge There are 5 queues and as a team we are limited to 2 submissions per day