Skip to content

trackforge / trackers / common / obs_track


Module obs_track

Observation-centric Kalman track shared by OC-SORT and Deep OC-SORT.

Both trackers keep the same per-track state: the KalmanTrack filter, the usual lifecycle counters, and a bounded history of past observations used for velocity direction (OCM), re-update on re-association (ORU), and round-2 rematching on the last observed box. Deep OC-SORT additionally buffers appearance embeddings in pending_features; OC-SORT leaves that buffer empty. Keeping one type here means the observation-centric mechanics live in a single tested place.

Quick Reference

Item Kind Description
ObsTrack struct A tracked object with an observation history.

Types

ObsTrack

struct ObsTrack {
    pub tlwh: [f32; 4],
    pub score: f32,
    pub class_id: i64,
    pub track_id: u64,
    pub state: crate::trackers::common::TrackState,
    pub hits: usize,
    pub hit_streak: usize,
    pub time_since_update: usize,
    pub age: usize,
    pub det_ind: Option<usize>,
    // [REDACTED: Private Fields]
}

A tracked object with an observation history.

Shared by OC-SORT and Deep OC-SORT (each re-exports it under its own name).

Fields

Name Type Description
tlwh [f32; 4] Bounding box in TLWH (top-left x, top-left y, width, height) format.
score f32 Detection confidence of the most recent match.
class_id i64 Class label of the most recent match.
track_id u64 Unique monotonically increasing track identifier.
state crate::trackers::common::TrackState Current lifecycle state.
hits usize Total number of detection matches over the track lifetime.
hit_streak usize Consecutive detection matches without interruption (resets on a missed frame).
time_since_update usize Frames elapsed since the last detection match.
age usize Total frames since track creation.
det_ind Option<usize> Index of the detection this track was most recently matched to (in the current frame's detection list), or None when unmatched this frame.

Implementations

fn is_confirmed(&self) -> bool

Whether the track has been confirmed and is returned to callers.

Trait Implementations

impl Clone for ObsTrack

fn clone(&self) -> ObsTrack

impl Debug for ObsTrack

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

fn to_subset(&self) -> Option<SS>

fn is_in_subset(&self) -> bool

fn to_subset_unchecked(&self) -> SS

fn from_subset(element: &SS) -> SP