pub struct VisualSortOptions { /* private fields */ }Expand description
Class that is used to configure the Visual Tracker
Implementations§
Source§impl VisualSortOptions
impl VisualSortOptions
Sourcepub fn max_idle_epochs(self, n: usize) -> Self
pub fn max_idle_epochs(self, n: usize) -> Self
The number of epochs the track remains active.
Lets the Frame Rate per second is 30, setting max_idle_epochs to 30 means that the
track in store will be active even if only one new observation was merged with it during the
second. If during 30 invocations of predict for the scene, where the track is defined,
no observations are merged with it, the track will be marked as wasted, and no further
observations will be merged with it.
Sourcepub fn kept_history_length(self, n: usize) -> Self
pub fn kept_history_length(self, n: usize) -> Self
The number of last observations, predictions, and features kept within the track attributes.
The track’s attributes may accumulate last observations, predictions, and features for the
caller’s purpose. To protect the system from overflow kept_history_length parameter is used.
It forces the track to keep only the last N values instead of unlimited history. The parameter
is important when one uses the tracker in offline mode - when the wasted tracks are used to get
the history. If the tracker is an online tracker, setting 1 is a reasonable value to keep memory
utilization low.
Sourcepub fn visual_metric(self, metric: VisualSortMetricType) -> Self
pub fn visual_metric(self, metric: VisualSortMetricType) -> Self
The method is used to calculate the distance for visual_sort feature vectors.
Currently, cosine and euclidean metrics are supported. The one you choose is defined by the ReID model used.
Sourcepub fn visual_min_votes(self, n: usize) -> Self
pub fn visual_min_votes(self, n: usize) -> Self
The minimal number of votes that is required to allow a track candidate to surpass the enabling
threshold of the visual_sort voting. The maximum allowed number of visual_sort features kept for the track
is defined by visual_max_observations.
Don’t confuse visual_max_observations with kept_history_length - they have no relation.
The later is only used for caller purposes, not for track prediction.
When the track candidate consisting of the single observation is compared versus tracks kept in
the store the system calculates up to N distances (1 X N), where N at most is equal to
visual_max_observations, but can be less if the track is short or previous observations were
ignored due to quality or other constraints.
Only when N >= visual_min_votes, the track candidate is used in leader selection.
Sourcepub fn visual_max_observations(self, n: usize) -> Self
pub fn visual_max_observations(self, n: usize) -> Self
The maximum number of visual_sort observations kept in the track for visual_sort estimations. The features
are collected in the track from the candidates, and when the visual_max_observations is
reached, the features with lower quality are wiped from the track.
Sourcepub fn positional_min_confidence(self, conf: f32) -> Self
pub fn positional_min_confidence(self, conf: f32) -> Self
Minimal allowed confidence for bounding boxes. If the confidence is less than specified it is corrected to be the minimal
Sourcepub fn spatio_temporal_constraints(
self,
constraints: SpatioTemporalConstraints,
) -> Self
pub fn spatio_temporal_constraints( self, constraints: SpatioTemporalConstraints, ) -> Self
The constraints define how far the candidate is allowed to be from a track’s last box to participate in the selection for the track. If the track candidate is too far from the track kept in the store, it is skipped from the comparison.
Sourcepub fn positional_metric(self, metric: PositionalMetricType) -> Self
pub fn positional_metric(self, metric: PositionalMetricType) -> Self
The parameter defines which positional metric is used to calculate distances between the track candidate and tracks kept in the store. There are two metrics are supported - the Mahalanobis metric and the IoU metric.
Sourcepub fn visual_minimal_track_length(self, length: usize) -> Self
pub fn visual_minimal_track_length(self, length: usize) -> Self
The minimally required number of visual_sort features in the track that enables their usage in
candidates estimation. If the track is short and there are fewer features collected than
visual_minimal_track_length then candidates are estimated against it only by positional
distance. Keep in mind that this parameter must be less than or equal
to visual_max_observations to have sense.
Sourcepub fn visual_minimal_area(self, area: f32) -> Self
pub fn visual_minimal_area(self, area: f32) -> Self
The minimal required area of track candidate’s bounding box to use the visual_sort feature in estimation. This parameter protects from the low-quality features received from the smallish boxes.
Sourcepub fn visual_minimal_quality_use(self, q: f32) -> Self
pub fn visual_minimal_quality_use(self, q: f32) -> Self
The visual_sort quality threshold of a feature that activates the visual_sort estimation of a candidate versus the tracks kept in the store.
Sourcepub fn visual_minimal_quality_collect(self, q: f32) -> Self
pub fn visual_minimal_quality_collect(self, q: f32) -> Self
The visual_sort quality threshold of a feature that activates the adding of the visual_sort feature to the track’s visual_sort features.
Sourcepub fn visual_minimal_own_area_percentage_use(self, area: f32) -> Self
pub fn visual_minimal_own_area_percentage_use(self, area: f32) -> Self
The threshold is calculated as solely_owned_area / all_area of the bounding box that
prevents low-quality visual_sort features received in a messy environment from being used in
visual_sort predictions.
Sourcepub fn visual_minimal_own_area_percentage_collect(self, area: f32) -> Self
pub fn visual_minimal_own_area_percentage_collect(self, area: f32) -> Self
The threshold is calculated as solely_owned_area / all_area of the bounding box that prevents
low-quality visual_sort features received in a messy environment from being collected to a track
for making visual_sort predictions.
pub fn kalman_position_weight(self, weight: f32) -> Self
pub fn kalman_velocity_weight(self, weight: f32) -> Self
Trait Implementations§
Source§impl Clone for VisualSortOptions
impl Clone for VisualSortOptions
Source§fn clone(&self) -> VisualSortOptions
fn clone(&self) -> VisualSortOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VisualSortOptions
impl Debug for VisualSortOptions
Auto Trait Implementations§
impl Freeze for VisualSortOptions
impl RefUnwindSafe for VisualSortOptions
impl Send for VisualSortOptions
impl Sync for VisualSortOptions
impl Unpin for VisualSortOptions
impl UnwindSafe for VisualSortOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
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.