Foundations to Frontier
Tests
G. Computer Vision and Remote Sensing › G2 Core Vision Tasks

Object tracking

Object tracking follows objects through a video and keeps their identities: this is car 7 in every frame until it leaves. Single-object tracking follows one target given in the first frame; multi-object tracking (MOT) finds and follows every object of given classes. Most MOT systems are tracking-by-detection. A detector runs on every frame, a motion model (usually a Kalman filter) predicts where each track should be, and an association step matches detections to tracks by IoU, appearance or both. This page covers the task: the problem setups, the datasets (MOT17, MOT20, DanceTrack, KITTI, VisDrone), the metrics (MOTA, IDF1, HOTA), the SORT family of trackers (SORT, DeepSORT, ByteTrack, OC-SORT, BoT-SORT) and the failure modes. In the exercises you implement a constant-velocity Kalman filter, MOTA and IDF1. You then track 8 simulated pedestrians with occlusions, missed detections and false alarms. A constant-velocity prediction cut identity switches from 82 to 43 and raised IDF1 from 0.606 to 0.708, while MOTA moved only from 0.859 to 0.878. ByteTrack-style association of low-score detections cut misses from 380 to 333 but did not improve identities here (IDF1 0.706).

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Same object, next frame

Detecting objects in every frame of a video is not enough: you also need to know that the car in this frame is the same car as in the last one. A tracker keeps a numbered record for each object and updates it frame by frame. It predicts where each object should be next and pairs the new detections with those predictions. The hard moments are when objects cross, hide behind each other or the detector misses them for a few frames. The demo shows two targets crossing while one is hidden. Without a motion prediction, the tracker can lose it or hand its identity to the other target.

Vision task lab
Identities kept. The constant-velocity prediction coasts the occluded track forward. The grey bar marks the occlusion.
Why engineers care

Tracking feeds collision avoidance for cars and drones, counts ships and vehicles over time from satellite video, follows a target spacecraft during approach, and tracks space debris across telescope frames.

📝 Quick check (Level 0)
0/3 answered
  1. 1. A multi-object tracker must keep…
  2. 2. Tracking-by-detection runs a detector…
  3. 3. An identity switch happens when…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Setups. Single-object tracking (SOT): one target given by a box in the first frame (SiamFC 2016, SiamRPN++ 2019, OSTrack 2022; SAM 2 tracks masks). Multi-object tracking (MOT): all objects of given classes, which appear and disappear. Also multi-camera tracking and 3D tracking from LiDAR.
  • Tracking-by-detection. For each frame: predict every track forward (Kalman filter with constant velocity, A10-8); compute a cost between predicted tracks and detections (1 − IoU, Mahalanobis distance, appearance embedding distance); solve the assignment (Hungarian or greedy); update matched tracks; start tracks from unmatched confident detections; delete tracks unmatched for max_age frames.
  • The SORT family. SORT (Bewley et al. 2016): Kalman + IoU + Hungarian. DeepSORT (Wojke et al. 2017): adds re-identification embeddings and gating. ByteTrack (Zhang et al. 2022): a second association with low-score detections, which are often occluded objects. OC-SORT (Cao et al. 2023): corrects the Kalman state after occlusions. BoT-SORT (2022): camera-motion compensation. End-to-end transformers: TrackFormer and MOTR (2022).
  • Datasets. MOT17 and MOT20 (pedestrians, MOT20 very crowded); DanceTrack (2022; similar appearance, erratic motion); KITTI and BDD100K (driving); VisDrone and UAVDT (drone video).
  • Metrics. MOTA = 1 − (FN + FP + IDSW)/GT (Bernardin and Stiefelhagen 2008), dominated by detection errors; IDF1 (Ristani et al. 2016), the F1 of identity-consistent matches; HOTA (Luiten et al. 2021) = √(DetA · AssA), balancing detection and association.
📝 Quick check (Level 1)
0/3 answered
  1. 1. SORT associates detections to tracks with…
  2. 2. ByteTrack's key idea:
  3. 3. Which metric is dominated by detection errors?

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

