/ Модель

Характеристики

Лицензия
AGPL 3.0
Библиотека
ultralytics
Опубликована
14 ноя 2026

box2boxcam-football-ball-detection

Поиск объектовИзображение → bounding_boxes3 профессии
255скачиваний за 30 дней2лайкавеса обновлены14 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Дообученный детектор YOLO26-small находит футбольный мяч в видео любительских матчей, снятых телефоном, для автоматического сопровождения игры камерой.

box2boxcam-ball-v1.0 — модель обнаружения футбольного мяча на основе YOLO26-small, разработанная автором репозитория box2boxcam. Она дообучена на предварительно обученных на COCO весах YOLO26-small и предназначена для видео матчей любительского и массового футбола, снятых телефоном с боковой линии. Модель находит один класс объектов — «sports ball» — и может передавать координаты мяча системе автоматического сопровождения камеры, например телефону на стабилизаторе DockKit. Доступны веса PyTorch и пакет Core ML для iPhone; библиотека — Ultralytics.

Обучение проводилось на 3 451 изображении с размером входа 960 пикселей. В независимом тесте на одном любительском матче модель находила больше мячей, чем исходная YOLO26-small, однако пропускала более половины мячей при практически значимых порогах, особенно мелкие и далёкие. Заявленная скорость около 30 кадров в секунду относится ко всему мобильному конвейеру, а не к детектору отдельно; точность Core ML отдельно не измерялась. Модель предназначена для футбольных видео с телефона, а трансляции, другие виды спорта и мячи, снятые издалека, не проверялись. Лицензия — AGPL-3.0.

Сценарии применения

  • поиск мяча в видео любительского футбольного матча
  • сопровождение мяча камерой на стабилизаторе DockKit
  • подготовка координат мяча для спортивной видеоаналитики

Ограничения

На независимом тесте модель пропускала более половины мячей при практически значимых порогах; особенно часто пропускаются мелкие и далёкие мячи. Трансляции, другие виды спорта и точность версии Core ML отдельно не оценивались.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Football (soccer, if you must) ball detection — YOLO26 + Core ML, real-time on iPhone (box2boxcam v1.0)

box2boxcam-ball-v1.0 is a YOLO26-small soccer ball detector for football matches filmed on amateur and grassroots pitches. It is meant for a phone on the sideline, where it finds the ball in each frame so that an auto-tracking camera, such as a phone on a DockKit gimbal, can follow the play. It ships as PyTorch weights and as a Core ML package for real-time ball tracking on iPhone. It detects one class, "sports ball", and does not find players.

Quick start

Python (Ultralytics):

from huggingface_hub import hf_hub_download
from ultralytics import YOLO

weights = hf_hub_download(
    repo_id="Totorotibo84/box2boxcam-football-ball-detection",
    filename="box2boxcam-ball-v1.0.pt",
)
model = YOLO(weights)
results = model.predict("match.mp4", imgsz=960, conf=0.25)

Swift / Core ML (Vision), with box2boxcam-ball-v1.0.mlpackage added to your Xcode target:

let ballModel = try VNCoreMLModel(for: MLModel(contentsOf: compiledModelURL))
let request = VNCoreMLRequest(model: ballModel)
try VNImageRequestHandler(cgImage: frame, options: [:]).perform([request])
let balls = request.results as? [VNRecognizedObjectObservation]

The Core ML package is FP16 with non-maximum suppression included.

Intended use and out of scope

  • In scope: football (soccer) matches filmed with a phone at amateur and grassroots level, where the ball is visible at a usable size.
  • Out of scope: broadcast TV footage (not in the training data), other sports or balls (not evaluated), and small, far-away balls (recall is low there, see below).

Training data

3,451 images: 3,283 for training and 168 for validation.

  • 1,941 filmed by the author on amateur pitches and at home
  • 603 from short online videos
  • 907 from one online video (739 train, 168 validation)

Third-party footage is not redistributed. Boxes come from automatic proposals reviewed by clicking; they are not hand-drawn ground truth.

Provenance and privacy:

  • Author's footage: in the public dataset, heads are blurred automatically with a pose model. Small far heads (under about 20 px) may remain, and players can still be recognisable by other cues. The model itself was trained on the unblurred frames, and on a few of the author's clips that are not part of the public dataset.
  • Third-party clips: referenced by URL only.
  • Frames were sent to third-party model APIs to propose ball boxes. Those proposals were reviewed by the author, ball and unsure candidates by clicking.

Training recipe

  • Base: yolo26s.pt (Ultralytics YOLO26-small), COCO-pretrained
  • One class, "sports ball"; input size 960 px
  • 30 epochs, early stopping patience 8, batch 8, AdamW, initial learning rate 0.001, seed 42
  • Run on Hugging Face Jobs, a10g-small GPU

Results (held-out amateur match)

A reserved match never used for training: 396 frames, 219 balls, of which 149 are 16 px or smaller. Matching at IoU >= 0.5, 960 px input. The numbers below were measured on the original unblurred frames; on the published (head-blurred) test split the model scores 99 / 100, 92 / 52, 85 / 22 and 82 / 4 (see the comparison with stock YOLO26 below).

