pub struct TrackerConfig {Show 13 fields
pub min_iou: f32,
pub max_center_dist_diag: f32,
pub gate_sigma: f32,
pub min_confidence: f32,
pub confirm_hits: u32,
pub max_coast_frames: u32,
pub measurement_noise: f32,
pub process_noise: f32,
pub max_velocity: f32,
pub min_appearance: f32,
pub ambiguous_margin: f32,
pub template_lr: f32,
pub score_weights: ScoreWeights,
}Expand description
Tuning for the tracker. Defaults are chosen for a hand-held / airborne camera at a few tens of frames per second; all are overridable.
Fields§
§min_iou: f32Minimum IoU between a candidate detection and the predicted box for the candidate to be eligible for the lock. The primary geometric gate.
max_center_dist_diag: f32Fallback center-distance gate, as a multiple of the predicted box’s
diagonal. A fast/weaving target can move enough that its boxes barely
overlap frame-to-frame; an in-diagonal center still associates. This is
the base multiplier; the live gate widens with the filter’s position
uncertainty (see max_gate_dist).
gate_sigma: f32How strongly the filter’s own position uncertainty widens the gate. During a coast the position covariance grows, so the gate should grow with it (a missed object can be further from the last prediction). In units of standard deviations of the position estimate added to the base gate. Zero reproduces a fixed gate.
min_confidence: f32Detections below this confidence are ignored entirely.
confirm_hits: u32Consecutive associated frames before a tentative track is confirmed.
max_coast_frames: u32Consecutive missed frames a confirmed track coasts (predict-only) before it is declared lost. Brief occlusion stays inside this budget and keeps the id; exceeding it drops the lock.
measurement_noise: f32Measurement noise: how much a single detection box is trusted versus the prediction. Higher ⇒ smoother (trust the model more), lower ⇒ snappier (trust the detection more). In the same units as the bbox (pixels).
process_noise: f32Process noise: how much the motion model is allowed to drift per frame. Higher ⇒ the filter adapts faster to acceleration / turns.
max_velocity: f32Largest velocity (pixels/frame, per box component) a single Kalman update may inject into the estimate. One jittered detection box must not be able to slam a huge velocity into the filter (which would then overshoot the next prediction and shake the lock loose). Clamping the per-update velocity change keeps a half-box-width jitter from poisoning the model.
min_appearance: f32Minimum appearance similarity for a candidate to be eligible as the locked object. A candidate that looks too unlike the template is rejected even if it sits dead-center in the motion gate (the shadowing-distractor defence). Only applied when a template + the candidate’s descriptor are both present.
ambiguous_margin: f32Appearance margin (best similarity minus second-best similarity) below which two candidates are treated as appearance-AMBIGUOUS: the lock will not silently pick one, it goes Uncertain and requests re-designation. This is the never-silent guard for two identical-looking objects.
template_lr: f32Template update rate (EMA factor in 0..=1) applied to the locked
object’s appearance on a confident measured association. Small ⇒ the
template adapts slowly to lighting / pose, so a one-frame wrong match
cannot snap the template onto a distractor.
score_weights: ScoreWeightsWeights for the combined association score: (appearance, motion, detector
confidence). Used only as the TIE-BREAK among candidates whose appearance
similarity is within Self::ambiguous_margin of the best, appearance
alone owns the primary ranking (see SingleObjectTracker::decide), so a
louder/closer distractor cannot out-rank a strictly-more-similar candidate
through this score. Normalized internally, so only the ratio matters.