Player tracking + play retrieval
hoopvec
July 2026 – present
Rebuilds player-and-ball tracking from ordinary NBA broadcast video, trains a play-embedding model for similarity retrieval, and wraps both in a measured, reproducible eval harness. The research question is how much downstream analytics degrade on reconstructed tracking versus ground truth — and which perception errors actually matter.
Results
| detection mAP@50 | 0.987fine-tuned yolov8m |
|---|---|
| tracking HOTA | 0.301 → 0.525 |
| retrieval recall@1 (instance) | 0.62 → 0.98 |
| retrieval precision@5 (semantic) | 0.942vs 0.51 self-supervised ≈ random |
| play retrieval under ID-switches | 0.99 → 0.68 → 0.27 |
| serving throughput | 9.9 → 21.5 fpsyolov8n on the frontier at 44.7 fps |
The finding
The learned encoder is more fragile than a zero-parameter baseline under association error
Positional jitter and dropout cost almost nothing; ID-switches dominate. At a realistic budget the trained encoder falls to recall@1 0.68 against a hand-feature floor of 0.99, and folding in measured re-ID error drops it to 0.27 — below the floor. That is the honest result, confirmed three ways, not a bug: the lever to trust off broadcast video is the association stage, not sub-pixel registration.
Honest limitations
- The 0.98 recall@1 headline is instance-invariance — a possession retrieving an augmented copy of itself — not semantic play similarity. On an actual play-type axis the self-supervised encoder scores 0.51 against a 0.50 random baseline.
- Court homography reaches 16px on held-out arenas but does not transfer to broadcast video. That is a data limit, not a tuning one.
- One full broadcast clip runs end to end, but its retrieved neighbors are not meaningful: hand-clicked homography and arbitrary player slots make the degradation study's prediction empirical. A clean-looking top-5 there would have been less honest.
What got built
- Showed player ID swaps, not position error, cut the top-match rate from 100% to 68% on the same broadcast plays in an NBA play-search pipeline built on a fine-tuned YOLOv8m detector and ByteTrack.
- Restored the top-match rate to 100% by retraining the contrastive-transformer ranker to ignore player order, at the cost of matches on shortened clips falling from 94% to about 45%.
Stack
- PyTorch
- Ultralytics YOLOv8
- ByteTrack
- BoT-SORT
- FAISS
- FastAPI
- ONNX Runtime
- TrackEval