#8536·fiftyone

Design: multi-object tracking evaluation API (from PR #8119)

Author: roboav8rCreated Sep 23, 2026Updated Sep 23, 2026
Labelsfeaturecoreneeds design

Background

#8119 contributes a working multi-object tracking (MOT) evaluator (dataset.evaluate_tracks(), TrackEval-backed HOTA/CLEAR/Identity). The implementation is solid and its tests pass locally.

Adding a design issue, since per CONTRIBUTING.md it trips three "needs design" triggers:

  • New user-facing API - evaluate_tracks(), TrackingResults, ~25 metric names.
  • Adds a library dependency - TrackEval and pycocotools.
  • Modifies an internal abstraction - adds a new "tracking" run type to fiftyone/core/runs.py and fiftyone/core/config.py.

The PR itself is solid, but I thought this merited a separate discussion since we are expanding FiftyOne into Physical AI and new datatypes. Tracking support may need to extend to tracker model training and inference, as well as different datatypes beyond the video that @timmermansjoy 's PR covers well.

Decisions to make

1. How general should the API be?

As written, the PR is as follows:

  • evaluate_tracks() supports 2D video via validate_non_grouped_collection + validate_video_collection
  • Track ID is derived from the integer Detection.index, e.g. "person 2"
  • Similarity metrics supported include box or mask IoU

We may ultimately wish to support:

  • Alternate dataset types, like grouped, or multimodal, .mcap/LeRobot.
  • 3D cuboids
  • Identity via fo.Instance rather than an integer index
  • Similarity metrics like 3D IoU, Euclidean distance

AV/robotics tracking datasets (nuScenes, Waymo, Argoverse 2, KITTI Tracking, OSDaR23) are all this shape, and the reference protocol there is nuScenes AMOTA/AMOTP rather than MOTChallenge. The new multimodal media type is excluded too.

The question isn't whether #8119 should implement 3D right away (it shouldn't). It's whether the API it establishes now can grow to cover it later without a breaking change. Concretely:

  • Should identity be pluggable (index or Instance) rather than hardcoded to Detection.index?
  • Should the similarity function be a backend concern, so a 3D/BEV IoU backend slots in beside motchallenge / mots?
  • Does evaluate_tracks() remain the right entry point for a grouped collection, or does that want a different method?

*2. How to handle TrackEval dependency

TrackEval isn't published to PyPI. pip install trackeval installs kovalp/TrackEval, a community redistribution, not the JonathonLuiten/TrackEval repo the PR links to. It also pulls opencv-python and pycocotools, and declares numpy>=2.2.6 on py3.10 (the suite passes against 1.26.4).

The PR reaches into TrackEval private @staticmethods on _BaseDataset (MOTSChallenge._calculate_mask_ious, MotChallenge2DBox._calculate_box_ious ), potentially exposing us to maintenance risk against the third party fork.

Options:

  • pin the redistribution?
  • vendor the ~500 lines of metric code we need?
  • reimplement?

3. How strict should label validation be?

The evaluator raises and aborts the entire run on: a box with x < 0, w <= 0, or x + w > 1 + 1e-9; a duplicate index within a frame; a missing index; a missing label. Unclipped model outputs slightly outside [0, 1] are extremely common, and evaluate_detections() validates none of this.

Do we want clip-and-warn, a skip_invalid escape hatch, or hard failure? This should match whatever we consider the house style for evaluators.

4. Mask tracking memory management

_parse_mask() renders each detection to a full-frame boolean array, and _evaluate_trackeval() materializes every sequence before evaluating any of them. Peak memory is roughly (all detections in the dataset) x H x W — about 2 MB per detection at 1080p, so MOTS on a real dataset will OOM.

Both fixes are mechanical and don't change any result: RLE-encode once and pass is_encoded=True (TrackEval re-encodes per frame internally anyway), and stream per sequence, since combine_sequences() only ever consumes per-sequence results. Flagging it here rather than as a PR nit because it's really a question of what scale we need to support.

Process note

PRs targeting community don't run the heavy suite — .github/workflows/pr.yml sets heavy=true only for develop, main, and release/*. So #8119 has no automated test signal today; it first gets any at the community -> develop promotion. Separately, trackeval isn't in any requirements file, so 10 of its 11 tests skip even where the suite does run. I'll suggest that fix on the PR.