$ show mikel-brostrom/boxmot
BoxMOT is a production-grade multi-object tracking (MOT) library providing a unified Python and C++ runtime for a dozen trackers (ByteTrack, BoT-SORT, OC-SORT, DeepOCSort, StrongSORT, HybridSORT, BoostTrack, OccluBoost, SFSORT, EagerMOT, MAF-HDA), pluggable detectors (Ultralytics YOLO, YOLOX, RT-DETR), ReID appearance encoders, and segmentation/mask-guidance backends (SAM, EdgeTAM). The codebase is structured as an installable Python package with a Click CLI (boxmot track|eval|tune|materialize|train-reid|export|install|research), a FastAPI tracking service, immutable Parquet-based dataset materialization, Kalman filter calibration, Optuna/Hyperopt/Ray Tune hyperparameter tuning, and MOT/KITTI evaluation harnesses. Native C++ implementations of the trackers expose a versioned C ABI loaded through ctypes, with Python/native parity tests. Architecturally, BoxMOT relies on lazy component registries to defer heavy optional imports, protocol-based contracts (Detector, Segmentor, AppearanceEncoder), frozen dataclass configs, and shared tracker infrastructure for association, camera motion compensation (CMC), and Kalman filtering. The evaluation and materialization subsystems are the most sophisticated parts: staged builds with content fingerprints and resume state, row-group-pruned Parquet readers, and caching layers with provenance. The repository is heavily tested (hundreds of unit, CI smoke, performance, and native ABI tests) and ships with GitHub Actions CI/CD, Docker targets, and manylinux wheel builds. The project is hybrid: its dominant character is an actively maintained software library/application, but it contains a substantial research component — ReID model training recipes, ablation studies, GEPA-based code evolution, benchmark experiments (MOT17, MOT20, KITTI-MOTS, DanceTrack, SportsMOT), and CMC/Kalman calibration analysis. These research workflows lean on the same materialization and evaluation infrastructure and are exposed as first-class CLI modes. Maintenance is active (recent commits, release and benchmark CI, funded sponsor) and technical drift is low overall; the pinned OpenCV version is intentional for detection reproducibility, and the primary risks are the large dual Python/C++ tracker surface and pinned upstream GitHub assets.
The LLM identified 5 files worth highlighting for reuse:
Contextvar-based component timing sink that records phase and call durations with device synchronization, without threading state through call sites. Self-contained and extractable into any Python project needing structured, opt-in timing instrumentation.
Declarative association stage DSL: typed cost functions, matchers, index selectors, and absolute-index mapping compose into matching pipelines. Isolated from tracker internals; reusable for any bipartite matching or data-association workflow.
Sequence-scoped Parquet reader that prunes row groups by key range and applies schema validation with column projection. Demonstrates non-obvious columnar storage skill; adaptable to any time-series or sequence-keyed dataset without the rest of the MOT stack.
Lazy component registry that resolves factories without importing heavy backends until first use, paired with module-level __getattr__ exports to keep optional dependencies (torch, tensorrt, tflite) unloaded until needed. Extracts cleanly into any library requiring optional-dependency management.
Stateless and stateful batched Kalman predict/update/gating kernels using Cholesky solves, with parity tests against scalar paths. A self-contained numerical pattern reusable for any batch state-estimation workload, not just tracking.