Building and tuning a tracker

Exercise 1.

  • A constant-velocity Kalman filter for one axis: predict and update.
  • MOTA and IDF1 from error counts.

Practice.

  • Start from a strong detector: tracking quality is capped by detection; fine-tune on your domain and keep low-score detections for ByteTrack-style association.
  • Motion model: constant velocity in image coordinates is the default; compensate camera motion (BoT-SORT’s GMC) for moving platforms such as drones.
  • Appearance: add re-identification embeddings (DeepSORT, StrongSORT) when objects look different and occlusions are long; skip them when objects look alike (DanceTrack), where motion matters more.
  • Tune max_age to the longest occlusion you must bridge (frames), the IoU or Mahalanobis gate to the frame rate and speed, and min_hits to suppress short false tracks.
  • Evaluate with TrackEval: report HOTA, IDF1 and MOTA together; inspect ID switches at crossings and after occlusions.
  • Tools: Ultralytics trackers (ByteTrack, BoT-SORT), BoxMOT, Roboflow supervision; SAM 2 for mask tracking of a few given objects.
from ultralytics import YOLO
model = YOLO("yolo11s.pt")
for r in model.track(source="drone_video.mp4", tracker="bytetrack.yaml", stream=True, conf=0.1):
    ids = r.boxes.id                      # persistent track ids (None until tracks are confirmed)
    boxes = r.boxes.xyxy
# bytetrack.yaml: track_high_thresh 0.25, track_low_thresh 0.1, new_track_thresh 0.25, track_buffer 30, match_thresh 0.8
🐍 Exercise 1: Kalman filter, MOTA and IDF1
Implement a constant-velocity Kalman filter (predict and update) and the MOTA and IDF1 formulas.
📝 Quick check (Level 2)
0/3 answered
  1. 1. max_age should cover…
  2. 2. On a moving drone camera, add…
  3. 3. When all objects look alike, rely more on…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Why a motion model preserves identity. Association compares each detection with where each track is expected to be. Without a motion model the expectation is the last position, which lags a moving target by its displacement since then; after a miss of k frames the lag is k times the speed. Once the lag exceeds the box size, IoU with the right detection drops to zero and a nearby target can take the match. A constant-velocity prediction removes the lag for straight motion; the Kalman covariance grows while a track coasts, which gating can use.

Why MOTA hides identity errors. MOTA counts each identity switch once, while every missed object costs one per frame. With thousands of ground-truth boxes and tens of switches, MOTA is set by detection recall; a tracker that hands identities around can still score well. IDF1 counts the frames in which each true object is followed by the track mapped to it, so one switch in the middle of a trajectory can cost half of it.

Low-score detections. Occluded objects are often detected with low confidence. Discarding everything below a high threshold loses them; admitting all of them adds false tracks. ByteTrack only lets low-score detections continue existing tracks (with a stricter IoU), never start new ones, recovering the frames without the false tracks. Whether identities improve depends on whether those low-score boxes belong to the right track.

📝 Quick check (Level 3)
0/3 answered
  1. 1. Without a motion model, a coasting track lags the target by…
  2. 2. An identity switch costs MOTA…
  3. 3. ByteTrack lets low-score detections…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

What do a motion model and low-score association each contribute to tracking through occlusions?

History.

  • K. Bernardin and R. Stiefelhagen, “Evaluating multiple object tracking performance: the CLEAR MOT metrics” (2008).
  • A. Bewley et al., “Simple online and realtime tracking” (2016): SORT.
  • Y. Zhang et al., “ByteTrack: multi-object tracking by associating every detection box” (2022).
  • J. Luiten et al., “HOTA: a higher order metric for evaluating multi-object tracking” (2021).

