trackers
trackers copied to clipboard
Dedup scale-aware noise machinery shared by BoTSORTTracklet/McByteTracklet
BoTSORTTracklet and McByteTracklet already share ~250 near-identical lines (_configure_initial_noise, _build_process_noise, _build_measurement_noise, _set_scale_aware_noise, both _refresh_*_noise_from_state, all _clamp_* static methods, _SIGMA_P/_SIGMA_V/_SIGMA_M).
PR #578 added a 5-line _diagonal_matrix helper duplicated verbatim across both files, on top of the existing duplication.
Extract to a shared base class or mixin; fold _diagonal_matrix into that work.
Shared home options:
utils/matrix.py, module-internal privacyutils/_matrix.py, exposing a publicdiagonal_matrix— a third consumer already exists atsrc/trackers/utils/motion_models.py:236
Constraint: do not add to src/trackers/__init__.py — that surface is the stable public API per repo convention.
Source: /oss:review PR #578 report, .reports/review/2026-09-10T11-04-46Z/review-report.md, finding A1.