How to Annotate Sports Footage for Player Tracking AI

A practical workflow for annotating sports footage for player tracking models: label schema, keyframe interpolation, persistent IDs through occlusion, team and jersey attributes, ball tracks and pitch markings for 2D positions. It also compares eight public sports tracking datasets, two open-source video annotation tools and the HOTA, MOTA and IDF1 metrics.
- Player tracking labels must cover detection (boxes), association (persistent track IDs) and identification (role, team, jersey number), plus pitch markings if you need positions in meters.
- Draw boxes at keyframes and interpolate, with written rules for keyframe spacing, visibility thresholds, occlusion and re-entry; SoccerNet-Tracking interpolated about 11.5% of its boxes.
- Public sets such as SoccerNet-Tracking, SoccerNet-GSR, SportsMOT, TeamTrack and SoccerTrack v2 are useful for benchmarking, but several are non-commercial or require an NDA.
- Evaluate both models and annotator agreement with HOTA and IDF1, not MOTA alone, because MOTA mostly reflects detection quality.
Annotating sports footage for player tracking means drawing a box around every player, referee and the ball in each frame, giving each one a persistent track ID, and adding team, role and jersey-number attributes so a model learns who is where over time. This guide gives a step-by-step workflow, a label schema, public sports tracking datasets, open-source tools and the metrics to evaluate against.
What a player tracking dataset has to capture
A tracking model has to solve three problems at once, and your labels have to supervise all three:
- Detection: where each person and the ball are in the current frame (bounding boxes).
- Association: which box in frame t is the same object as a box in frame t+1 (track IDs).
- Identification: who that object is in game terms (team, role, jersey number) and, for analytics, where it stands on the pitch in meters.
Research benchmarks have moved along the same path. SoccerNet-Tracking (2022) asks for boxes and track IDs. SoccerNet Game State Reconstruction (2024) asks for each athlete's position on a 2D minimap plus role, team and jersey number. If your end product is heatmaps, distances covered or formation and tactical analysis, plan for the second kind of dataset from the start, because adding pitch coordinates and identities later means reopening every clip.
Step-by-step workflow for annotating sports video
Step 1: Fix the output and the schema before labeling
Write down what the model must output, then derive the label set from it. Decide which classes exist (player, goalkeeper, referee, ball, other people on the pitch), which attributes each class carries, the geometry for each class, and the export format (for example MOT-style text files or COCO JSON). Changing the schema mid-project usually forces a relabel, so lock it after a pilot (Step 8). The schema table in the next section is a starting point.
Step 2: Choose footage that matches deployment
- Broadcast feeds contain cuts, replays, zooms and graphics overlays. SoccerNet-Tracking avoided this by using single main-camera footage, because camera changes and replays break track continuity. SportsMOT kept only overhead shots and manually checked each clip for abrupt viewpoint switches.
- Fixed wide cameras (tactical, fisheye, panoramic or drone) show the whole pitch with no cuts, which makes long tracks and homography easier. Players appear small, so resolution matters: TeamTrack uses 8K and 6K fisheye and 4K drone video.
- Frame rate and compression: SoccerNet-Tracking and SportsMOT are at 25 fps, SoccerTrack at 30 fps. Heavily compressed streams blur the ball and jersey digits; use the highest-quality source available.
Use consistent camera types within a dataset, and keep a held-out set from different venues or matches so you can measure generalization.
Step 3: Set a keyframe interval and interpolate
Nobody draws every box in a 90-minute match by hand. Draw boxes at keyframes and let the tool interpolate between them, then correct the frames where interpolation drifts. In SoccerNet-Tracking, boxes were drawn manually at keyframes and about 11.5% of boxes were linearly interpolated. SportsMOT used a custom tool that propagated boxes with a KCF single-object tracker, with annotators refining the results.
Make the interval a rule, not a feeling. A typical guideline, to be tuned in the pilot: a keyframe every 5 to 10 frames during steady running, a keyframe on every frame of a sharp change of direction, a jump or a collision, and a check that interpolated boxes stay within a set pixel tolerance of the visible player. The effort is real: the SoccerTrack v2 authors cite an estimated 5,000 hours of manual work to box all players across its 10 full matches. For broader method notes, see our guide on time-series video annotation.
Step 4: Keep track IDs persistent through occlusion and camera cuts
ID errors hurt tracking models more than slightly loose boxes. Define explicit rules:
- Re-entry: an object that leaves the frame and returns later in the same clip keeps its ID. This is the SoccerNet-Tracking convention.
- Visibility threshold: decide when a partly visible player gets a box. SportsMOT annotates a player if any part of the body is visible, skips players with half the torso out of view, and deletes boxes under 5 pixels wide or high. Pick your own thresholds and write them in the guideline.
- Occlusion: when one player is fully hidden behind another, either mark the box as occluded and keep the track alive, or end it and resume with the same ID. Never start a new ID for the same person within a clip.
- Camera cuts: in broadcast footage, either split the video into shots and track within each shot, or carry identity across cuts using team and jersey number. Record which option you chose in the export so the training code handles it correctly.
Step 5: Add team, role and jersey number
Attributes turn anonymous tracks into players. SoccerNet-GSR labels each athlete with a role (player, goalkeeper, referee, other), a team (left or right, based on which goal they defend relative to the camera) and a jersey number. The jersey number is set to null if it is never visible; if it is visible in at least one frame, the whole tracklet gets that number. This tracklet-level rule is far cheaper than reading digits frame by frame and matches how jersey-number models are evaluated: the SoccerNet 2023 jersey number task classifies 2,853 tracklets into numbers 1 to 99 plus a "not visible" class.
Step 6: Annotate the ball as its own class
The ball is small, fast and often blurred or hidden. Label it as a separate class with its own visibility rules: box the ball whenever it is visible, mark frames where it is occluded or in a player's hands, and decide whether a ball touching a player belongs inside the player's box (SportsMOT excludes it). Ball tracks feed possession, pass and shot models; our post on annotating ball trajectories and object motion covers this in more depth.
Step 7: Label pitch lines or keypoints for 2D positions
To convert image positions into meters on the pitch, you need the camera's homography for each frame, which is estimated from pitch markings. Annotate field lines as polylines (or named keypoints such as line intersections and penalty spots) using a fixed, named class list. SoccerNet-GSR provides over 9.37 million line points across 26 line and goal-part classes. The SoccerNet camera calibration task contains 25,506 images with 226,305 annotated field-line polylines. A player's pitch position is then usually taken from the bottom-center of the box (the feet) projected through the homography. With a fixed camera, one calibration per venue setup can be enough; with a moving broadcast camera, you need lines on many frames.
Step 8: Pilot, then run QA in layers
Run a pilot on one or two short clips with several annotators. Use it to find edge cases (similar kits, goalkeeper versus outfield colors, substitutions, players off the pitch), measure time per minute of footage, and fix the guideline before scaling. Then apply QA in layers:
- Automated checks: missing frames inside a track, duplicate boxes on the same object, track IDs that appear twice in one frame, sudden box jumps larger than a set threshold, jersey numbers duplicated within a team, and box counts per frame outside the expected range (for example more than 11 players per side in soccer).
- Track review: a second annotator plays each track back at speed and checks for ID switches around crossings and occlusions.
- Metric check: score a sample of the work against a gold-standard clip with the same metrics you will use for the model (HOTA, IDF1, see below).
Model-assisted pre-labeling (a detector plus a tracker) speeds up all of the above, but every pre-label still needs human review, especially for IDs.
Annotation schema for player tracking
| Object / label | Geometry | Attributes | Notes |
|---|---|---|---|
| Player | Box track | track ID, team, jersey number, occluded | Full-body box; keep ID across re-entry |
| Goalkeeper | Box track | track ID, team, jersey number | Separate role; kit differs from team |
| Referee | Box track | track ID, sub-role (main, assistant) | Needed so models do not count them as players |
| Ball | Box or point track | visible, occluded, in hand | Small object; tight boxes |
| Other person | Box track | type (staff, coach) | Only people on or entering the pitch |
| Pitch markings | Polylines or keypoints | named class per line or point | Basis for homography and 2D positions |
| Body pose (optional) | Skeleton track | per-point visibility | For technique, gait or action models |
| Events (optional) | Timestamp or segment | event type, player ID | Pass, shot, tackle, foul |
Most tracking projects start with bounding boxes plus IDs; pose and events can be added on the same tracks later if the IDs are stable.
Public sports tracking datasets
Public datasets are useful for pretraining, for benchmarking your tracker and for copying proven labeling conventions. Figures below come from the official papers and repositories; check each licence before any commercial use.
| Dataset | Sport | Content | Size | Annotations | Licence / access |
|---|---|---|---|---|---|
| SoccerNet-Tracking (2022) | Soccer | Main-camera video, 12 Swiss Super League games, 1080p, 25 fps | 200 clips of 30 s + one 45-min half; about 3.6M boxes | Boxes, track IDs; players, goalkeepers, referees, ball, other | SoccerNet devkit; videos need a signed NDA |
| SoccerNet-GSR (2024) | Soccer | Broadcast clips from a single moving camera | 200 clips of 30 s; 2.36M+ athlete positions | Pitch position, role, team, jersey number, track ID; 9.37M+ line points | Public via sn-gamestate; see source for terms |
| SoccerNet 2023 jersey and calibration | Soccer | Player tracklets; broadcast frames | 2,853 tracklets; 25,506 images | Jersey number per tracklet; field-line polylines | SoccerNet devkit; see source |
| SportsMOT (2023) | Basketball, volleyball, soccer | Broadcast clips (NCAA, Premier League, Olympics), 720p, 25 fps | 240 sequences; 150K+ frames; 1.6M+ boxes | Player boxes and IDs (no referees or ball) | CC BY-NC 4.0; gated download |
| TeamTrack (2024) | Soccer, basketball, handball | Full-pitch fisheye (6K/8K) and drone (4K) video | 155.5 min; about 4.37M boxes | Boxes, persistent IDs, team | Kaggle; see source for licence |
| SoccerTrack (2022) | Soccer | 8K fisheye and 4K drone video, 30 fps, plus GNSS | 20 clips of 30 s per view | Boxes, IDs, ball; GNSS pitch positions | GitHub; see source |
| SoccerTrack v2 (2025) | Soccer | Panoramic 4K, 10 university matches | About 900 min | 2D pitch positions, role, team, jersey number; 12 ball-action classes | Hugging Face and GitHub; see source |
| DeepSportRadar instance segmentation (2022) | Basketball | High-resolution arena images | 324 annotated images; 2,495 instances | Human instance masks (COCO format) | CC BY-NC-ND 4.0; Kaggle |
A few practical notes. SportsMOT does not label referees or the ball, so a detector trained on it must learn to ignore them. SoccerTrack v2's main release provides pitch coordinates rather than image boxes; boxes with player IDs for a subset were reserved for the SoccerTrack Challenge at MMSports 2025. DeepSportRadar-v1 also covers ball 3D localization, camera calibration and player re-identification for basketball. Several licences are non-commercial, so production models usually need proprietary footage labeled to your own schema.
Open-source annotation tools for video tracking
| Tool | Licence | Tracking features | Useful exports |
|---|---|---|---|
| CVAT Community | MIT, self-hosted | Track mode with keyframes and interpolation; outside and occluded flags; track merge and split; skeleton tracks; serverless models for pre-labeling | CVAT for video, MOT, MOTS, COCO, YOLO, Datumaro |
| Label Studio Community | Apache 2.0, self-hosted | VideoRectangle with manual keyframes and interpolation; toggle interpolation to mark disappearances; ML backend for pre-labels | JSON (keyframes, or interpolated frames on request) |
CVAT. In track mode, you set keyframes and the frames between them are interpolated. When a player leaves the frame, you end the track with the Outside property, and if an object disappears briefly you can merge the two pieces with the Merge tool. In the CVAT for video format, every box in a track carries outside, occluded and keyframe flags, which maps well onto the rules in Step 4. Skeletons can also be annotated as tracks, with per-point outside and occluded properties. The repository lists serverless models such as SAM, YOLO v7 and the TransT tracker for automatic annotation.
Label Studio. The video object tracking template uses the VideoRectangle tag. Annotators create keyframes by hand and boxes are interpolated between them; turning interpolation off at a frame marks an object as gone until it reappears. By default only keyframes are exported, so enable interpolated-frame export before training. Set the frameRate in the config to match the video.
Either tool works for a pilot. At scale, the deciding factors are usually the review workflow, how well the tool handles long, high-resolution videos, and whether your export matches the format your tracker expects.
Tracking metrics: HOTA, MOTA and IDF1
- MOTA (Bernardin and Stiefelhagen, 2008) counts misses, false positives and ID switches relative to the number of ground-truth objects. It can be negative, and it is dominated by detection quality.
- IDF1 (Ristani et al., 2016) matches each ground-truth trajectory to one predicted trajectory and computes the F1 score of correctly identified detections. It mainly measures whether identities are kept.
- HOTA (Luiten et al., 2020) balances detection, association and localization and decomposes into DetA, AssA and LocA. The authors report that across 37 trackers on MOT17, MOTA correlates strongly with detection and IDF1 with association, while HOTA weighs both.
Sports benchmarks report all three: TeamTrack lists HOTA, MOTA, IDF1, DetA and AssA. SoccerNet-GSR adds GS-HOTA, which scores localization on the pitch plane (with a 5 m tolerance) and counts an identity as correct only if role, team and jersey number all match. Use the same metrics to audit your annotations against a gold clip; a low IDF1 between two annotators usually points to unclear occlusion rules.
Sport-specific annotation notes
Soccer (football)
Large pitch, small players and long camera pans. Box all players, goalkeepers and referees with persistent IDs, label the ball separately, and annotate pitch lines for homography. Goalkeepers wear different kits from their team, so team must be an attribute, not inferred from color. Add events such as passes, shots and tackles only if you plan to train action models.
Basketball
Small court, dense overlaps and frequent direction changes, so ID switches during screens and rebounds are the main risk. Use short keyframe intervals, annotate jersey numbers early to help ID propagation, and label court landmarks (paint, three-point line, basket). Add pose keypoints if you need shot or defensive-stance analysis.
Tennis
Few players and little occlusion, but a very fast ball. Prioritize per-frame ball location, court lines for in/out decisions, player boxes and pose for footwork, and racket-ball contact frames marked manually.
American football
Heavy occlusion after the snap and protective gear that hides body shape. Label pre-snap formations, player roles, ball possession through handoffs and fumbles, and field markings such as hash marks and end zones. Wide end-zone or all-22 views make formation work much easier than broadcast angles.
Ice hockey
Fast puck, line changes and low contrast on ice. Use tight player boxes, a point or small box for the puck, and ID-switch checks around line changes and board battles. Stick position is optional but useful for tactics.
Track and field
Mostly linear motion with limited occlusion but variable outdoor light. Track each athlete by lane or bib, mark start, baton exchange and finish-line frames, and use side-profile footage for gait and form analysis. Our article on sport performance tracking with AI covers speed and load metrics derived from these tracks.
Privacy and rights
Players are identifiable people. In Europe, footage with identifiable athletes falls under GDPR, and youth competitions need extra care. Check broadcast or league rights before reusing match footage, and check dataset licences: several public sets above are non-commercial or require a signed agreement.
Get help with your sports annotation project
DataVLab is a Paris-based data annotation company, founded in 2019 and certified ISO/IEC 27001, with GDPR-compliant workflows and EU-based annotation teams. We label sports video with persistent IDs, team and jersey attributes, ball tracks and pitch keypoints, using custom annotation tooling and multi-step QA. If you need tracking data for soccer, basketball or another sport, or broader video annotation, contact us to scope a pilot.
What is sports video annotation?
Sports video annotation is the labeling of match or training footage so computer vision models can learn from it. For player tracking it means drawing bounding boxes around players, referees and the ball, giving each a persistent track ID across frames, and adding attributes such as team, role and jersey number. Projects that need positions in meters also annotate pitch lines or keypoints, which are used to compute a homography from image to pitch coordinates.
What are the best practices for annotating video data for sports analytics?
Lock the schema after a short pilot, annotate at keyframes and interpolate between them, and write explicit rules for visibility thresholds, occlusion, re-entry and camera cuts. Keep one ID per person per clip, assign jersey numbers at tracklet level, label the ball as its own class, and annotate pitch markings for homography. Finish with automated checks for duplicate IDs and gaps, a human track review, and a gold-clip comparison using HOTA or IDF1.
What software is used for sports video annotation?
Open-source options include CVAT, released under the MIT licence, and Label Studio, released under Apache 2.0. Both support box tracks drawn at keyframes with interpolation between them. CVAT adds outside and occluded flags, track merge and split, skeleton tracks and MOT export, while Label Studio exports keyframes or interpolated frames as JSON. Choose based on review workflow, how the tool handles long high-resolution videos, and the export format your tracker expects.
How is football (soccer) footage annotated for player tracking?
Each player, goalkeeper and referee gets a bounding box track with a persistent ID, plus attributes for role, team and jersey number. The ball is labeled as a separate class. Pitch lines are annotated as polylines so each frame can be mapped to a 2D pitch model. SoccerNet-GSR follows this pattern, labeling team as left or right and giving a whole tracklet the jersey number if it is visible in at least one frame.
How does AI tracking improve football player positioning analysis?
A tracker links detections of each player across frames into continuous trajectories, and a homography estimated from pitch markings converts those image positions into meters on the pitch. That gives per-player positions over time, from which analysts derive distances covered, speeds, heatmaps, team shape and spacing. Accuracy depends on stable IDs and good calibration labels, which is why benchmarks such as SoccerNet-GSR score pitch-plane localization and identity together.
How do you choose a sports annotation provider or on-demand data tagging service?
Ask for a paid pilot on your own footage and measure the result with the same metrics you use for your model, such as HOTA and IDF1 against a gold clip. Check that the provider follows your written schema, handles occlusion and camera cuts consistently, exports in your format, and runs multi-step QA. For European player footage, confirm GDPR-compliant handling, security certification and where the annotators work.
.jpeg)




