luthrabhuvan's picture
Update README.md
917538d verified

A newer version of the Gradio SDK is available: 5.20.1

Upgrade
metadata
title: Brain Tumour Detection
emoji: πŸ¦€
colorFrom: gray
colorTo: red
sdk: gradio
sdk_version: 5.16.0
app_file: app.py
pinned: false
license: mit

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

🧠 Brain Tumor Detection using YOLOv8 🎯

πŸš€ Overview

This Hugging Face Space allows users to upload MRI scan images and detect the presence of a brain tumor using the YOLOv8 object detection model. The model processes the uploaded image and provides an annotated output indicating whether a tumor is detected.

πŸ”Ή Built with: YOLOv8 | Gradio | PyTorch | OpenCV
πŸ”Ή Live on Hugging Face Spaces! βœ…

✨ Features

βœ”οΈ Upload MRI scan images πŸ₯
βœ”οΈ YOLOv8-powered brain tumor detection 🧠
βœ”οΈ Annotated image output with tumor detection πŸ“Έ
βœ”οΈ Real-time diagnosis message ⏳
βœ”οΈ Simple & intuitive UI powered by Gradio 🎨


πŸ›  How to Use

1️⃣ Upload an MRI image by clicking the "Upload MRI Image" button.
2️⃣ Click "Submit" to analyze the image.
3️⃣ View the results:

  • The uploaded MRI image with bounding boxes (if a tumor is detected).
  • A diagnosis message ("Tumor Detected" or "No Tumor Detected").

βœ… No installation required! Just visit the Hugging Face Space and start detecting brain tumors instantly.


πŸ“ Model Details

This app uses YOLOv8, an advanced object detection model fine-tuned for brain tumor detection.

  • Default model: yolov8n.pt (Replace with best.pt for custom-trained model).
  • Bounding box output with confidence score.
  • Fast & accurate inference using PyTorch.

πŸ— Deployment on Hugging Face Spaces

1️⃣ Create a New Hugging Face Space

Go to Hugging Face Spaces and create a new Gradio Space.

2️⃣ Upload the following files:

  • app.py (Main Gradio app)
  • requirements.txt (Dependencies)
  • model/best.pt (Your trained YOLOv8 model)

3️⃣ Run the Space!

Hugging Face will automatically install dependencies and deploy the app.


πŸ“œ Dependencies (Auto-installed in Hugging Face)

gradio
torch
torchvision
ultralytics
opencv-python
numpy