Instructions to use boxerab/gst-python-ml-football with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use boxerab/gst-python-ml-football with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("boxerab/gst-python-ml-football", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
File size: 1,543 Bytes
6ff6c36 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ---
license: agpl-3.0
tags:
- object-detection
- yolo
- ultralytics
- football
---
# gst-python-ml football models
Weights for the football broadcast demo in [gst-python-ml](https://github.com/collabora/gst-python-ml). `demo/football/fetch_models.py` downloads them into `models/football/`.
| file | classes | input | role |
|---|---|---|---|
| `football.pt`, `football.onnx`, `football_fp16.onnx`, `football_int8.onnx` | ball, goalkeeper, player, referee | 640 | player detector |
| `ball11n.pt` | ball | 1280 | ball detector, run after the player detector |
## ball11n.pt
yolo11n fine-tuned from the ultralytics COCO weights for 40 epochs at imgsz 1280 on a one-class ball dataset of 15,357 training images. The player detector's own ball class is dropped in the demo in favour of this model.
| set | imgsz | P | R | mAP50 | mAP50-95 |
|---|---|---|---|---|---|
| SoccerNet v3 H250 test | 1280 | 0.774 | 0.708 | 0.701 | 0.327 |
| football-player-detection valid+test, ball only | 1280 | 0.921 | 0.850 | 0.888 | 0.407 |
Training data, all CC BY 4.0:
- SoccerNet v3 H250, Zenodo record [7808511](https://zenodo.org/records/7808511), ball labels only
- [martinjolif/football-ball-detection](https://huggingface.co/datasets/martinjolif/football-ball-detection)
- [martinjolif/football-player-detection](https://huggingface.co/datasets/martinjolif/football-player-detection), held out as the second evaluation set
## Licence
The weights derive from ultralytics YOLO and are released under AGPL-3.0 like the ultralytics package.
|