Add a Tracker
To integrate a new tracker cleanly:
- Add a module under the appropriate modality folder, such as
boxmot/trackers/bbox/<name>.py,boxmot/trackers/mask/<name>/, orboxmot/trackers/hybrid/<name>/. - Implement a tracker class that subclasses
BaseTrackerand definesupdate(). - Add a
TrackerDefinitiontoTRACKER_DEFINITIONSinboxmot/trackers/registry.py.TRACKER_MAPPING,REID_TRACKERS, and the class-name map are derived from those definitions. - Export the class from its modality package, such as
boxmot/trackers/bbox/__init__.pyorboxmot/trackers/hybrid/__init__.py. Add a higher-level re-export only when it is intentionally part of that package's public API. - Add
boxmot/configs/trackers/<name>.yamlwith each parameter's runtime default and tuning metadata. - Add a tracker doc page and wire it into
mkdocs.yml. - Extend registry/package tests under
tests/unit/trackers/, tracker-contract tests undertests/unit/trackers/bbox/or the relevant modality, and the tracker lists intests/test_config.pywhere applicable. - Update the tracker, ReID, mask/OBB, and benchmark lists in
.github/workflows/when the new tracker should run in those jobs.
Optional native C++ backend
If the tracker also gets a native backend:
- Add native sources under
boxmot/native/cpp/trackers/<name>/. - Add the tracker subdirectory and wheel-install entries to
boxmot/native/cpp/CMakeLists.txt. - Add Python wrapper code under
boxmot/native/trackers/<name>.py. - Register live and replay backends in
boxmot/native/registry.py. - Document
--tracker-backend cppsupport on the tracker page. - Add native wrapper tests under
tests/unit/native/trackers/test_native_<name>.py.
Native tracker sources should follow the existing CMake layout: a
<name>_replay executable for cached eval and tune, a <name>_capi shared
library for live track, and a <name>_core target for reusable C++ code.
Minimum checklist
- tracker implementation
- tracker registration
- tracker YAML
- docs page
- tests
- workflow matrices if benchmarked in CI
- native C++ registration and tests if a native backend is added