Multi-Object Tracking
Track many objects over time — data association + filtering.
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
Cheatsheet
Symbols used below
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:
Detections with 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 ), then the Hungarian algorithm finds the minimum-total-cost one-to-one assignment in .
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).
| GNN (Hungarian) | JPDA | MHT | |
|---|---|---|---|
| Assignment style | Single best one-to-one match per frame | Soft, probabilistic — blends all gated detections weighted by association probability | Keeps multiple hypothesis trees, deferring the hard decision |
| Handles ambiguity | Poorly — commits immediately | Reasonably — updates with a weighted combination instead of guessing | Well — delays commitment until later frames disambiguate |
| Compute cost | Low, | Moderate | High — hypothesis trees can grow combinatorially without pruning |
Application focus
Practice questions (40)
- Explain the object-tracking pipelineInterviewmedium
- Features used for object trackingInterviewmedium
- Types of classical tracking algorithmsInterviewhard
- Two association cost functions — and when not to use themInterviewmedium
- The Hungarian algorithm and its complexityInterviewhard
- Multiple Hypothesis Tracking (MHT)Interviewhard
- Joint Probabilistic Data Association (JPDA)Interviewhard
- MHT vs JPDA — why prefer MHTInterviewhard
- Different ways of doing data associationInterviewmedium
- Qualitative and quantitative tracking metricsInterviewhard
- Two detections inside one track's gateInterviewmedium
- Choosing the state for a trackerInterviewmedium
- Hyperparameters of a trackerInterviewmedium
- Handling varying bounding-box sizes in the trackerInterviewmedium
- Challenges in designing a trackerInterviewmedium
- ML vs non-ML tracking approachesInterviewmedium
- Design changes that improve a trackerInterviewhard
- Testing and evaluating a trackerInterviewhard
- Modeling lidar noise for a trackerInterviewhard
- Dealing with noise in segmented objectsInterviewhard
- False positives at the tracker input, and how to handle themInterviewmedium
- Overlapping regions in multi-lidar trackingInterviewhard
- Making a tracker efficient (time, memory, design)Interviewhard
- Why you need ego-motion compensation for tracked objectsInterviewmedium
- Tracking slow-moving objectsInterviewhard
- Evaluating velocity precision of tracksInterviewhard
- Tracking animals suddenly crossing a highway laterallyInterviewhard
- Static objects that appear to move due to perspective changeInterviewhard
- Obstacle avoidance on detections vs on tracksInterviewmedium
- Lidar disadvantages specifically for trackingInterviewmedium
- Tracking corners under a perspective shift, with orientation noiseInterviewhard
- Tuning process noise for a trackerInterviewmedium
- Choosing the maximum range to track objectsInterviewmedium
- Feature similarity measures beyond L1/L2Interviewmedium
- Orientation with four discrete hypotheses and Gaussian mixturesInterviewhard
- When a past-frame association would have made a better trackInterviewhard
- Tracking a dog running to fetch a ball that has landedInterviewmedium
- Tracking a dog that jumps to catch the ball mid-airInterviewhard
- Tracking a dog that somersaults to catch the ballInterviewhard
- Tracking the trajectory of a thrown ballInterviewmedium