pub struct ByteTracker { /* private fields */ }Expand description
ByteTrack multi-object tracker.
Uses two-stage association: first matching high-confidence detections to existing tracks, then trying to match low-confidence detections to remaining unmatched tracks.
Implementations§
Source§impl ByteTracker
impl ByteTracker
Sourcepub fn new(
high_threshold: f32,
low_threshold: f32,
iou_threshold: f32,
max_age: usize,
) -> Self
pub fn new( high_threshold: f32, low_threshold: f32, iou_threshold: f32, max_age: usize, ) -> Self
Create a new ByteTracker.
high_threshold: minimum score to be considered high-confidence (e.g. 0.5).low_threshold: minimum score to be considered at all (e.g. 0.1).iou_threshold: minimum IoU for a detection-track match (e.g. 0.3).max_age: frames a track survives without a match before deletion.
Sourcepub fn update(&mut self, detections: &[Detection]) -> Vec<TrackedDetection>
pub fn update(&mut self, detections: &[Detection]) -> Vec<TrackedDetection>
Update the tracker with a new frame of detections.
Returns the list of currently tracked detections with their track IDs.
Sourcepub fn active_track_count(&self) -> usize
pub fn active_track_count(&self) -> usize
Return the number of currently active tracks.
Auto Trait Implementations§
impl Freeze for ByteTracker
impl RefUnwindSafe for ByteTracker
impl Send for ByteTracker
impl Sync for ByteTracker
impl Unpin for ByteTracker
impl UnsafeUnpin for ByteTracker
impl UnwindSafe for ByteTracker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more