CoolFace
Apppublic

muhammedpanchla/brain-tumor-detection

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
App README

๐Ÿง  Brain Tumor Detection System

Overview

This is a Flask-based web application for brain tumor detection using a VGG16 model (transfer learning), trained on brain MRI images. Upload an MRI scan (PNG, JPG, TIFF) to get a classification: glioma, meningioma, notumor, or pituitary, along with confidence score.

  • โ€”Model: VGG16 (Transfer Learning)
  • โ€”Framework: PyTorch
  • โ€”Task: Multi-class Classification of Brain Tumors
  • โ€”Dataset: Based on Brain Tumor MRI Dataset (inspired by Kaggle datasets)
  • โ€”Classes: Glioma, Meningioma, No Tumor, Pituitary
  • โ€”Metrics: From notebook: High accuracy on test set (update with actual values from your notebook, e.g., Accuracy: 98%, F1: 97%)

Features

  • โ€”Upload MRI images and get instant classification results
  • โ€”Displays predicted tumor type and confidence percentage
  • โ€”Simple, clean UI for medical/demo use
  • โ€”Disclaimer for educational use only

How to Use

  1. 1.Open the app
  2. 2.Upload a brain MRI image
  3. 3.Get prediction: Tumor type and confidence
  4. 4.View results in JSON or integrate with frontend JS for display

โš ๏ธ Disclaimer: This is for educational/research purposes only. Not for clinical use. Consult a medical professional for diagnoses.

Technical Details

  • โ€”Architecture: VGG16 with custom classifier (3 FC layers with dropout)
  • โ€”Input: 224x224 RGB images (resized)
  • โ€”Output: Class label + softmax confidence
  • โ€”Dependencies: See requirements.txt

From the notebook:

  • โ€”Training: Transfer learning from pretrained VGG16, fine-tuned on brain MRI dataset
  • โ€”Augmentation: Used transforms for robustness
  • โ€”Evaluation: Confusion matrix, accuracy, precision/recall on test set

Deployment on Hugging Face

This space uses Docker to run the Flask app.