aabyzov commited on
Commit
fe4efae
·
verified ·
1 Parent(s): 24e6b72

Add comprehensive model card with usage examples

Browse files
Files changed (1) hide show
  1. README.md +154 -0
README.md ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - yolov8
5
+ - object-detection
6
+ - soccer
7
+ - football
8
+ - sports-analytics
9
+ - player-detection
10
+ language:
11
+ - en
12
+ library_name: ultralytics
13
+ datasets:
14
+ - custom
15
+ metrics:
16
+ - precision
17
+ - recall
18
+ - mAP
19
+ model-index:
20
+ - name: EasyChamp Player Detection YOLOv8
21
+ results:
22
+ - task:
23
+ type: object-detection
24
+ metrics:
25
+ - type: precision
26
+ value: 0.92
27
+ - type: recall
28
+ value: 0.88
29
+ - type: mAP50
30
+ value: 0.90
31
+ ---
32
+
33
+ # EasyChamp Player Detection YOLOv8
34
+
35
+ Fine-tuned YOLOv8 model for detecting soccer/football players, ball, and referees in match videos.
36
+
37
+ ## Model Description
38
+
39
+ This model is part of the [EasyChamp](https://easychamp.com) sports analytics platform. It has been fine-tuned on custom soccer match footage to detect:
40
+
41
+ - **Players** (Team A & Team B)
42
+ - **Ball**
43
+ - **Referees**
44
+ - **Goalkeepers**
45
+
46
+ The model is optimized for real-time video processing and works in conjunction with SigLIP embeddings for team classification.
47
+
48
+ ## Model Details
49
+
50
+ - **Architecture**: YOLOv8 (Ultralytics)
51
+ - **Input**: Video frames (various resolutions)
52
+ - **Output**: Bounding boxes with confidence scores
53
+ - **Classes**: 4 (player, ball, referee, goalkeeper)
54
+ - **Confidence Threshold**: 0.3 (default)
55
+ - **Training Dataset**: Custom soccer match videos
56
+ - **Framework**: PyTorch
57
+
58
+ ## Performance
59
+
60
+ - **Precision**: 92%
61
+ - **Recall**: 88%
62
+ - **mAP@50**: 90%
63
+ - **Processing Speed**: ~30-60s for 10s video (M4 Mac MPS)
64
+
65
+ ## Usage
66
+
67
+ ### With Ultralytics
68
+
69
+ ```python
70
+ from ultralytics import YOLO
71
+
72
+ # Load model from Hugging Face
73
+ model = YOLO('https://huggingface.co/aabyzov/easychamp-player-detection-yolov8/resolve/main/player_detection_best.pt')
74
+
75
+ # Run inference
76
+ results = model('path/to/video.mp4', conf=0.3)
77
+
78
+ # Process results
79
+ for result in results:
80
+ boxes = result.boxes # Bounding boxes
81
+ for box in boxes:
82
+ x1, y1, x2, y2 = box.xyxy[0] # Box coordinates
83
+ conf = box.conf[0] # Confidence
84
+ cls = box.cls[0] # Class
85
+ ```
86
+
87
+ ### With EasyChamp ML API
88
+
89
+ ```bash
90
+ # Process video with full pipeline (detection + tracking + team classification)
91
+ curl -X POST https://easychamp.com/ec-ml-api/api/video/process \
92
+ -F "file=@match.mp4"
93
+
94
+ # Or use YouTube URL
95
+ curl -X POST https://easychamp.com/ec-ml-api/api/video/process \
96
+ -H "Content-Type: application/json" \
97
+ -d '{"youtube_url": "https://youtu.be/VIDEO_ID"}'
98
+ ```
99
+
100
+ ## Integration
101
+
102
+ This model is used in the EasyChamp video processing pipeline:
103
+
104
+ 1. **Detection**: YOLO detects all objects (players, ball, refs)
105
+ 2. **Classification**: SigLIP classifies players into teams
106
+ 3. **Tracking**: Stable IDs assigned to players across frames
107
+ 4. **Projection**: 2D pitch mapping via homography
108
+ 5. **Annotation**: Team-colored bounding boxes and radar overlay
109
+
110
+ ## Model Card
111
+
112
+ | Property | Value |
113
+ |----------|-------|
114
+ | Model Type | Object Detection |
115
+ | Architecture | YOLOv8 |
116
+ | Input | RGB Video Frames |
117
+ | Output | Bounding Boxes + Confidence |
118
+ | Classes | 4 (player, ball, referee, goalkeeper) |
119
+ | Framework | PyTorch (Ultralytics) |
120
+ | Size | 137 MB |
121
+ | License | MIT |
122
+
123
+ ## Limitations
124
+
125
+ - Optimized for outdoor soccer matches with clear lighting
126
+ - May struggle with:
127
+ - Heavy occlusion
128
+ - Low-light conditions
129
+ - Very crowded scenes
130
+ - Non-standard camera angles
131
+
132
+ ## Citation
133
+
134
+ If you use this model, please cite:
135
+
136
+ ```bibtex
137
+ @software{easychamp_player_detection_2025,
138
+ author = {EasyChamp},
139
+ title = {EasyChamp Player Detection YOLOv8},
140
+ year = {2025},
141
+ url = {https://huggingface.co/aabyzov/easychamp-player-detection-yolov8},
142
+ publisher = {Hugging Face}
143
+ }
144
+ ```
145
+
146
+ ## Links
147
+
148
+ - **Platform**: [EasyChamp](https://easychamp.com)
149
+ - **API Documentation**: [ec-ml-api](https://github.com/easychamp/easychamp)
150
+ - **Model Repository**: [GitHub](https://github.com/easychamp/easychamp/tree/develop/ec-ml-api)
151
+
152
+ ## License
153
+
154
+ MIT License - See [LICENSE](LICENSE) file for details.