Upload folder using huggingface_hub
Browse files- .DS_Store +0 -0
- README.md +95 -6
- best.onnx +3 -0
- best.pt +3 -0
- config.yaml +92 -0
- metrics.json +16 -0
.DS_Store
ADDED
|
Binary file (10.2 kB). View file
|
|
|
README.md
CHANGED
|
@@ -1,7 +1,96 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
-
|
| 5 |
-
|
| 6 |
-
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- pose-estimation
|
| 5 |
+
- yolo
|
| 6 |
+
- sports-analysis
|
| 7 |
+
- biomechanics
|
| 8 |
+
- computer-vision
|
| 9 |
+
license: apache-2.0
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Custom YOLO Pose Estimation for Sprint Analysis
|
| 13 |
+
|
| 14 |
+
## Overview
|
| 15 |
+
This repository contains a **custom-trained YOLO pose estimation model** designed specifically for **athletic movement analysis**, with a focus on **sprint biomechanics and stride detection**.
|
| 16 |
+
|
| 17 |
+
The model extends the **COCO 17-keypoint schema** and applies **temporal smoothing** during inference for slow-motion footage. It is optimized for **single-person side-view videos**.
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## Model Details
|
| 22 |
+
|
| 23 |
+
- **Framework:** Ultralytics YOLOv11 Pose
|
| 24 |
+
- **Model variant:** yolo11n-pose
|
| 25 |
+
- **Input size:** 640×640
|
| 26 |
+
- **Training epochs:** 100
|
| 27 |
+
- **Device:** CPU
|
| 28 |
+
- **Precision:** FP32
|
| 29 |
+
- **Pretrained:** Yes
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## Key Features
|
| 34 |
+
|
| 35 |
+
- Side-view sprint video optimized
|
| 36 |
+
- Slow-motion analysis
|
| 37 |
+
- Single-person assumption
|
| 38 |
+
- Temporal smoothing compatible
|
| 39 |
+
- Exportable to **ONNX** and **TorchScript**
|
| 40 |
+
|
| 41 |
+
---
|
| 42 |
+
|
| 43 |
+
## Performance Metrics
|
| 44 |
+
|
| 45 |
+
Metrics computed on **side-view slow-motion sprint clips**:
|
| 46 |
+
|
| 47 |
+
```json
|
| 48 |
+
{
|
| 49 |
+
"detection_metrics": {
|
| 50 |
+
"precision": 0.995,
|
| 51 |
+
"recall": 0.952,
|
| 52 |
+
"mAP50": 0.979,
|
| 53 |
+
"mAP50-95": 0.938
|
| 54 |
+
},
|
| 55 |
+
"pose_metrics": {
|
| 56 |
+
"precision": 0.500,
|
| 57 |
+
"recall": 0.488,
|
| 58 |
+
"mAP50": 0.493,
|
| 59 |
+
"mAP50-95": 0.457
|
| 60 |
+
},
|
| 61 |
+
"epochs": 100
|
| 62 |
+
}
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
---
|
| 66 |
+
|
| 67 |
+
## Usage
|
| 68 |
+
|
| 69 |
+
```python
|
| 70 |
+
from ultralytics import YOLO
|
| 71 |
+
|
| 72 |
+
model = YOLO("best.pt")
|
| 73 |
+
results = model.predict("input_video.mp4", conf=0.25, iou=0.7)
|
| 74 |
+
results.show()
|
| 75 |
+
results.save("output_video.mp4")
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## Citation
|
| 81 |
+
|
| 82 |
+
```bibtex
|
| 83 |
+
@misc{mehdid2026yolopose,
|
| 84 |
+
title={Custom YOLO Pose Estimation for Sprint Analysis},
|
| 85 |
+
author={Mehdid, Samy Abderraouf},
|
| 86 |
+
year={2026}
|
| 87 |
+
}
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
---
|
| 91 |
+
|
| 92 |
+
## License
|
| 93 |
+
|
| 94 |
+
```mit
|
| 95 |
+
This project is licensed under the MIT License.
|
| 96 |
+
```
|
best.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:05bbb32a09e7e74d334e1149f5ef409f4901b49ba7d64582f6469b0ba73ea0be
|
| 3 |
+
size 11854983
|
best.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:244e6881215cdb0ba251d2100163aaf2f2f4942cf2acf118305a9756a20a7aa3
|
| 3 |
+
size 6048776
|
config.yaml
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
framework: ultralytics-yolo
|
| 3 |
+
task: pose-estimation
|
| 4 |
+
variant: yolo11n-pose
|
| 5 |
+
pretrained: true
|
| 6 |
+
input_size: [640, 640]
|
| 7 |
+
device: cpu
|
| 8 |
+
precision: fp32
|
| 9 |
+
|
| 10 |
+
keypoints:
|
| 11 |
+
schema: coco
|
| 12 |
+
count: 17
|
| 13 |
+
flip_indices:
|
| 14 |
+
- [1, 2]
|
| 15 |
+
- [3, 4]
|
| 16 |
+
- [5, 6]
|
| 17 |
+
- [7, 8]
|
| 18 |
+
- [9, 10]
|
| 19 |
+
- [11, 12]
|
| 20 |
+
- [13, 14]
|
| 21 |
+
- [15, 16]
|
| 22 |
+
|
| 23 |
+
training:
|
| 24 |
+
epochs: 100
|
| 25 |
+
batch_size: 16
|
| 26 |
+
optimizer: auto
|
| 27 |
+
initial_lr: 0.01
|
| 28 |
+
final_lr_factor: 0.01
|
| 29 |
+
momentum: 0.937
|
| 30 |
+
weight_decay: 0.0005
|
| 31 |
+
warmup_epochs: 3
|
| 32 |
+
loss_weights:
|
| 33 |
+
box: 7.5
|
| 34 |
+
pose: 12.0
|
| 35 |
+
keypoint_objectness: 1.0
|
| 36 |
+
classification: 0.5
|
| 37 |
+
dfl: 1.5
|
| 38 |
+
data_augmentation:
|
| 39 |
+
mosaic: 1.0
|
| 40 |
+
mixup: 0.0
|
| 41 |
+
cutmix: 0.0
|
| 42 |
+
horizontal_flip_prob: 0.5
|
| 43 |
+
vertical_flip_prob: 0.0
|
| 44 |
+
hsv:
|
| 45 |
+
h: 0.015
|
| 46 |
+
s: 0.7
|
| 47 |
+
v: 0.4
|
| 48 |
+
scale: 0.5
|
| 49 |
+
translate: 0.1
|
| 50 |
+
auto_augment: randaugment
|
| 51 |
+
erasing_prob: 0.4
|
| 52 |
+
deterministic: true
|
| 53 |
+
seed: 0
|
| 54 |
+
|
| 55 |
+
evaluation:
|
| 56 |
+
validation_split: val
|
| 57 |
+
metrics:
|
| 58 |
+
detection:
|
| 59 |
+
precision: 0.995
|
| 60 |
+
recall: 0.952
|
| 61 |
+
mAP50: 0.979
|
| 62 |
+
mAP50-95: 0.938
|
| 63 |
+
pose:
|
| 64 |
+
precision: 0.500
|
| 65 |
+
recall: 0.488
|
| 66 |
+
mAP50: 0.493
|
| 67 |
+
mAP50-95: 0.457
|
| 68 |
+
|
| 69 |
+
inference:
|
| 70 |
+
confidence_threshold: 0.25
|
| 71 |
+
iou_threshold: 0.7
|
| 72 |
+
max_detections: 300
|
| 73 |
+
single_person_assumption: true
|
| 74 |
+
temporal_smoothing: external
|
| 75 |
+
optimized_for:
|
| 76 |
+
- side-view footage
|
| 77 |
+
- slow-motion video
|
| 78 |
+
|
| 79 |
+
export:
|
| 80 |
+
supported_formats:
|
| 81 |
+
- torchscript
|
| 82 |
+
- onnx
|
| 83 |
+
simplify_onnx: true
|
| 84 |
+
|
| 85 |
+
notes:
|
| 86 |
+
use_case: sprint biomechanics and stride analysis
|
| 87 |
+
camera_view: side
|
| 88 |
+
video_type: slow-motion
|
| 89 |
+
limitations:
|
| 90 |
+
- Not optimized for frontal or oblique camera views
|
| 91 |
+
- Performance may degrade with heavy occlusion
|
| 92 |
+
- Single-athlete scenarios only
|
metrics.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"detection_metrics": {
|
| 3 |
+
"precision": 0.99505,
|
| 4 |
+
"recall": 0.95229,
|
| 5 |
+
"mAP50": 0.97915,
|
| 6 |
+
"mAP50-95": 0.93786
|
| 7 |
+
},
|
| 8 |
+
"pose_metrics": {
|
| 9 |
+
"precision": 0.5,
|
| 10 |
+
"recall": 0.48808,
|
| 11 |
+
"mAP50": 0.49316,
|
| 12 |
+
"mAP50-95": 0.45724
|
| 13 |
+
},
|
| 14 |
+
"epochs": 100,
|
| 15 |
+
"notes": "Metrics computed on side-view slow-motion single-person sprint clips."
|
| 16 |
+
}
|