Inference pipeline
tests/regression/inference/:
tracker_bridge.py:TrackerBridgedispatches per tracker.SushiTrackis driven through the public-API binding (bindings/python/sushitrack.py), so the C API is consumed in one place and the binding is exercised on every inference frame. The reference trackers (ByteTrack,OCSORT) have no public C API and stay on theTrackerRegistryshim (create_tracker/tracker_process_c/delete_trackerintracker_bridge.{dll,so}, built fromtests/regression/TrackerRegistry.cppwhen-DBUILD_REGRESSION_TEST=ON). Both paths return the same{track_id, bbox, score}shape.pipeline.py: definesIDetector,YOLOXDetector(loads weights viayolox.exp.get_exp, preprocesses with optional legacy normalisation, runs inference, postprocesses with NMS), andVideoPipeline(frame loop, detection→tracker hand-off, drawing, optional MOT-format detection logging, stress/no-screen modes).demo.py: argparse front-end exposing the full YOLOX + tracker flag set. Invoked throughst infer.
pipeline.py appends cli/ to sys.path before it imports sushitrack_cli.console. demo.py already does that when it imports the module, but pipeline.py is also importable on its own, so it repeats the step.
tests/regression/TrackerRegistry.h declares the C entry points of the shim for ctypes and exports them with EXPORT_API. That macro is a smaller copy of the pattern in SushiTrack/sushitrack_export.hpp, not a reuse of SUSHITRACK_API. SUSHITRACK_API is gated by SUSHITRACK_EXPORTS, which is specific to the sushitrack target, and tracker_bridge is a separate DLL that ctypes loads with dlopen() and nothing links against, so it needs no dllimport branch.
Example end-to-end run:
st build
st infer \
-n yolox-x -c third_party/weight/mot17x.pth.tar \
--source third_party/video/MOT17-04.mp4 \
--tracker SushiTrack --num-classes 1 --legacy
The pipeline auto-detects MOT17 checkpoints by filename and sets tsize=(800,1440) accordingly.

