Expand description
Multi-object tracking for EdgeFirst inference pipelines.
This crate provides the Tracker trait and a concrete implementation,
ByteTrack, which associates per-frame detections
into persistent tracks using two-pass IoU matching and Kalman-smoothed
trajectory prediction.
§Quick start
use edgefirst_tracker::{bytetrack::ByteTrackBuilder, Tracker, MockDetection};
let mut tracker = ByteTrackBuilder::new().build();
// Timestamps are nanoseconds; here we use small integers for clarity.
let frame1 = vec![MockDetection::new([0.1, 0.1, 0.5, 0.5], 0.9, 0)];
let infos = tracker.update(&frame1, 1_000_000);
// Each element corresponds to the detection at the same index; `Some` means
// the detection was either matched to an existing track or started a new one.
if let Some(info) = infos[0] {
println!("track {} created at t={}", info.uuid, info.created);
}§Terminology
- Tracklet — an internal state machine (Kalman filter + metadata) that follows one object across frames.
- Detection — a single-frame bounding box with confidence score and class label, produced by a model decoder.
- Track — the public view of a tracklet: a
TrackInfovalue returned byTracker::updateorTracker::get_active_tracks.
§Architecture
See crates/tracker/ARCHITECTURE.md
for the full design description, Mermaid class diagram, tracking flow, and
Kalman filter state documentation.
Re-exports§
pub use bytetrack::ByteTrack;pub use bytetrack::ByteTrackBuilder;
Modules§
Structs§
- Active
Track Info - A
TrackInfopaired with the most recent raw detection box for that track. - Track
Info - Per-track metadata returned by
Tracker::updateandTracker::get_active_tracks. - Uuid
- A Universally Unique Identifier (UUID).
Traits§
- Detection
Box - A bounding box produced by a detection model, suitable for use with a
Tracker. - Tracker
- Multi-object tracker interface.