The Short Answer
Building reliable Multi-Object Tracking (MOT17/MOT20) ground truth for ByteTrack, BoT-SORT, and OC-SORT requires far more discipline than frame-by-frame object detection. Every annotated sequence must enforce exact 1-based 10-column MOT .txt formatting, unambiguous track ID persistence across occlusions, tight keyframe spacing on nonlinear motion, and strict visibility scoring. Even a handful of broken IDs, duplicate (frame, id) rows, or lazy linear-interpolated boxes will distort HOTA, IDF1, and ID Switches (IDSW)—causing engineering teams to misdiagnose tracker hyperparameters when the real culprit is corrupted sequence ground truth.
How ByteTrack, BoT-SORT, and OC-SORT Actually Use Your Annotations
Most production tracking pipelines decouple detection from association (tracking-by-detection), yet they rely on clean MOT sequences in three critical ways:
- Detector fine-tuning on occluded low-score objects: ByteTrack’s core breakthrough is associating low-confidence detections (
0.1–0.5) during occlusion rather than discarding them. If your annotators stop labeling partially occluded pedestrians or vehicles once they fall below 50% visibility, your detector never learns to fire weak boxes during overlap—neutralizing ByteTrack’s second-stage matching completely. - Re-ID appearance encoder training (BoT-SORT / StrongSORT): Trackers with appearance embeddings extract cropped image patches grouped by
track_id. If annotators accidentally swap track IDs when two forklifts or pedestrians cross paths, you feed wrong positive identity pairs straight into triplet or cross-entropy Re-ID loss. - Tracker benchmarking and hyperparameter tuning (HOTA, MOTA, IDF1, IDSW): Tuning
track_high_thresh,track_buffer,match_thresh, and Kalman noise weights (std_weight_position,std_weight_velocity) is meaningless if your ground-truth.txtfile contains drifting interpolated boxes or fragmented IDs.
For teams scaling CCTV traffic analytics, retail footfall counting, or warehouse fleet monitoring, structured video annotation paired with strict sequence QA separates production-grade tracking from noisy demo metrics.
Exact 10-Column MOT17/MOT20 .txt Schema Breakdown
Unlike YOLO (normalized center coordinates) or COCO JSON (0-based pixel arrays), the MOTChallenge standard stores every sequence in a single comma-separated gt.txt file using 1-based frame indices, 1-based track IDs, and absolute top-left pixel coordinates.
| Column # | Field Name | Data Type | Exact MOT17 / MOT20 Specification & Gotchas |
|---|---|---|---|
| 1 | frame | Integer (>= 1) | 1-based video frame number. Exporting 0-based frames from custom OpenCV scripts breaks TrackEval silently or shifts every frame by 1. |
| 2 | id | Integer (>= 1) | Globally unique object identity within the sequence. Set to -1 only in detection-only det.txt files—never in ground-truth gt.txt. |
| 3 | bb_left | Float (px) | Top-left X pixel coordinate. Can be slightly negative if unclipped, but check whether your evaluation loader clips to [0, W-1]. |
| 4 | bb_top | Float (px) | Top-left Y pixel coordinate. Must stay strictly aligned with frame height H. |
| 5 | bb_width | Float (> 0) | Box width in pixels. Zero or negative widths crash IoU association matrices. |
| 6 | bb_height | Float (> 0) | Box height in pixels. Must remain tightly fitted—same pixel-tight rules as bounding box annotation. |
| 7 | conf | Binary (0 or 1) | In gt.txt, 1 means active ground truth evaluated by metrics; 0 means ignore region (e.g., distractor crowd or reflection zone). |
| 8 | class_id | Integer (>= 1) | MOT class index (e.g., 1=pedestrian, 2=vehicle, 7=static_person, 8=distractor in MOT17; custom contiguous IDs in proprietary datasets). |
| 9 | visibility | Float (0.0–1.0) | Estimated fraction of the object visible (1.0 = fully visible, 0.4 = 60% occluded). Evaluators filter tracks below minimum visibility thresholds. |
| 10 | z / unused | Float (-1) | Optional 10th column preserved for 3D world-coordinate MOT compatibility (x, y, z in MOT15/16); fill with -1 when unused if your parser expects 10 columns. |
A valid snippet of 10-column MOT ground truth for two vehicles moving through a CCTV intersection looks like this:
1,1,412.50,288.10,146.20,94.80,1,2,1.00,-1
1,2,890.00,310.40,118.60,82.00,1,2,0.85,-1
2,1,418.10,289.00,147.00,95.10,1,2,1.00,-1
2,2,882.40,312.00,119.10,82.40,1,2,0.60,-1
3,1,424.00,290.20,147.60,95.40,1,2,1.00,-1
3,2,874.80,313.50,119.50,82.80,1,2,0.35,-1
Notice how track 2 smoothly drops in visibility (0.85 -> 0.60 -> 0.35) as it passes behind a road sign while keeping id=2 intact.
Occlusion, Crossing, and Re-Entry ID Persistence Rules
Ninety percent of real-world MOT ground-truth defects come from annotators improvising during occlusions. Every tracking project must lock down a written ID Persistence Policy Table before frame 1 is labeled:
| Visual Event | Track ID Policy | Box & Visibility Rule | Impact on IDF1 / HOTA / IDSW |
|---|---|---|---|
| Partial Occlusion (20%–75% hidden) | Keep original ID continuously | Label amodal (full estimated extent) or modal (visible portion only)—pick ONE standard globally and score visibility accurately | Consistent rules let ByteTrack learn low-conf overlap recovery without erratic IoU drops |
| Brief Full Occlusion (< 2–3 sec behind pole/car) | Keep original ID when object re-emerges; mark outside=true in CVAT while 100% invisible | Do not draw phantom boxes while 100% hidden (unless benchmarking amodal trackers); resume exact original track_id on the first visible pixel | Prevents artificial ID switches when BoT-SORT or OC-SORT bridges short gaps via track_buffer |
| Two Identical Objects Crossing Paths | Scrub frame-by-frame (1 fps step) through the crossover; maintain true physical IDs | Never rely on auto-interpolation across a crossing—verify clothing, license plate, wheel rim, or stride phase | Eliminates fatal Re-ID label swaps that poison BoT-SORT appearance embeddings |
| Full Exit & Later Camera Re-Entry | Standard MOT: Assign new ID. Multi-camera / Re-ID benchmark: Keep original ID | Document the rule explicitly in seqinfo.ini and QA guidelines; never mix both conventions in one dataset | Mixing new-ID and same-ID policies makes IDF1 impossible to interpret reliably |
| Heavy Crowd / Unresolvable Distant Cluster | Label boundary as conf=0 ignore region (distractor zone) | Prevents false-positive penalties where human reviewers cannot distinguish individuals reliably | Stabilizes MOTA and prevents detector suppression on cluttered backgrounds |
On vehicle CCTV tracking engagements like our work for Fastview360 (UK)—which combined 2D/3D vehicle bounding boxes and structural tracking inside client workspaces—consistent crossover verification and tight boundary rules across multi-lane traffic were essential to keeping downstream speed and safety analytics accurate. You can inspect that engagement overview on our portfolio page.
Keyframe Interpolation Intervals vs. Fast Nonlinear Motion in CVAT
Keyframe interpolation in CVAT, Encord, or Supervisely is the biggest lever for controlling video object tracking annotation pricing—and simultaneously the #1 source of invisible localization drift.
If you are still selecting your labeling platform for sequence tracks, compare CVAT’s native interpolation tracks against Roboflow and Label Studio in our CVAT vs. Label Studio vs. Roboflow breakdown.
Follow these empirical keyframe spacing rules instead of a lazy fixed interval:
- Static CCTV camera, steady highway/corridor motion (25–30 FPS): Keyframes every 10 to 15 frames typically hold within
< 3 pxdrift, provided the camera has zero pan/tilt/zoom (PTZ) movement. - Fast nonlinear acceleration, sharp turns, sports, or drone tracking: Tighten keyframes to every 2 to 5 frames (or every frame during sudden deceleration/impact). Linear interpolation cuts straight chords across curved trajectories, sliding boxes completely off fast-moving limbs or turning vehicles.
- Hand-held, body-cam, or PTZ camera motion: Disable long interpolation spans completely. Global camera shake moves every object nonlinearly between adjacent frames; either run optical-flow assisted tracking with 3-frame human verification or pre-stabilize/use BoT-SORT’s Global Motion Compensation (GMC) reference checks.
- Scale transitions (approaching/receding targets): Perspective foreshortening expands box area quadratically as a vehicle approaches the lens. Place extra keyframes during the final 30 frames before frame exit so
bb_widthandbb_heightnever lag behind perspective growth.
Auditing ID Switches (IDSW), IDF1, and Track Integrity with Python
Never hand an exported MOT gt.txt straight to TrackEval or a Re-ID trainer without running an automated structural validator first. Manual exports from CVAT or custom format converters routinely harbor silent bugs: duplicate (frame, id) rows from merged tasks, negative box widths, boxes drifting past image width/height, single-frame orphan tracks from accidental clicks, and impossible pixel “teleports” indicating a swapped track ID.
Run this lightweight Python MOT QA script on every exported sequence before training or benchmarking:
from collections import defaultdict
from pathlib import Path
import math
def validate_mot_gt(gt_path: str, img_w: int, img_h: int, max_jump_px: float = 180.0, min_len: int = 3):
issues = defaultdict(list)
seen, tracks = set(), defaultdict(list)
for ln, raw in enumerate(Path(gt_path).read_text().splitlines(), start=1):
if not raw.strip():
continue
p = [x.strip() for x in raw.split(",")]
if len(p) < 9:
issues["malformed_columns"].append(ln)
continue
frame, tid = int(float(p[0])), int(float(p[1]))
x, y, w, h = map(float, p[2:6])
conf, cls_id, vis = float(p[6]), int(float(p[7])), float(p[8])
if frame < 1 or tid < 1:
issues["invalid_frame_or_id"].append((ln, frame, tid))
if (frame, tid) in seen:
issues["duplicate_frame_id"].append((ln, frame, tid))
seen.add((frame, tid))
if w <= 1.0 or h <= 1.0:
issues["degenerate_box"].append((ln, frame, tid))
if x < -5.0 or y < -5.0 or (x + w) > img_w + 5.0 or (y + h) > img_h + 5.0:
issues["out_of_bounds"].append((ln, frame, tid))
if not (0.0 <= vis <= 1.0) or conf not in (0.0, 1.0):
issues["invalid_vis_or_conf"].append((ln, frame, tid, vis, conf))
tracks[tid].append((frame, x + w / 2.0, y + h / 2.0, cls_id))
for tid, obs in tracks.items():
obs.sort(key=lambda r: r[0])
if len(obs) < min_len:
issues["suspicious_short_track"].append((tid, len(obs)))
if len({r[3] for r in obs}) > 1:
issues["class_flip_mid_track"].append(tid)
for i in range(1, len(obs)):
dt = max(1, obs[i][0] - obs[i - 1][0])
dist = math.hypot(obs[i][1] - obs[i - 1][1], obs[i][2] - obs[i - 1][2])
if (dist / dt) > max_jump_px:
issues["possible_id_swap_teleport"].append((tid, obs[i - 1][0], obs[i][0], round(dist, 1)))
return dict(issues)
if __name__ == "__main__":
res = validate_mot_gt("seq01/gt/gt.txt", img_w=1920, img_h=1080)
print("PASS" if not res else {k: len(v) for k, v in res.items()})
The final temporal loop (class_flip_mid_track and possible_id_swap_teleport) catches the vast majority of costly human ID swaps and accidental mid-track class flips in seconds—before you ever start training.
Production QA Workflow for Multi-Camera and High-Density Tracking
Automated scripts verify structural hygiene, while structured human review catches occlusion drift and identity crossovers across three mandatory gates:
- Pre-Label Sequence Calibration: Label 200 dense frames first to freeze modal vs. amodal box rules, occlusion thresholds, and
conf=0ignore zones inside a 2-page visual rubric. - Real-Time Playback Review (
1.0xand0.5x): Never QA MOT sequences purely as static images. Color-codedtrack_idplayback exposes lagging interpolation, flickering edges, and sudden ID color flashes immediately. - Cross-Boundary Task Seam Audit: When chunking long videos into 500-frame CVAT tasks for parallel annotators, overlap chunks by 10 frames and run an automated + human ID stitching pass across boundaries—otherwise every 500th frame triggers a wave of false ID switches.
Scaling Video Tracking QA Without Breaking Your Pipeline
High-density MOT annotation is notoriously unforgiving: cheap crowdsourced labeling burns engineering weeks chasing phantom ID switches and unstable HOTA scores. At AI and ML Network, our video QA specialists work natively inside your existing CVAT, Roboflow, Encord, or Supervisely workspace under NDA—delivering validated MOT17/MOT20, YOLO, or COCO-VID tracks with strict occlusion continuity and automated integrity checks built in.
Start with a low-risk calibration clip pilot (300 to 1,000 frames of your hardest occlusion footage) so your engineering team can validate track smoothness and IDF1 alignment firsthand. Share your FPS, target tracker, and clip specs through our project scoping form or message us via our contact page.