Overview
In this project, I developed a deep learning system that detects tumor presence from brain MRI images and segments the tumor region at pixel level. The system performs both classification (tumor present/absent and type) and segmentation (where exactly the tumor is).
Model Architecture
A two-stage approach:
Stage 1: Classification (Ensemble)
- CNN: Custom architecture trained from scratch
- VGG16: Fine-tuned via transfer learning from ImageNet weights
- Ensemble: Combining predictions from both models with soft voting
- Result: 99% classification accuracy
Stage 2: Segmentation (U-Net)
- U-Net architecture for images where tumor is detected
- Pixel-level tumor masking with encoder-decoder structure
Decision Explainability
The biggest problem in medical AI: failing to answer "what did the model look at to make this decision?" Therefore, I visualized the regions the model focuses on with Grad-CAM. Doctors can now see which region of the image the model looked at when making a tumor prediction.
Web Interface
The user (doctor or researcher) uploads the MRI image → the system analyzes instantly → presents results visually:
- Classification prediction and confidence score
- Segmentation mask
- Grad-CAM heatmap
Dataset and Training
Trained on open medical image datasets. Augmentation and weighted loss used to combat class imbalance.
