A YOLOv8x object-detection model fine-tuned to detect the four key entities in football (soccer) broadcast footage: ball, goalkeeper, player, referee. It is the detection backbone of a football-analysis pipeline...
Source du modèle
Description de la source
football_yolo-2)A YOLOv8x object-detection model fine-tuned to detect the four key entities in football (soccer) broadcast footage: ball, goalkeeper, player, referee. It is the detection backbone of a football-analysis pipeline (tracking, team assignment, ball possession, speed/distance estimation).
— the full pipeline that consumes these weights (detection → ByteTrack tracking → team assignment → possession → speed/distance), plus training and usage instructions.
Sources
1 sourceVérifié 5 août
Artefacts du modèle
2 artefactsExtraits de sources
2 extraitsyolov8x.pt (Ultralytics, COCO-pretrained), fine-tunedball, goalkeeper, player, refereeweights/best.pt — best checkpoint by validation mAP50-95 (recommended for inference)weights/last.pt — final epoch (100) checkpointargs.yaml — full training configurationresults.csv / results.png — per-epoch training/validation curvesconfusion_matrix*.png, Box*_curve.png — evaluation plotsplayer. (Some downstream pipelines deliberately remap goalkeeper → player.)Following Mitchell et al., 2018: this model detects generic on-pitch roles and does not perform person identification, biometric recognition, or any demographic inference. Detection quality may vary with skin tone, kit color, camera quality, and broadcast style due to the narrow single-dataset training distribution — do not assume uniform accuracy across all footage. It is intended for aggregate sports analytics, not for surveillance or individual-tracking use cases. Any latency-sensitive or wagering-related downstream use should account for the ball-detection weakness above.
football-players-detection-3zvbc, version 1 (workspace roboflow-jvuqo)ball, goalkeeper, player, referee (nc: 4)download-model.py (Roboflow API).Fine-tuned from yolov8x.pt for 100 epochs on a single NVIDIA GeForce RTX 4060 Ti (16 GB).
| Hyperparameter | Value |
|---|---|
| Base weights | yolov8x.pt (pretrained) |
| Epochs | 100 |
| Batch size | 16 |
| Image size | 640 |
| Optimizer | auto (SGD-family, Ultralytics default) |
Initial LR (lr0) | 0.01 |
Final LR factor (lrf) | 0.01 |
| Momentum | 0.937 |
| Weight decay | 0.0005 |
| Warmup epochs | 3 |
| Mixed precision (AMP) | enabled |
| Loss gains | box 7.5 / cls 0.5 / dfl 1.5 |
The full configuration is in args.yaml. best.pt is the checkpoint with the highest validation mAP50-95 (around epoch 42).
Evaluated on the validation split (38 images, 905 instances) with best.pt. Speed: 0.1 ms preprocess, 8.7 ms inference, 0.3 ms postprocess per image on an RTX 4060 Ti.
| Class | Images | Instances | Precision | Recall | mAP50 | mAP50-95 |
|---|---|---|---|---|---|---|
| all | 38 | 905 | 0.930 | 0.761 | 0.834 | 0.575 |
| ball | 35 | 35 | 0.794 | 0.400 | 0.420 | 0.188 |
| goalkeeper | 27 | 27 | 0.982 | 0.778 | 0.963 | 0.717 |
| player | 38 | 754 | 0.975 | 0.969 | 0.991 | 0.745 |
| referee | 38 |
Summary: Player, referee, and goalkeeper detection are strong (mAP50 ≥ 0.96). The overall averages are dragged down almost entirely by the ball class. See Limitations.
For the complete analysis pipeline (tracking, team assignment, possession, speed/distance) see the GitHub repo: github.com/gianpaj/football_analysis_yolo. Standalone detection with these weights:
from ultralytics import YOLO
model = YOLO("weights/best.pt")
# Single image / frame
results = model.predict("frame.jpg", conf=0.1) # low conf helps ball recall
for r in results:
print(r.boxes.xyxy, r.boxes.cls, r.boxes.conf)
# Video
results = model.predict("match.mp4", conf=0.1, stream=True)
Tip: a low confidence threshold (
conf=0.1) is recommended to recover more (weak) ball detections; pair it with tracking/interpolation to filter false positives and bridge missed ball frames.
This model is a fine-tune of Ultralytics YOLOv8 and is therefore distributed under the AGPL-3.0 license (the license of the base model and framework). If you require a non-AGPL/commercial license for the YOLOv8 weights, see Ultralytics licensing.
The training dataset (football-players-detection-3zvbc) is licensed CC BY 4.0 by its Roboflow authors; attribution is due to them for the data.
Ultralytics YOLOv8
@software{yolov8_ultralytics,
author = {Glenn Jocher and Ayush Chaurasia and Jing Qiu},
title = {Ultralytics YOLOv8},
version = {8.0.0},
year = {2023},
url = {https://github.com/ultralytics/ultralytics},
license = {AGPL-3.0}
}
Dataset
@misc{football-players-detection-3zvbc,
title = {Football Players Detection Dataset},
author = {Roboflow (roboflow-jvuqo)},
year = {2024},
url = {https://universe.roboflow.com/roboflow-jvuqo/football-players-detection-3zvbc},
note = {CC BY 4.0}
}
--- library_name: ultralytics pipeline_tag: object-detection license: agpl-3.0 base_model: Ultralytics/YOLOv8 base_model_relation: finetune tags: - yolo - yolov8 - ultralytics - object-detection - football - soccer - sports - pytorch model-index: - name: football_yolo-2 results: - task: type: object-detection dataset: name: football-players-detection-3zvbc (v1) type: object-detection metrics: - name: mAP50 (all) type: mAP50 value: 0.834 - name: mAP50-95 (all) type: mAP50-95 value: 0.575 - name: Precision (all) type: precision value: 0.930 - name: Recall (all) type: recall value: 0.761 --- # YOLOv8x — Football Players Detection (`football_yolo-2`) A [YOLOv8x](https://docs.ultralytics.com/models/yolov8/) object-detection model fine-tuned to detect the four key entities in football (soccer) broadcast footage: **ball, goalkeeper, player, referee**. It is the detection backbone of a football-analysis pipeline (tracking, team assignment, ball possession, speed/distance estimation). **Code / project repository:** [github.com/gianpaj/football_analysis_yolo](https://github.com/gianpaj/football_analysis_yolo) — the full pipeline that consumes these weights (detection → ByteTrack tracking → team assignment → possession → speed/distance), plus training and usage instructions. ## Model Details ### Model Description - **Model type:** Object detection (YOLOv8x architecture) - **Base model:** `yolov8x.pt` (Ultralytics, COCO-pretrained), fine-tuned - **Framework:** Ultralytics 8.4.90 / PyTorch 2.12.1 (CUDA) - **Classes (4):** `ball`, `goalkeeper`, `player`, `referee` - **Input size:** 640×640 - **Parameters:** 68,127,420 (fused: 113 layers) - **Compute:** 257.4 GFLOPs - **License:** AGPL-3.0 (inherited from Ultralytics YOLOv8; see [License](#license)) ### Files - `weights/best.pt` — best checkpoint by validation mAP50-95 (recommended for inference) - `weights/last.pt` — final epoch (100) checkpoint - `args.yaml` — full training configuration - `results.csv` / `results.png` — per-epoch training/validation curves - `confusion_matrix*.png`, `Box*_curve.png` — evaluation plots ## Intended Uses & Limitations ### Intended use - Frame-level detection of players, goalkeepers, referees, and the ball in football video. - Feeding a downstream tracker (e.g. ByteTrack) and analytics (team assignment via jersey color, possession, speed/distance)....
Source context: 156 downloads · 0 likes · Pipeline object-detection · Library ultralytics · Repo gianpaj/football-players-detection-1
| Augmentation |
| mosaic 1.0 (closed last 10 epochs), fliplr 0.5, HSV h/s/v 0.015/0.7/0.4, translate 0.1, scale 0.5, erasing 0.4, randaugment |
| Seed / deterministic | 0 / true |
| Total wall-clock | ~3,163 s (~53 min) |
| 89 |
| 0.969 |
| 0.899 |
| 0.961 |
| 0.650 |