Robotics
← Roadmap/State Estimation

Multi-Object Tracking

Track many objects over time — data association + filtering.

Progress0/40 questions
hardState EstimationSkip to practice questions ↓

Prerequisites

Why it matters in robotics

Perception doesn't stop at detecting objects in a single frame: a robot must maintain consistent identities and smooth position and velocity estimates for many objects over time, through occlusions, missed detections, and clutter. Multi-object tracking is the bridge from per-frame detection to prediction and planning, turning noisy detections into stable tracks with velocity. The crux is data association, deciding which new measurement belongs to which existing track, layered on top of per-track filtering and the management of when a track is created, confirmed, or dropped. It is what autonomous vehicle, drone, and surveillance perception stacks rely on to turn raw detections into actionable, persistent tracks.

What to study

  • The tracking-by-detection loop: detect, predict, associate, update, and manage the track lifecycle (birth / confirm / coast / delete)
  • Data association: gating, the assignment problem and the Hungarian algorithm (global nearest neighbor), probabilistic JPDA, and hypothesis-oriented MHT
  • Per-track filtering: constant-velocity / constant-acceleration Kalman filters, IMM for maneuvering targets, and choosing the track state (position, velocity, size, orientation)
  • Failure modes: clutter and false positives/negatives, occlusions, track fragmentation, and ID switches
  • Motion vs. appearance cues (SORT vs. DeepSORT), multi-sensor (lidar+camera) tracking, and modern end-to-end trackers
  • Evaluation metrics: MOTA, MOTP, IDF1, and how ID switches and fragmentations are scored

Where to study

  1. 📄Simple Online and Realtime Tracking (SORT)PaperBewley et al., 2016· ~40 min

Cheatsheet

Symbols used below

xkx_kstate (position, velocity, ...) of track kk
zjz_jdetection jj in the current frame
d2(k,j)d^2(k,j)Mahalanobis distance between track kk's prediction and detection jj
SkS_kinnovation covariance of track kk
h(xk)h(x_k)measurement model — predicted detection given track kk's state
IoUintersection-over-union between two boxes

The tracking-by-detection loop

Each frame: predict every existing track forward with its own filter, associate new detections to predicted tracks, update matched tracks with their assigned detection, then manage the track lifecycle — birth a new track for unmatched detections, coast (predict without updating) briefly-unmatched tracks, and delete tracks that go too long without a match.

Gating before matching

A track only considers detections inside its validation gate:

d2(k,j)=(zjh(xk))Sk1(zjh(xk))d^2(k,j) = (z_j - h(x_k))^\top S_k^{-1} (z_j - h(x_k))

Detections with d2d^2 above a chi-squared threshold are excluded before assignment — this prunes obviously-wrong pairings and keeps the association problem small, using either Mahalanobis distance or IoU as the cost.

Assignment: Hungarian algorithm

Global nearest neighbor treats association as bipartite matching: build a track-by-detection cost matrix (Mahalanobis distance or 1IoU1 - IoU), then the Hungarian algorithm finds the minimum-total-cost one-to-one assignment in O(n3)O(n^3).

It's optimal for a single hard assignment per frame, but commits early — it can't recover from an assignment that looks right now but is wrong once more frames arrive.

Per-track filtering

Each track runs its own Kalman filter, typically a constant-velocity or constant-acceleration model on position and velocity (and sometimes size/orientation). For targets that switch between motion patterns (cruising vs turning), an IMM blends several motion models' estimates weighted by how well each currently fits.

Failure modes

Occlusion: a track goes unmatched for several frames — coasting on prediction alone risks losing it, especially under a poor motion model.

Clutter / false positives: spurious detections can hijack an assignment or spawn a phantom track.

ID switches: two crossing tracks swap identities when the association picks the wrong (but locally cheaper) pairing — the leading cause of tracking errors near occlusions and crossings.

Motion vs. appearance cues

SORT associates using only motion (IoU between predicted and detected boxes) — fast, but fragile through occlusion. DeepSORT adds an appearance embedding to the cost, so a track can re-identify its object even after a gap where motion alone would be ambiguous.

Evaluation uses MOTA (accuracy — penalizes misses, false positives, and ID switches), MOTP (localization precision of matched boxes), and IDF1 (how consistently identity is preserved over the whole track, not just per-frame).

DetectPredictAssociateUpdateManagenext frame
Tracking-by-detection: each frame, predict existing tracks forward, associate detections to tracks (IoU/Mahalanobis + Hungarian), update the matched tracks, then birth new tracks and kill stale ones.
 GNN (Hungarian)JPDAMHT
Assignment styleSingle best one-to-one match per frameSoft, probabilistic — blends all gated detections weighted by association probabilityKeeps multiple hypothesis trees, deferring the hard decision
Handles ambiguityPoorly — commits immediatelyReasonably — updates with a weighted combination instead of guessingWell — delays commitment until later frames disambiguate
Compute costLow, O(n3)O(n^3)ModerateHigh — hypothesis trees can grow combinatorially without pruning
predicted trackdet 1det 2gated outtwo detections in the gate → association ambiguity (JPDA / MHT)
A validation gate — the region around a track's predicted state, sized by its covariance — bounds which detections it may match. Here two detections fall inside the same gate, so the association is ambiguous.

Application focus

Select an application above.

Practice questions (40)