YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Brain Tumor Detection System
Tumor Classification & Segmentation using Deep Learning
Overview
This repository contains two complementary machine learning projects for brain tumor analysis using MRI scans:
Brain Tumor Classification
- Classifies MRI images into categories (e.g., glioma, meningioma, pituitary tumor, or healthy).
- Uses Convolutional Neural Networks (CNNs) for automated medical image analysis.
Brain Tumor Segmentation
- Identifies and highlights tumor regions within MRI scans.
- Employs U-Net (and/or other segmentation architectures) for pixel-wise classification.
Together, these models provide a complete workflow for assisting radiologists in detecting and localizing brain tumors.
Project Structure
Brain-Tumor-Detection-System
βββ ML Project 1 Brain_Tumor_classification.ipynb # Classification notebook
βββ ML Project 2 brain_tumor_segmentation.ipynb # Segmentation notebook
βββ data/ # Dataset (MRI images)
βββ models/ # Saved models
βββ results/ # Predictions, segmented masks, visualizations
βββ requirements.txt # Dependencies
βββ README.md # Project documentation
Installation & Setup
Clone the repository:
git clone https://github.com/ayelefransi/Brain-Tumor-Detection-System.git cd Brain-Tumor-Detection-SystemInstall dependencies:
pip install -r requirements.txtDatasets:
- Classification: MRI datasets with labeled tumor classes.
- Segmentation: MRI scans with annotated masks. (Kaggle datasets such as Brain Tumor MRI Dataset and Brain Tumor Segmentation (BraTS) can be used.)
Usage
1. Classification
Run the classification notebook:
jupyter notebook "ML Project 1 Brain_Tumor_classification.ipynb"
- Loads MRI images
- Preprocesses data (resizing, normalization, augmentation)
- Trains a CNN model
- Evaluates performance (accuracy, precision, recall, F1-score)
2. Segmentation
Run the segmentation notebook:
jupyter notebook "ML Project 2 brain_tumor_segmentation.ipynb"
- Loads MRI scans and masks
- Preprocesses data (contrast enhancement, normalization)
- Trains U-Net (or similar)
- Generates segmented tumor regions
- Visualizes predictions vs. ground truth
Results
Classification
- Achieved high accuracy in distinguishing tumor types.
- Confusion matrices and classification reports available in the notebook.
Segmentation
- Successfully segmented tumor regions with high Dice Similarity Coefficient (DSC).
- Visual comparisons between predicted masks and ground truth provided.
Future Improvements
- Integrate classification and segmentation into a single pipeline.
- Deploy as a web application (e.g., Streamlit, Flask, or FastAPI).
- Incorporate explainable AI (Grad-CAM, SHAP) for model interpretability.
- Use larger datasets and transfer learning for improved generalization.
Requirements
- Python β₯ 3.8
- TensorFlow or PyTorch
- OpenCV
- NumPy, Pandas, Matplotlib, Seaborn
- scikit-learn
- Jupyter Notebook
(Exact dependencies are listed in requirements.txt)
Applications
- Assisting radiologists in early tumor detection.
- Supporting treatment planning with precise tumor localization.
- Enabling research in medical imaging and deep learning.
License
This project is licensed under the MIT License β you may use, modify, and distribute it.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support