An advanced deep learning system for automated brain tumor classification from MRI scans, achieving 96.89% accuracy.
- Dual Model Architecture
- Transfer Learning with Xception (96.89% accuracy)
- Custom CNN (95.65% accuracy)
- Interactive Web Interface
- Real-time predictions
- Saliency map visualization
- Confidence scores
- AI-Powered Explanations
- Medical context generation
- Region-specific analysis
The system classifies brain MRI scans into four categories with exceptional accuracy:
| Tumor Type | Description | Model Performance |
|---|---|---|
| Glioma | Most common malignant brain tumor | 97% accuracy |
| Meningioma | Usually benign, slow-growing | 90% accuracy |
| Pituitary | Occurs in pituitary gland | 99% accuracy |
| No Tumor | Healthy brain scan | 100% accuracy |
The project utilizes the Brain Tumor MRI Dataset from Kaggle:
- Size: 7,023 MRI images
- Resolution: High-quality .jpg format
- Distribution: Balanced across classes
- Augmentation: Applied for robust training
model = Sequential([
Xception(include_top=False, weights='imagenet'),
GlobalMaxPooling2D(),
Dropout(0.3),
Dense(128, activation='relu'),
Dropout(0.25),
Dense(4, activation='softmax')
])- 6 convolutional layers
- Batch normalization
- Skip connections
- Dropout regularization
Accuracy: 96.89%
Precision: 0.97
Recall: 0.96
F1-Score: 0.97
Accuracy: 95.65%
Precision: 0.96
Recall: 0.95
F1-Score: 0.96
# Clone repository
git clone https://github.com/sheicky/Brain_Tumor_AI.git
cd Brain_Tumor_AI
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # WindowsAccess via Browser
- Run the code on google colab
- Open
http://localhost:8501 - Upload MRI scan
- View predictions and analysis
- Upload: Drag & drop MRI scans
- Model Selection: Choose between Xception and Custom CNN
- Visualization:
- Saliency maps
- Confidence scores
- Region highlighting
- Analysis: AI-generated medical explanations
Our models achieve exceptional performance:
| Metric | Xception | Custom CNN |
|---|---|---|
| Accuracy | 96.89% | 95.65% |
| Precision | 0.97 | 0.96 |
| Recall | 0.96 | 0.95 |
| F1-Score | 0.97 | 0.96 |
Sheick - @sheicky
Project Link: https://github.com/sheicky/Brain_Tumor_AI


