pub struct ByteTrackBuilder { /* private fields */ }Implementations§
Source§impl ByteTrackBuilder
impl ByteTrackBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ByteTrackBuilder with default parameters. These defaults are:
- track_high_conf: 0.7
- track_iou: 0.25
- track_update: 0.25
- track_extra_lifespan: 500_000_000 (0.5 seconds)
§Examples
use edgefirst_tracker::{bytetrack::ByteTrackBuilder, Tracker, MockDetection};
let mut tracker = ByteTrackBuilder::new().build();
assert_eq!(tracker.track_high_conf, 0.7);
assert_eq!(tracker.track_iou, 0.25);
assert_eq!(tracker.track_update, 0.25);
assert_eq!(tracker.track_extra_lifespan, 500_000_000);Sourcepub fn track_extra_lifespan(self, lifespan: u64) -> Self
pub fn track_extra_lifespan(self, lifespan: u64) -> Self
Sets the extra lifespan for tracks in nanoseconds.
Sourcepub fn track_high_conf(self, conf: f32) -> Self
pub fn track_high_conf(self, conf: f32) -> Self
Sets the high confidence threshold for tracking.
Sourcepub fn track_update(self, update: f32) -> Self
pub fn track_update(self, update: f32) -> Self
Sets the update rate for the Kalman filter.
Sourcepub fn build<T: DetectionBox>(self) -> ByteTrack<T>
pub fn build<T: DetectionBox>(self) -> ByteTrack<T>
Builds the ByteTrack tracker with the specified parameters.
§Examples
use edgefirst_tracker::{bytetrack::ByteTrackBuilder, Tracker, MockDetection};
let mut tracker = ByteTrackBuilder::new()
.track_high_conf(0.8)
.track_iou(0.3)
.track_update(0.2)
.track_extra_lifespan(1_000_000_000)
.build();
assert_eq!(tracker.track_high_conf, 0.8);
assert_eq!(tracker.track_iou, 0.3);
assert_eq!(tracker.track_update, 0.2);
assert_eq!(tracker.track_extra_lifespan, 1_000_000_000);Trait Implementations§
Source§impl Clone for ByteTrackBuilder
impl Clone for ByteTrackBuilder
Source§fn clone(&self) -> ByteTrackBuilder
fn clone(&self) -> ByteTrackBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ByteTrackBuilder
impl Debug for ByteTrackBuilder
Source§impl Default for ByteTrackBuilder
impl Default for ByteTrackBuilder
Source§impl PartialEq for ByteTrackBuilder
impl PartialEq for ByteTrackBuilder
impl Copy for ByteTrackBuilder
impl StructuralPartialEq for ByteTrackBuilder
Auto Trait Implementations§
impl Freeze for ByteTrackBuilder
impl RefUnwindSafe for ByteTrackBuilder
impl Send for ByteTrackBuilder
impl Sync for ByteTrackBuilder
impl Unpin for ByteTrackBuilder
impl UnsafeUnpin for ByteTrackBuilder
impl UnwindSafe for ByteTrackBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.