https://github.com/ali-jaan-butt/brain_tumor_classification
Brain Tumor Detection using Deep Learning 🧠
https://github.com/ali-jaan-butt/brain_tumor_classification
brain-tumor-classification deep-learning images-classification opencv
Last synced: 3 months ago
JSON representation
Brain Tumor Detection using Deep Learning 🧠
- Host: GitHub
- URL: https://github.com/ali-jaan-butt/brain_tumor_classification
- Owner: Ali-Jaan-Butt
- License: mit
- Created: 2025-08-19T06:43:28.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-19T07:34:00.000Z (11 months ago)
- Last Synced: 2025-09-13T21:58:34.303Z (10 months ago)
- Topics: brain-tumor-classification, deep-learning, images-classification, opencv
- Language: Jupyter Notebook
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Brain Tumor Detection using Deep Learning 🧠
This project focuses on detecting **brain tumors from MRI images** using **Convolutional Neural Networks (CNNs)** with **transfer learning (ResNet50)**. The notebook includes preprocessing, model training, and evaluation steps to classify MRI scans as **tumor** or **non-tumor**.
---
## 📂 Dataset
The dataset used is [Brain MRI Images for Brain Tumor Detection](https://www.kaggle.com/datasets/navoneel/brain-mri-images-for-brain-tumor-detection) available on Kaggle.
- Images are categorized into **two classes**:
- `Yes` → MRI showing brain tumor
- `No` → MRI without tumor
---
## ⚙️ Workflow
The notebook follows these main steps:
1. **Import Libraries**
Uses `numpy`, `pandas`, `matplotlib`, `seaborn`, `opencv`, `tensorflow/keras`.
2. **Data Preprocessing**
- Load images and labels
- Split into train and test sets (80/20)
- Image normalization and augmentation
3. **Model Architecture**
- Based on **ResNet50** with additional Dense and Dropout layers
- Activation: ReLU, Softmax
- Optimizer: Adam
4. **Training**
- Early stopping used to prevent overfitting
- Data augmentation applied via `ImageDataGenerator`
5. **Evaluation**
- Accuracy, Confusion Matrix, and Classification Report
---
## 📊 Results
- Achieved **high classification accuracy** on test data
- Clear distinction between tumor and non-tumor cases
- Visualized performance using plots and confusion matrix
---
## 🚀 Requirements
Make sure you have the following installed:
```bash
pip install numpy pandas matplotlib seaborn opencv-python tensorflow pillow scikit-learn