Sub topic 13
Evaluating Trackers: MOTA, IDF1, and HOTA
This chapter assumes that you know object detection, bounding boxes, and basic Python. You should also understand that a tracker assigns an identity number to each detected object across video frames.
What a tracker is evaluated against
A benchmark provides ground-truth tracks. A ground-truth track is the annotated path of one real object, including its identity. Your tracker produces predicted boxes and identity numbers.
An evaluator matches predicted boxes to ground-truth boxes using an overlap rule such as intersection over union (IoU) at a chosen threshold. It then counts errors:
- False negative (FN): a real object was not detected.
- False positive (FP): a predicted object has no matching real object.
- Identity switch (IDS): a real object is assigned a different predicted identity than before.
- Identity true positive (IDTP): a matched detection also has the correct identity relationship.
- Identity false positive (IDFP): a predicted identity assignment is incorrect.
- Identity false negative (IDFN): a ground-truth identity relationship is missing.
The same predictions can receive different scores because each metric emphasizes a different kind of error.
MOTA: mostly detection and identity errors
Multiple Object Tracking Accuracy (MOTA) combines missed detections, false positives, and identity switches:
MOTA = 1 - (FN + FP + IDS) / GT
Here, GT is the total number of ground-truth objects across all frames. A higher score is better. MOTA can be below zero when errors outnumber ground-truth objects.
MOTA is useful for measuring whether a tracker finds and maintains objects at all. However, it weights an identity switch as only one error, even if the switch causes a long sequence of incorrect identities. A tracker can therefore obtain a good MOTA score while producing poor identity continuity.
IDF1: identity continuity
IDF1 measures how consistently predicted identities correspond to real identities. It uses identity-level precision and recall:
IDF1 = 2 × IDTP / (2 × IDTP + IDFP + IDFN)
IDF1 is often more informative than MOTA when the application needs reliable trajectories, such as counting unique people or analyzing customer paths. A tracker that detects every person but frequently swaps their IDs may have high detection recall and low IDF1.
HOTA: a balanced view
Higher Order Tracking Accuracy (HOTA) separates detection quality from association quality:
HOTA = sqrt(DetA × AssA)
DetA measures whether objects were detected. AssA measures whether matched detections stay connected to the correct identity. HOTA averages this balance over several matching thresholds, so it is less dependent on one arbitrary IoU value.
| Metric | Main emphasis | Typical weakness |
|---|---|---|
| MOTA | Misses, false positives, and identity switches | Can hide long identity errors |
| IDF1 | Identity precision and recall | Less direct about box detection quality |
| HOTA | Detection and association together | More complex to interpret |
A small calculation
def mota(ground_truth, false_negatives, false_positives, id_switches):
if ground_truth == 0:
raise ValueError("ground_truth must be positive")
return 1 - (false_negatives + false_positives + id_switches) / ground_truth
print(mota(100, false_negatives=8, false_positives=5, id_switches=2))This example gives MOTA = 0.85. It does not calculate IDF1 or HOTA because those require identity-level matching information, not only aggregate detection errors.
Exercise
A tracker has excellent MOTA but poor IDF1. What is the likely problem?
Show answer
It detects objects successfully, but it frequently changes or swaps their identity assignments.