An open API service indexing awesome lists of open source software.

https://github.com/arshdeepyadavofficial/brain-tumor-detection-and-classification

Enhanced MRI Brain Tumor Detection using a Hybrid Deep Learning + Machine Learning model. Combines MobileNetV2 & SVM to classify tumors (Glioma, Meningioma, Pituitary, No Tumor) from contrast MRI. Achieves ~93% accuracy via transfer learning & augmentation.
https://github.com/arshdeepyadavofficial/brain-tumor-detection-and-classification

brain-tumor cnn computer-science deep-learning grad-cam healthcare hybrid-model image-classification keras medical-diagnosis medical-imaging mobilenet-v2 mri-classification multi-class-classification svm tensorflow transfer-learning tumor-classification tumor-detection

Last synced: 3 months ago
JSON representation

Enhanced MRI Brain Tumor Detection using a Hybrid Deep Learning + Machine Learning model. Combines MobileNetV2 & SVM to classify tumors (Glioma, Meningioma, Pituitary, No Tumor) from contrast MRI. Achieves ~93% accuracy via transfer learning & augmentation.

Awesome Lists containing this project

README

          

# ๐Ÿง  ENHANCED MRI BRAIN TUMOR DETECTION AND CLASSIFICATION USING HYBRID APPROACH

