This project presents a deep learning–based system for automated brain tumor detection and classification from 2D brain MRI images. The model determines whether a tumor is present and, if so, identifies the tumor type. The work emphasizes methodological rigor, proper dataset handling, and reliable evaluation suitable for research and academic review.
The model performs multi-class classification with the following categories:
- Glioma
- Meningioma
- Pituitary tumor
- No tumor
This project uses a publicly available 2D brain MRI dataset sourced from Kaggle.
All images are pre-extracted 2D slices, eliminating the need for volumetric processing or slice generation.
- Imaging modality: Brain MRI (2D)
- Image format: JPEG/PNG
- Balanced class distribution across four categories
- Labeled and pre-processed for supervised learning
The dataset is commonly used in academic benchmarking and provides a reliable foundation for evaluating multi-class brain tumor classification models.
- Images are resized and normalized to ensure consistency across samples
- Data is split into training, validation, and test sets
- Class balance is preserved across splits
- No data augmentation techniques that could introduce label leakage are applied during testing
Two modeling strategies are implemented:
A custom CNN designed specifically for brain MRI classification.
This approach learns features directly from the dataset without pretrained priors.
A pretrained ResNet-18 architecture fine-tuned on the MRI dataset.
Transfer learning significantly improves convergence speed and final classification performance.
- Framework: PyTorch
- Device: CPU
- Loss Function: Cross-Entropy Loss
- Optimizer: Adaptive gradient-based optimizer
- Early stopping based on validation accuracy
Performance is evaluated using:
- Accuracy
- Precision
- Recall
- F1-score
- Confusion matrix analysis
All metrics are reported on a strictly held-out test set.
- Test accuracy consistently between 94% and 98%
- Strong class-wise performance across all tumor types
- Final test accuracy: 98.98%
- Near-perfect precision and recall across all classes
- Minimal inter-class confusion observed
- Deterministic training with fixed random seeds
- Clear separation of training, validation, and test data
- Model weights excluded from version control
- Fully reproducible training and evaluation scripts
This project is intended solely for research and educational purposes.
It is not a clinical diagnostic system and must not be used in medical decision-making.
- Evaluation on multi-institutional datasets
- Extension to 3D volumetric MRI classification
- Tumor segmentation and localization
- Model explainability and interpretability analysis
All results are experimental and reflect performance on a specific public dataset.
Clinical applicability requires extensive validation and regulatory approval.