TODO: Better readme
A project to classify and perform segmentation for Brain tumors in Brain MRI images. It is successfully able to classify if a person has a tumor, or not, and locates the tumor if present.
This project uses pipenv
for dependency management. You need to ensure that you have pipenv installed.
Here are the commands to facilitate using this project.
git clone https://github.com/Rohith04MVK/Brain-Tumor-Segmentation-And-Classification
# Install dependencies
pipenv sync -d
# Open the venv shell
pipenv shell
# Download segmentation data
cd data/segmentation
python download_segmentation_data.py
# Download classification data
cd data/classification
python download_classification_data.py
# Run the segmentation script
python src/train_seg.py
# Run the classification script
python src/train_clf.py
python example.py
Note: You can get the pretrained models here.
This project has 3 main sections.
data
contains the scripts to download data.notebooks
contains the well-documented jupyter notebooks.src
contains the scripts for training and interacting with models.
The dataset being used here is lgg-mri-dataset.
This has the brain MRI images, and their respective masks too (as .tif
files).
When using, this dataset is split into,
- 3006 Train images
- 590 Testing images
- 333 Validation images
Here is an image of the Mask and the MRI image
This is the mask applied on the MIR