[![Last Commit](https://img.shields.io/github/last-commit/arshdeepyadavofficial/Brain-Tumor-Detection-And-Classification.svg)](https://github.com/arshdeepyadavofficial/Brain-Tumor-Detection-And-Classification/commits/)
[![Jupyter Notebook](https://img.shields.io/badge/Jupyter-Notebook-orange?logo=jupyter)](https://jupyter.org/)
[![Python](https://img.shields.io/badge/Python-3.x-blue?logo=python)](https://www.python.org/)


[![Markdown](https://img.shields.io/badge/Markdown-000000?logo=markdown&logoColor=white)](https://commonmark.org/help/)

This project presents a deep learning-based hybrid approach for the **automatic detection and classification of brain tumors** using **contrast-enhanced MRI scans**. The system classifies MRI images into four categories: **Glioma**, **Meningioma**, **Pituitary**, and **No Tumor**. The model achieves outstanding performance with a classification accuracy of **~99%**, validated through **cross-validation** and **AUC-ROC** metrics.

๐Ÿ“ฉ **Want the research paper?**
Feel free to reach out at: **2208390100017@reck.ac.in**

---

## ๐Ÿ“‚ Dataset Information

The MRI dataset used in this project was sourced from **Kaggle**:

๐Ÿ”— [Brain Tumor MRI Dataset (Kaggle)](https://www.kaggle.com/datasets/navoneel/brain-mri-images-for-brain-tumor-detection)

### ๐Ÿ“Š Dataset Summary

| Class | Number of Images | Training Set | Testing Set |
| ---------- | ---------------- | ------------ | ----------- |
| Glioma | 1621 | 1321 | 300 |
| Meningioma | 1656 | 1339 | 306 |
| Pituitary | 1757 | 1457 | 300 |
| No Tumor | 2000 | 1595 | 405 |
| **Total** | **7023** | **5712** | **1311** |

---

## ๐Ÿง  How It Works

This project implements an automated brain tumor detection and classification system using a **hybrid deep learningโ€“machine learning** approach. The key stages are:

### ๐Ÿ”„ Preprocessing
- **Noise Reduction:** Gaussian filtering
- **Normalization:** Intensity scaling
- **Enhancement:** Contrast, brightness
- **Inversion & Resizing:** To 299ร—299
- **Augmentation:** Rotation, shear, zoom

### ๐Ÿ“ฅ Feature Extraction
- **Model:** MobileNetV2 (pre-trained on ImageNet)
- **Purpose:** Extract high-level visual features via transfer learning

### ๐Ÿงฎ Classification
- **Classifier:** SVM with linear kernel
- **Classes:** Glioma, Meningioma, Pituitary, No Tumor

### ๐Ÿ” Interpretability
- **Grad-CAM:** Heatmaps for tumor region localization

### ๐Ÿ“ˆ Evaluation
- **Metrics:** Accuracy, Precision, Recall, F1-score, Confusion Matrix
- **Results:** ~93% accuracy

---

### ๐Ÿงฉ Model Visualization

A visual summary of the pipeline and model flow:

![Model Visualization](visualselection.png)

---

## ๐Ÿ“ˆ Performance Metrics

* โœ… **Accuracy**: ~93%
* ๐Ÿงฎ **Loss**: Converges quickly, minimal overfitting
* ๐Ÿ“Œ **AUC-ROC**: High discriminatory power across all tumor types

### ๐Ÿ“Š Classification Results:

![Confusion Matrix and Classification Report](confusion_classification.jpg)

---

## ๐Ÿงช Cross-Validation

The model was evaluated using **5-fold cross-validation** to ensure its stability and reliability across different data splits. Results showed consistent performance with minimal deviation across folds.

---

## ๐Ÿ” Example Predictions

| MRI Sample | Prediction |
| ---------------------------------- | --------------- |
| ![Glioma](predic_glioma.png) | Glioma Tumor |
| ![No Tumor](predic_notumor.png) | No Tumor |
| ![Pituitary](predic_pituitory.png) | Pituitary Tumor |

Additional samples with enhanced features:
![Enhanced Sample View](get_samples_with_enhancement.png)

---

## ๐Ÿง  Dependencies

To run this project, install the following Python libraries:

```bash
pip install tensorflow keras matplotlib scikit-learn numpy opencv-python
````
```bash
pip install -r requirements.txt
````

---

## ๐Ÿš€ Getting Started

To reproduce the results:

1. Clone this repository:

```bash
git clone https://github.com/arshdeep-yadav/Brain-Tumor-Detection-Hybrid-Approach.git
cd Brain-Tumor-Detection-Hybrid-Approach
```

2. Download the dataset from Kaggle:
๐Ÿ‘‰ [Download MRI Dataset](https://www.kaggle.com/datasets/navoneel/brain-mri-images-for-brain-tumor-detection)

3. Activate your environment and run the notebook:

```bash
jupyter notebook brain-tumor-mri-accuracy-99-auc-roc-cv.ipynb
```

---

## ๐Ÿ“œ Citations

Please consider citing the following sources if you use this work in your research:

> **[Arshdeep Yadav](https://github.com/arshdeepyadavofficial)**,

> C.S.E; B.Tech 3rd Year,

> REC Kannauj

> Navoneel Chakrabarty. *Brain MRI Dataset*, [Kaggle](https://www.kaggle.com/datasets/navoneel/brain-mri-images-for-brain-tumor-detection)

> Chollet, Franรงois. *Deep Learning with Python*. Manning Publications, 2018.

---

## ๐Ÿ“Œ Future Work

* [ ] Deploy the model via Streamlit or Flask
* [ ] Integrate Grad-CAM for visual explanations
* [ ] Real-time MRI scan classification interface

---

## ๐Ÿ‘จโ€๐Ÿ’ป Author

Developed with ๐Ÿ–ค by **Arshdeep Yadav**

๐ŸŽ“ CSE B.Tech 3rd Year

๐Ÿซ Rajkiya Engineering College, Kannauj

๐ŸŒ Connect with me:

* [GitHub](https://github.com/arshdeepyadavofficial)
* [LinkedIn](https://www.linkedin.com/in/arshdeep-yadav-827aa1257?utm_source=share&utm_campaign=share_via&utm_content=profile&utm_medium=android_app)

---

## ๐Ÿ“„ License

This project is licensed under the [MIT License](LICENSE).
Feel free to use, modify, and share it with proper attribution.