Exercise 2. 3 sequences of 150 frames, 8 pedestrians (12 × 30-pixel boxes) in a 200 × 200 view, 3600 ground-truth boxes in all.

  • Motion: about 1.5 pixels per frame with small random turns, bouncing at the borders; a random depth order decides who occludes whom.
  • Detections: visible targets score 0.5–1.0 and are missed 5% of the time; a target more than 30% covered by a nearer one scores 0.1–0.5 and is missed 30% of the time; about one false alarm per frame scores 0.1–0.5; box noise 1.5 pixels.
  • Trackers: greedy IoU association (≥ 0.3) of detections scoring at least 0.5. (A) no motion model: tracks are expected where last seen. (B) constant-velocity prediction with a smoothed velocity, a simplified alpha–beta filter in place of SORT’s Kalman filter. (C) as B plus a ByteTrack second pass matching low-score detections to unmatched tracks at IoU ≥ 0.5. Tracks survive 10 missed frames and are reported after 2 hits.
tracker MOTA IDF1 ID switches misses false positives
A: no motion 0.859 0.606 82 411 16
B: constant velocity 0.878 0.708 43 380 17
C: B + low-score pass 0.887 0.706 58 333 17
  • The motion model mattered most for identity: ID switches roughly halved (82 to 43) and IDF1 rose by 0.10, while MOTA moved by only 0.019. MOTA alone would have hidden the difference.
  • The low-score pass did what it promises for detection: misses fell from 380 to 333 and MOTA rose on all three seeds (by 0.009, 0.006 and 0.014), with no extra false positives.
  • It did not reliably help identity: IDF1 0.706 against 0.708 here, 0.788 against 0.798 on seed 1 and 0.735 against 0.695 on seed 2; ID switches rose from 43 to 58. Occluded low-score boxes sit next to the occluder and are sometimes attached to the wrong track: a mixed, honest result.
  • Seeds 1 and 2: ID switches 102 and 102 (A), 25 and 43 (B), 27 and 47 (C).
  • Caveat: greedy rather than Hungarian assignment, simplified motion filter, IDF1 with a greedy identity mapping, and synthetic straight-line motion that favours constant-velocity models.
🐍 Exercise 2 (research): what do a motion model and low-score association each contribute to tracking through occlusions?
Track simulated pedestrians with no motion model, a constant-velocity prediction and a ByteTrack-style low-score pass, and compare MOTA, IDF1 and identity switches.

Object tracking in AI, robotics and aerospace

  • Autonomous vehicles and drones: 2D and 3D multi-object tracking feeds prediction and planning; camera-motion compensation is essential on drones.
  • Space situational awareness: detecting and linking faint streaks of satellites and debris across telescope frames, with orbital rather than constant-velocity motion models.
  • Earth observation video: vehicle and ship tracking in satellite video (for example SkySat and Jilin-1), where objects are a few pixels across.
  • Rendezvous: tracking a target spacecraft’s keypoints or features across frames to filter its pose (G2-5).

References

  1. K. Bernardin and R. Stiefelhagen (2008). “Evaluating multiple object tracking performance: the CLEAR MOT metrics.” EURASIP Journal on Image and Video Processing.
  2. E. Ristani, F. Solera, R. Zou, R. Cucchiara and C. Tomasi (2016). “Performance measures and a data set for multi-target, multi-camera tracking.” ECCV Workshops.
  3. A. Bewley, Z. Ge, L. Ott, F. Ramos and B. Upcroft (2016). “Simple online and realtime tracking.” ICIP.
  4. N. Wojke, A. Bewley and D. Paulus (2017). “Simple online and realtime tracking with a deep association metric.” ICIP.
  5. J. Luiten et al. (2021). “HOTA: a higher order metric for evaluating multi-object tracking.” IJCV.
  6. Y. Zhang et al. (2022). “ByteTrack: multi-object tracking by associating every detection box.” ECCV.
  7. J. Cao et al. (2023). “Observation-centric SORT: rethinking SORT for robust multi-object tracking.” CVPR.
  8. P. Sun et al. (2022). “DanceTrack: multi-object tracking in uniform appearance and diverse motion.” CVPR.