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

https://github.com/raghavendra317/brain-tumor-detection

A deep learning-based project for classifying brain MRI images into Glioma, Meningioma, No Tumor, and Pituitary Tumor using Convolutional Neural Networks (CNNs). This project aims to assist in early tumor detection, improving diagnostic accuracy and healthcare outcomes.
https://github.com/raghavendra317/brain-tumor-detection

cnn-classification keras numpy opencv scikit-learn tensorflow

Last synced: 3 months ago
JSON representation

A deep learning-based project for classifying brain MRI images into Glioma, Meningioma, No Tumor, and Pituitary Tumor using Convolutional Neural Networks (CNNs). This project aims to assist in early tumor detection, improving diagnostic accuracy and healthcare outcomes.

Awesome Lists containing this project

README

          

# 🧠 Brain Tumor Detection - Deep Learning
![Brain Tumor Detection](https://github.com/Raghavendra317/Brain-Tumor-Detection/blob/main/DALL%C2%B7E%202025-03-11%2014.14.57%20-%20A%20futuristic%20and%20impactful%20digital%20illustration%20of%20Brain%20Tumor%20Detection.%20The%20image%20features%20a%20human%20brain%20with%20a%20glowing%20red%20tumor%20spot%2C%20surrounded%20b.webp)

### 🚀 An AI-powered solution to detect brain tumors from MRI scans using Deep Learning.

---

## 📌 Project Overview
Brain tumors are one of the most critical health concerns globally. Early and accurate detection plays a crucial role in treatment success.
This project uses **Deep Learning (CNN)** to classify MRI scans into **four tumor types**, improving diagnosis efficiency and assisting medical professionals.

---

## 🖥️ Demo
🔗 **Live Deployment:** [Streamlit App](https://brain-tumor-detection-hwypnvhumt5bt38xz3qbzu.streamlit.app/)

Upload an MRI scan and let the model predict whether a tumor is present.

---
## ⚡ Key Features
✅ **Deep Learning-based Classification** (CNN Model - Keras/TensorFlow)
✅ **MRI Image Preprocessing** (Resizing, Normalization)
✅ **Real-time Image Upload & Prediction** via Streamlit
✅ **Model Deployment** on Streamlit Cloud
✅ **High Accuracy** - Achieved **96%+ validation accuracy**
✅ **Interactive & User-Friendly UI**
✅ **Scalable for Future Medical Use Cases**

---

## 📊 Dataset
- The dataset consists of MRI brain scans categorized into four classes: **Glioma, Meningioma, Pituitary, and No Tumor**.
- **Preprocessing techniques applied**:
- Image resizing to **150x150 pixels**
- **Normalization** (pixel values scaled between 0 and 1)
- **Data Augmentation** (rotation, flipping, brightness adjustments)
- **Dataset Split**:
- **80%** Training
- **10%** Validation
- **10%** Testing

---

## 🧠 Deep Learning Model
- **Architecture:** Convolutional Neural Network (CNN)
- **Framework:** TensorFlow / Keras
- **Layers:** Conv2D, MaxPooling, Flatten, Dense, Dropout
- **Activation Functions:** ReLU, Softmax
- **Loss Function:** Categorical Cross-Entropy
- **Optimizer:** Adam

### 📈 Model Performance
- **Training Accuracy:** 98.7%
- **Validation Accuracy:** 96.2%
- **Loss:** 0.09

**Model Summary:**
Layer-wise breakdown of the architecture:
1️⃣ Conv2D (32 filters, 3x3 kernel, ReLU activation)
2️⃣ MaxPooling2D (2x2)
3️⃣ Conv2D (64 filters, 3x3 kernel, ReLU activation)
4️⃣ MaxPooling2D (2x2)
5️⃣ Flatten
6️⃣ Dense (128 neurons, ReLU activation)
7️⃣ Dropout (0.5)
8️⃣ Output Layer (Softmax activation)

---

## 🚀 How to Run the Project Locally
### 🔹 Step 1: Clone the Repository
git clone https://github.com/Raghavendra317/Brain-Tumor-Detection.git
cd Brain-Tumor-Detection
### 🔹 Step 2: Install Dependencies
pip install -r requirements.txt
### 🔹 Step 3: Run the Streamlit App
streamlit run app.py

---

## 📸 Screenshots
### 🔹 Web App Interface
![App Screenshot](https://github.com/Raghavendra317/Brain-Tumor-Detection/blob/main/Screenshot%20(157).png)

### 🔹 Sample Predictions
![Predictions Screenshot](https://github.com/Raghavendra317/Brain-Tumor-Detection/blob/main/Screenshot%20(158).png)

---

## 📞 Contact
👤 **Raghavendra S**
📧 **[raaghu07012003@gmail.com]**
🔗 **[LinkedIn](www.linkedin.com/in/raghavendra-s-270857314)**
🔗 **[GitHub](https://github.com/Raghavendra317)**

--

**✨ If you found this project useful, please ⭐ star the repository! ✨**

🚀 **Happy Coding!** 🚀