pub struct ByteTracker { /* private fields */ }Expand description
A ByteTrack multi-object tracker.
Unlike SortTracker’s
update, which mutates every
input detection in place, ByteTracker::update returns a new
Detections containing only the detections that ended up associated
with a track. This is a deliberate consequence of the algorithm: a
low-confidence detection that fails to match any existing track is, by
design, never allowed to spawn a new one (that’s what keeps ByteTrack
from turning background noise into new identities), so it has no track
id to report and is dropped from the output rather than passed through
unmodified.
Implementations§
Source§impl ByteTracker
impl ByteTracker
Sourcepub fn new(
track_activation_threshold: f32,
lost_track_buffer: usize,
high_confidence_matching_threshold: f32,
low_confidence_matching_threshold: f32,
) -> Self
pub fn new( track_activation_threshold: f32, lost_track_buffer: usize, high_confidence_matching_threshold: f32, low_confidence_matching_threshold: f32, ) -> Self
Creates a tracker.
track_activation_threshold: confidence cutoff between the high-confidence and low-confidence detection pools.lost_track_buffer: frames a track survives, unmatched, before being dropped.high_confidence_matching_threshold/low_confidence_matching_threshold: minimum IoU for a match in each of the two association passes.
Sourcepub fn active_tracks(&self) -> usize
pub fn active_tracks(&self) -> usize
Number of tracks currently being maintained, including lost-but-not- yet-aged-out ones.
Sourcepub fn update(&mut self, detections: &Detections) -> Detections
pub fn update(&mut self, detections: &Detections) -> Detections
Advances the tracker by one frame.
Returns a new Detections holding the subset of detections that
matched or spawned a track, each with Detection::tracker_id set;
see the type-level docs for why unmatched low-confidence detections
are dropped rather than passed through.
Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.