ConfidenceTrue positivesFalse positives
0.25100103
0.359360
0.458630
0.55813
  • At 0.25: recall 100/219 (45.7 %), precision 100/203 (49.3 %).
  • Small balls: 57 of 149 found at 0.25 (38 %).
  • Limitation: fewer than half the balls are found at usable false-positive rates. Most misses are small, far balls.
  • Run-to-run variation: a control retrain with seed 7 gave 100/110, 93/77, 86/38 and 76/12 at the four thresholds. That is 7 to 17 more false positives at 0.25 to 0.45 and 5 fewer true positives at 0.55. Treat differences of this size as noise.
  • Speed: the author's README reports about 30 Hz on an iPhone for the whole on-device stack (ball detector with person detection and pose). The detector alone was not timed.
  • Core ML accuracy: not measured. The figures above are for the PyTorch weights.

Fine-tuned vs stock YOLO26

The point of fine-tuning, measured on the same independent test split of the public dataset (396 frames, 219 balls, 149 of them 16 px or smaller; heads blurred). Stock YOLO26s is the COCO-pretrained model, keeping only the COCO class "sports ball" (class 32); box2boxcam v1.0 is the fine-tuned detector. Same tool (scripts/evaluate_detector.py), 960 px input, IoU >= 0.5, true / false positives per confidence threshold.

Model0.250.350.450.55Recall / precision at 0.25Small balls found at 0.25Max TP at FP <= 25 / 60 / 100 / 200
Stock YOLO26s (COCO "sports ball")51 / 5547 / 2235 / 927 / 423 % / 48 %23 of 14947 / 53 / 65 / 72
Before automatic field labels96 / 20793 / 11388 / 6181 / 1844 % / 32 %54 of 14985 / 88 / 92 / 96
box2boxcam v1.099 / 10092 / 5285 / 2282 / 445 % / 50 %55 of 14986 / 93 / 99 / 111

Stock YOLO26s does find some balls: 51 of the 219 at confidence 0.25 (86 even at its lowest threshold of 0.05, with 536 false boxes), but it misses most of the small, far balls that matter on a sideline phone video. Fine-tuning roughly doubles the balls found at every threshold (99 against 51 at 0.25) and finds 55 of the 149 small balls against 23. A paired bootstrap over frames (2000 resamples, fine-tuned minus stock) gives +48 true positives at 0.25 (95 % interval +36 to +61), +55 at 0.55 (+41 to +69, with no change in false positives), and +34 to +40 true positives at every false-positive budget of 25 to 200 (all intervals exclude zero). Blurring heads barely matters: on the same frames unblurred, the fine-tuned model scores 100 / 103, 93 / 60, 86 / 30 and 81 / 3, and the stock model 56 / 57, 46 / 24, 35 / 11 and 27 / 3.

Precision-recall curves of stock YOLO26s, the intermediate model and box2boxcam v1.0 on the test split

Precision against recall over all confidence thresholds on the test split. Circles mark confidence 0.25, squares 0.55.

Training curves of box2boxcam v1.0

Training curves of the released model (30 epochs): box and class loss on the training and validation sets, and validation mAP50 and mAP50-95 per epoch. The validation set is the one used during training (it shares its match with the training set), not the independent test split above.

What did not help

Full write-up: negative results.

  • WASB published ball weights: almost no extra balls at a usable false-positive level.
  • 3-frame (9-channel) stacking: no gain beyond noise, about 3x GPU time.
  • Gated low-threshold re-detection: +1 to +6 hits per recording, no net gain.
  • Copy-paste of small balls into training images: no gain.
  • A mosaic and reduced-scale recipe that looked like a precision gain did not replicate with another seed.

Licence

This model is licensed AGPL-3.0 because it is trained with Ultralytics YOLO, whose licence covers the models it produces. Distributing these weights, or an app that contains them, means releasing the corresponding source under AGPL-3.0; closed-source apps need a commercial Ultralytics (Enterprise) licence, according to Ultralytics. Not legal advice.

Citation

@misc{box2boxcam2026,
  title        = {box2boxcam: football ball detection for amateur matches},
  author       = {Thibault Gillard},
  year         = {2026},
  howpublished = {\url{https://github.com/Thibault-GILLARD/box2boxcam-football-vision}}
}

The box2boxcam project

box2boxcam turns an iPhone on a motorised gimbal into an automatic cameraman for amateur football. Everything is open, so take what is useful:

If you use any of it, a star, a like or a short message about what you built is very welcome, and so are issues and pull requests.

Acknowledgements

  • Ultralytics: YOLO26 base model and training framework.
  • SoccerTrack v2 (Scott et al., arXiv:2508.01802, CC BY 4.0): used only for the camera-guidance benchmark, not for training.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · ultralytics

Нельзя запустить

Модели Ultralytics YOLO требуют отдельного рантайма.

Ревизия весов
c3ef1ef

0 моделей