Skip to main content

TrackerConfig

Struct TrackerConfig 

Source
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: f32

Minimum 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: f32

Fallback 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: f32

How 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: f32

Detections below this confidence are ignored entirely.

§confirm_hits: u32

Consecutive associated frames before a tentative track is confirmed.

§max_coast_frames: u32

Consecutive 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: f32

Measurement 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: f32

Process noise: how much the motion model is allowed to drift per frame. Higher ⇒ the filter adapts faster to acceleration / turns.

§max_velocity: f32

Largest 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: f32

Minimum 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: f32

Appearance 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: f32

Template 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: ScoreWeights

Weights 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.

Trait Implementations§

Source§

impl Clone for TrackerConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TrackerConfig

Source§

impl Debug for TrackerConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TrackerConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more