Instructions to use princedex/brain-tumor-detection-system with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use princedex/brain-tumor-detection-system with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://princedex/brain-tumor-detection-system") - Notebooks
- Google Colab
- Kaggle
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
NeuroScan AI - Brain Tumor Detection System
An AI-powered brain tumor detection and classification system built using Deep Learning and Medical Imaging as a Final Year Project.
Overview
This system classifies brain MRI scans into four categories:
- Glioma Tumor
- Meningioma Tumor
- Pituitary Tumor
- No Tumor
Model
- Architecture: EfficientNetV2-B0 with Transfer Learning
- Strategy: Two-phase training (head training + fine-tuning)
- Explainability: Grad-CAM heatmap visualization
- Parameters: ~7.1 Million
- Framework: TensorFlow 2.x / Keras
Results
| Metric | Value |
|---|---|
| Test Accuracy | 71.57% |
| Validation Accuracy | 82.20% |
| AUC-ROC | 0.8928 |
| No Tumor Sensitivity | 90.48% |
| Glioma Sensitivity | 39.00% |
Model Comparison
| Metric | EfficientNetV2 | ResNet50 |
|---|---|---|
| Test Accuracy | 71.57% | 76.90% |
| Val Accuracy | 82.20% | 89.70% |
| AUC-ROC | 0.8928 | 0.9392 |
| Parameters | ~7.1M | ~25.6M |
| Glioma Sensitivity | 39.00% | 29.00% |
How to Run
1. Clone the repository
git clone https://github.com/YOUR_USERNAME/neuroscan-ai.git
cd neuroscan-ai
2. Install dependencies
pip install -r requirements.txt
3. Download the dataset
Download the Kaggle Brain MRI Dataset from: https://www.kaggle.com/datasets/sartajbhuvaji/brain-tumor-classification-mri and place it in the archive/ folder.
4. Run the web app
streamlit run streamlit_app.py
Project Structure
neuroscan-ai/
βββ streamlit_app.py # Web application
βββ BTP.ipynb # Training notebook
βββ best_model_v2_phase2.keras # Trained model weights
βββ requirements.txt # Dependencies
βββ static/uploads/ # Temporary upload folder
βββ archive/ # Dataset (not included)
βββ Training/
βββ Testing/
Features
- Multi-class brain tumor classification
- Grad-CAM visual explainability
- Per-class Sensitivity & Specificity reporting
- EfficientNetV2 vs ResNet50 comparison
- Interactive Streamlit web interface
Disclaimer
This system is a research prototype for academic purposes only. It is not intended for clinical use and must not replace professional medical diagnosis.
Developer
- Name: Stephen Ifeanyi
- Brand: Princedex
- Email: ifeanyistephen003@gmail.com
Dataset
Chakrabarty, N. (2021). Brain MRI Images for Brain Tumor Detection. Kaggle. https://www.kaggle.com/datasets/sartajbhuvaji/brain-tumor-classification-mri
- Downloads last month
- 5