AdithyaSK HF Staff commited on
Commit
0d545ea
·
verified ·
1 Parent(s): 115e4da

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +35 -15
README.md CHANGED
@@ -1,26 +1,46 @@
1
- ---
2
- tags:
3
- - ml-intern
4
- ---
5
 
6
- # AdithyaSK/cursor-detection-yolov8n
7
 
8
- <!-- ml-intern-provenance -->
9
- ## Generated by ML Intern
10
 
11
- This model repository was generated by [ML Intern](https://github.com/huggingface/ml-intern), an agent for machine learning research and development on the Hugging Face Hub.
 
 
 
 
 
12
 
13
- - Try ML Intern: https://smolagents-ml-intern.hf.space
14
- - Source code: https://github.com/huggingface/ml-intern
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  ## Usage
17
 
18
  ```python
19
- from transformers import AutoModelForCausalLM, AutoTokenizer
20
 
21
- model_id = 'AdithyaSK/cursor-detection-yolov8n'
22
- tokenizer = AutoTokenizer.from_pretrained(model_id)
23
- model = AutoModelForCausalLM.from_pretrained(model_id)
 
 
 
24
  ```
25
 
26
- For non-causal architectures, replace `AutoModelForCausalLM` with the appropriate `AutoModel` class.
 
 
 
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)