| --- |
| title: Brain Tumor MRI Classifier |
| emoji: 🔥 |
| colorFrom: purple |
| colorTo: purple |
| sdk: gradio |
| sdk_version: 6.14.0 |
| python_version: '3.13' |
| app_file: app.py |
| pinned: false |
| license: mit |
| short_description: Brain tumor MRI 4-class classifier with patient-level split |
| --- |
| # Brain Tumor MRI Classifier |
|
|
| A 4-class brain tumor classifier built with EfficientNet-B3, trained with rigorous patient-level data splitting. |
|
|
| **Test accuracy:** 95.05% (TTA) on 687 unseen patients |
| **Macro AUC:** 0.9965 |
| **Patient leakage:** 0 (verified by set intersection) |
|
|
| This demo lets you upload a brain MRI and see: |
| - Which of 4 classes the model predicts (glioma, meningioma, no tumor, pituitary) |
| - Confidence percentages for all 4 classes |
| - A Grad-CAM heatmap showing where the model focused |
|
|
| ## ⚠️ Medical Disclaimer |
|
|
| This is a portfolio/research demonstration. It must NOT be used for any medical decision-making. The model has not been validated in a clinical setting and has not been reviewed by radiologists. |
|
|
| ## Why this project is different |
|
|
| Most public brain tumor classifiers use image-level random splits, which leak patient information between train and test sets. This project uses **patient-level splitting** — no patient's MRI appears in more than one split. The 95.05% accuracy is honest, not inflated. |
|
|
| ## Built with |
|
|
| - PyTorch + timm (EfficientNet-B3) |
| - pytorch-grad-cam for interpretability |
| - Gradio for the web interface |
|
|
| ## Author |
|
|
| **Tanishq Arya** — [GitHub](https://github.com/Tanishqarya17) |
|
|
| Full project details, training code, and analysis on the |
| [GitHub repository](https://github.com/Tanishqarya17/Brain-Tumor-MRI-Classifier). |
|
|