Automated detection of π§ brain tumors from MRI scans using Convolutional Neural Networks.
A fast, reliable AI-powered second opinion for radiologists.
This project, developed by Jayan Gupta, focuses on the automated classification of Brain MRI scans using advanced Deep Learning techniques. The goal is to distinguish between brain scans that contain a Tumor and those that do not.
By leveraging Convolutional Neural Networks (CNNs), the system aims to provide a fast and reliable second opinion for radiologists β potentially accelerating the diagnostic process for critical medical conditions.
Input MRI Scan βββΆ Preprocessing βββΆ CNN Model βββΆ Tumor / No Tumor
| Feature | Description |
|---|---|
| π§ Deep Learning Pipeline | End-to-end implementation from data preprocessing to model evaluation |
| ποΈ Multiple Architectures | Evaluation of 3 different CNN models for performance comparison |
| π Image Augmentation | Techniques applied to improve generalization on smaller datasets |
| π Clear Visualization | Tools for viewing MRI scans and understanding model predictions |
| β‘ Fast Inference | Optimized pipeline for rapid scan classification |
| π Comprehensive Metrics | Accuracy, precision, recall, F1-score, and confusion matrices |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BRAIN MRI CLASSIFICATION PIPELINE β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β RAW MRI DATA βββββββΆβ PREPROCESSING βββββββΆβ AUGMENTED β
β β β β’ Resize β β DATASET β
β yes/ (tumor) β β β’ Normalize β β β
β no/ (healthy)β β β’ Split 80/20 β β Flip, Zoom β
βββββββββββββββββββ βββββββββββββββββββ β Rotate, ... β
ββββββββ¬ββββββββ
β
ββββββββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββ
β CNN ARCHITECTURES β
β ββββββββββββββββββββ β
β β Model A: CNN β β
β ββββββββββββββββββββ β
β ββββββββββββββββββββ β
β β Model B: CNN β β
β ββββββββββββββββββββ β
β ββββββββββββββββββββ β
β β Model C: CNN β β
β ββββββββββββββββββββ β
ββββββββββββ¬ββββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β CLASSIFICATION β
β β
Tumor Detected β
β β
No Tumor Found β
ββββββββββββββββββββββββ
The dataset is organized into two primary categories:
MRI/
βββ π yes/ # MRI scans WITH diagnosed tumors
β βββ Y1.jpg
β βββ Y2.jpg
β βββ ...
β
βββ π no/ # Healthy brains β NO tumor detected
βββ no1.jpg
βββ no2.jpg
βββ ...
π Google Colab Users: Mount your Drive and point to
/content/drive/MyDrive/MRI/MRI/
Tumor (yes/) βββββββββββββββββββββββ ~60%
Healthy (no/) βββββββββββββββββββββββ ~40%
git clone https://github.com/your-username/brain-mri-tumor-classifier.git
cd brain-mri-tumor-classifierpip install tensorflow numpy pandas matplotlib seaborn \
opencv-python pillow scikit-learnOr install from requirements (recommended):
pip install -r requirements.txtPlace your MRI dataset in the following structure:
MRI/
βββ yes/ β tumor scans
βββ no/ β healthy scans
jupyter notebook Jayan_Gupta_project.ipynbπ Or open directly in Google Colab β just mount your Drive and run all cells.
Three CNN architectures were trained and evaluated. Key metrics include:
| Metric | Description |
|---|---|
| Accuracy | Overall correct predictions |
| Precision | Positive predictive value |
| Recall | Sensitivity β catches true tumors |
| F1-Score | Harmonic mean of precision & recall |
| AUC-ROC | Area under the receiver operating curve |
π Detailed results and confusion matrices are available inside the notebook.
β οΈ Important NoticeThis tool is intended for research and educational purposes only.
It should not be used as a primary diagnostic tool.
Always consult with a qualified medical professional for any health concerns.