Welcome to the Brain Tumor Segmentation Project! This Github Repository is designed for both newcomers and experienced professionals in the field of machine learning. Our aim is to develop a model capable of accurately segmenting brain tumors from MRI scans using deep learning techniques.
We are utilizing the Brain Tumor Segmentation (BraTS2020) dataset from Kaggle from from this link. This dataset includes multimodal MRI scans in NIfTI format (.nii.gz), encompassing various volumes:
- Native (T1)
- Post-contrast T1-weighted (T1Gd)
- T2-weighted (T2)
- T2 Fluid Attenuated Inversion Recovery (T2-FLAIR)
The tumor annotations are categorized into:
- Necrotic and non-enhancing tumor core (NCR/NET — label 1)
- Peritumoral edema (ED — label 2)
- GD-enhancing tumor (ET — label 4)
Our primary objective is to segment brain tumors by labeling each pixel as "1" for tumor classes (NCR/NET, ED, ET) and "0" otherwise. We plan to employ a 3D U-Net model for automatic segmentation.
- Data Preparation: Load, preprocess, and normalize the data, followed by train-test splitting.
- Model Building: Design and configure the 3D U-Net model architecture suitable for our segmentation task.
- Model Training and Validation: Train the 3D U-Net model on the prepared dataset and validate its performance.
- Model Evaluation: Assess model performance using metrics like accuracy, precision, recall, and F1 score.
- Results and Visualization: Compare model predictions with ground truth to visualize performance.
- Clone the repository to your local machine or open it in Google Colab.
- Ensure you have the required libraries installed:
torch
,numpy
,pandas
,matplotlib
,nibabel
,scikit-learn
,seaborn
,scipy
,SimpleITK
,albumentations
. - Download the BraTS2020 dataset from Kaggle and adjust the file paths in the notebook accordingly.
- Run the Jupyter Notebook to train and evaluate the brain tumor segmentation model.
This Github Respository, specifically the Jupyter notebook is structured to be accessible for beginners, providing detailed explanations and a step-by-step approach, while also encompassing advanced techniques for seasoned practitioners. Let's dive into the world of medical imaging and deep learning to make significant strides in healthcare technology!
We welcome contributions to enhance the functionality and efficiency of this script. Feel free to fork, modify, and make pull requests to this repository. To contribute:
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
). - Commit your Changes (
git commit -m 'Add some AmazingFeature'
). - Push to the Branch (
git push origin feature/AmazingFeature
). - Open a Pull Request against the
main
branch.
This project is licensed under the MIT License - see the LICENSE
file for details.
Author: Akhil Chhibber