Upload README.md
Browse files
README.md
CHANGED
|
@@ -1,26 +1,46 @@
|
|
| 1 |
-
|
| 2 |
-
tags:
|
| 3 |
-
- ml-intern
|
| 4 |
-
---
|
| 5 |
|
| 6 |
-
|
| 7 |
|
| 8 |
-
|
| 9 |
-
## Generated by ML Intern
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
## Usage
|
| 17 |
|
| 18 |
```python
|
| 19 |
-
from
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
| 24 |
```
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# Cursor Detection YOLOv8n
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
A YOLOv8n model trained to detect mouse cursors in screenshots and video frames.
|
| 4 |
|
| 5 |
+
## Training Details
|
|
|
|
| 6 |
|
| 7 |
+
- **Base Model:** YOLOv8n (3.2M parameters)
|
| 8 |
+
- **Training Data:** Synthetic dataset generated by compositing 366 different cursor types onto 1688 website screenshots
|
| 9 |
+
- **Dataset Size:** 500 train / 100 val / 50 test
|
| 10 |
+
- **Image Size:** 640x640
|
| 11 |
+
- **Epochs:** 30
|
| 12 |
+
- **Hardware:** NVIDIA T4 GPU
|
| 13 |
|
| 14 |
+
## Performance
|
| 15 |
+
|
| 16 |
+
| Metric | Value |
|
| 17 |
+
|--------|-------|
|
| 18 |
+
| mAP50 | 92.1% |
|
| 19 |
+
| mAP50-95 | 58.2% |
|
| 20 |
+
| Precision | 84.8% |
|
| 21 |
+
| Recall | 89.5% |
|
| 22 |
+
|
| 23 |
+
## Dataset Generation
|
| 24 |
+
|
| 25 |
+
The synthetic dataset was created by:
|
| 26 |
+
1. Loading cursor images from [Fraser/cursors](https://huggingface.co/datasets/Fraser/cursors) (366 cursor types with hotspot info)
|
| 27 |
+
2. Loading background screenshots from [naorm/website-screenshots](https://huggingface.co/datasets/naorm/website-screenshots)
|
| 28 |
+
3. Compositing cursors at random positions with alpha blending
|
| 29 |
+
4. Generating YOLO format bounding box labels
|
| 30 |
|
| 31 |
## Usage
|
| 32 |
|
| 33 |
```python
|
| 34 |
+
from ultralytics import YOLO
|
| 35 |
|
| 36 |
+
# Load model
|
| 37 |
+
model = YOLO("AdithyaSK/cursor-detection-yolov8n/best.pt")
|
| 38 |
+
|
| 39 |
+
# Detect cursor in an image
|
| 40 |
+
results = model("screenshot.jpg")
|
| 41 |
+
results[0].show()
|
| 42 |
```
|
| 43 |
|
| 44 |
+
## License
|
| 45 |
+
|
| 46 |
+
AGPL-3.0 (same as Ultralytics YOLOv8)
|