![]() |
![]() |
---|---|
A 3D MRT scan (background removed). |
Labeled brain Edema. |
- Download "Task01_BrainTumour.tar" under the Medical Segmentation Decathlon website and extract the tar file.
- Provide the following folder structure:
BT_Segmentation_Project
|_ README.md
|_ Code
|_ Data_Extraction.ipynb (this file)
|_ ...
|_ Task01_BrainTumour (Dataset)
|_ dataset.json
|_ imagesTr (here are the compressed nii-files)
|_ labelsTr
|_ imagesTs
|_ Weights (trained model weights)
- Change into "Code" as a working directory
- Run "python3 setup_project.py" in your shell, to extract the nii-files to numpy file (Attention!: bear in mind that the dataset needs 70+ GB of storage)
High-level code overview (Click to expand)
- demo.ipynb:
Here we present our model training along with evaluation metrics and animated visualizations. The majority of what we report in our paper is produced using this code.
-
custom_losses.py:
Contains custom programmed losses. In addition you can find the get_loss function to automatically calculate the loss for a provided loss-function. -
data_loading.py:
This is the dataloader. The function get_train_test_iters gives you the data iterators. -
dataset_utils.py:
Here we coded all functions for manipulating and processing data. -
train.py:
Here you can find the train_model function to train a model.
-
Optional:
Here we stored additional experimental code that was not ultimately used in our trained models or demo. -
Architectures:
Here you can find all model architectures that we built.
Our executive report
Github repo
Model files
We would like to thank Prof. Dr. Chistoph Lippert, Tahir Miriyev, Noel Danz, Eshant English and Wei-Cheng Lai for sharing their experience and expertise with us. Special thanks to Noel Danz who gave insightful tips and comments to help guide the project.
-
Inspiration for our U-Net implementation:
https://github.com/Hsankesara/DeepResearch/blob/master/UNet/Unet.py -
Basis for adapted fuctions/classes, such as dice loss and focaltversky loss:
https://github.com/Mr-TalhaIlyas/Loss-Functions-Package-Tensorflow-Keras-PyTorch -
Reference was made to pytorch documentation throught the coding process:
https://pytorch.org/docs/stable/index.html