Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -11,3 +11,63 @@ license: mit
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
14 |
+
|
15 |
+
# π§ Brain Tumor Detection using YOLOv8 π―
|
16 |
+
|
17 |
+
## π Overview
|
18 |
+
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.
|
19 |
+
|
20 |
+
πΉ **Built with:** `YOLOv8` | `Gradio` | `PyTorch` | `OpenCV`
|
21 |
+
πΉ **Live on Hugging Face Spaces!** β
|
22 |
+
|
23 |
+
## β¨ Features
|
24 |
+
βοΈ **Upload MRI scan images** π₯
|
25 |
+
βοΈ **YOLOv8-powered brain tumor detection** π§
|
26 |
+
βοΈ **Annotated image output with tumor detection** πΈ
|
27 |
+
βοΈ **Real-time diagnosis message** β³
|
28 |
+
βοΈ **Simple & intuitive UI powered by Gradio** π¨
|
29 |
+
|
30 |
+
---
|
31 |
+
|
32 |
+
## π How to Use
|
33 |
+
1οΈβ£ **Upload an MRI image** by clicking the "Upload MRI Image" button.
|
34 |
+
2οΈβ£ **Click "Submit"** to analyze the image.
|
35 |
+
3οΈβ£ **View the results**:
|
36 |
+
- The uploaded MRI image with **bounding boxes** (if a tumor is detected).
|
37 |
+
- A **diagnosis message** ("Tumor Detected" or "No Tumor Detected").
|
38 |
+
|
39 |
+
β
**No installation required!** Just visit the Hugging Face Space and start detecting brain tumors instantly.
|
40 |
+
|
41 |
+
---
|
42 |
+
|
43 |
+
## π Model Details
|
44 |
+
This app uses **YOLOv8**, an advanced object detection model fine-tuned for **brain tumor detection**.
|
45 |
+
- **Default model:** `yolov8n.pt` (Replace with `best.pt` for custom-trained model).
|
46 |
+
- **Bounding box output** with confidence score.
|
47 |
+
- **Fast & accurate inference** using PyTorch.
|
48 |
+
|
49 |
+
---
|
50 |
+
|
51 |
+
## π Deployment on Hugging Face Spaces
|
52 |
+
### **1οΈβ£ Create a New Hugging Face Space**
|
53 |
+
Go to **[Hugging Face Spaces](https://huggingface.co/spaces)** and create a new **Gradio** Space.
|
54 |
+
|
55 |
+
### **2οΈβ£ Upload the following files:**
|
56 |
+
- **`app.py`** (Main Gradio app)
|
57 |
+
- **`requirements.txt`** (Dependencies)
|
58 |
+
- **`model/best.pt`** (Your trained YOLOv8 model)
|
59 |
+
|
60 |
+
### **3οΈβ£ Run the Space!**
|
61 |
+
Hugging Face will **automatically install dependencies** and deploy the app.
|
62 |
+
|
63 |
+
---
|
64 |
+
|
65 |
+
## π Dependencies (Auto-installed in Hugging Face)
|
66 |
+
```text
|
67 |
+
gradio
|
68 |
+
torch
|
69 |
+
torchvision
|
70 |
+
ultralytics
|
71 |
+
opencv-python
|
72 |
+
numpy
|
73 |
+
|