pub struct SortAttributes {
pub predicted_boxes: VecDeque<Universal2DBox>,
pub observed_boxes: VecDeque<Universal2DBox>,
pub last_updated_epoch: usize,
pub track_length: usize,
pub scene_id: u64,
pub custom_object_id: Option<i64>,
/* private fields */
}Expand description
Attributes associated with SORT track
Fields§
§predicted_boxes: VecDeque<Universal2DBox>The lastly predicted boxes
observed_boxes: VecDeque<Universal2DBox>The lastly observed boxes
last_updated_epoch: usizeThe epoch when the track was lastly updated
track_length: usizeThe length of the track
scene_id: u64Customer-specific scene identifier that splits the objects by classes, realms, etc.
custom_object_id: Option<i64>Custom object id
Implementations§
Source§impl SortAttributes
impl SortAttributes
Sourcepub fn new(opts: Arc<SortAttributesOptions>) -> Self
pub fn new(opts: Arc<SortAttributesOptions>) -> Self
Trait Implementations§
Source§impl Clone for SortAttributes
impl Clone for SortAttributes
Source§fn clone(&self) -> SortAttributes
fn clone(&self) -> SortAttributes
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 SortAttributes
impl Debug for SortAttributes
Source§impl Default for SortAttributes
impl Default for SortAttributes
Source§impl LookupRequest<SortAttributes, Universal2DBox> for SortLookup
impl LookupRequest<SortAttributes, Universal2DBox> for SortLookup
fn lookup( &self, attributes: &SortAttributes, _observations: &ObservationsDb<Universal2DBox>, _merge_history: &[u64], ) -> bool
Source§impl ObservationMetric<SortAttributes, Universal2DBox> for SortMetric
impl ObservationMetric<SortAttributes, Universal2DBox> for SortMetric
Source§fn metric(
&self,
mq: &MetricQuery<'_, SortAttributes, Universal2DBox>,
) -> MetricOutput<f32>
fn metric( &self, mq: &MetricQuery<'_, SortAttributes, Universal2DBox>, ) -> MetricOutput<f32>
calculates the distance between two features. Read more
Source§fn optimize(
&mut self,
_feature_class: u64,
_merge_history: &[u64],
attrs: &mut SortAttributes,
features: &mut Vec<Observation<Universal2DBox>>,
_prev_length: usize,
_is_merge: bool,
) -> Result<()>
fn optimize( &mut self, _feature_class: u64, _merge_history: &[u64], attrs: &mut SortAttributes, features: &mut Vec<Observation<Universal2DBox>>, _prev_length: usize, _is_merge: bool, ) -> Result<()>
the method is used every time, when a new observation is added to the feature storage as well as when
two tracks are merged. Read more
Source§fn postprocess_distances(
&self,
unfiltered: Vec<ObservationMetricOk<Universal2DBox>>,
) -> Vec<ObservationMetricOk<Universal2DBox>>
fn postprocess_distances( &self, unfiltered: Vec<ObservationMetricOk<Universal2DBox>>, ) -> Vec<ObservationMetricOk<Universal2DBox>>
The postprocessing is run just before the executor returns calculated distances. Read more
Source§impl TrackAttributes<SortAttributes, Universal2DBox> for SortAttributes
impl TrackAttributes<SortAttributes, Universal2DBox> for SortAttributes
type Update = SortAttributesUpdate
type Lookup = SortLookup
Source§fn compatible(&self, other: &SortAttributes) -> bool
fn compatible(&self, other: &SortAttributes) -> bool
The method is used to evaluate attributes of two tracks to determine whether tracks are compatible
for distance calculation. When the attributes are compatible, the method returns
true. Read moreSource§fn merge(&mut self, other: &SortAttributes) -> Result<()>
fn merge(&mut self, other: &SortAttributes) -> Result<()>
When the tracks are merged, their attributes are merged as well. The method defines the approach to merge attributes. Read more
Source§fn baked(
&self,
_observations: &ObservationsDb<Universal2DBox>,
) -> Result<TrackStatus>
fn baked( &self, _observations: &ObservationsDb<Universal2DBox>, ) -> Result<TrackStatus>
The method is used by storage to determine when track is ready/not ready/wasted. Look at TrackStatus. Read more
Source§impl TrackAttributesKalmanPrediction for SortAttributes
impl TrackAttributesKalmanPrediction for SortAttributes
fn get_state(&self) -> Option<KalmanState<{ DIM_2D_BOX_X2 }>>
fn set_state(&mut self, state: KalmanState<{ DIM_2D_BOX_X2 }>)
fn get_position_weight(&self) -> f32
fn get_velocity_weight(&self) -> f32
fn make_prediction( &mut self, observation_bbox: &Universal2DBox, ) -> Universal2DBox
Source§impl TrackerAPI<SortAttributes, SortMetric, Universal2DBox, SortAttributesOptions, NoopNotifier> for BatchSort
impl TrackerAPI<SortAttributes, SortMetric, Universal2DBox, SortAttributesOptions, NoopNotifier> for BatchSort
fn get_auto_waste_obj_mut(&mut self) -> &mut AutoWaste
fn get_opts(&self) -> &SortAttributesOptions
fn get_main_store_mut( &mut self, ) -> RwLockWriteGuard<'_, TrackStore<SortAttributes, SortMetric, Universal2DBox>>
fn get_wasted_store_mut( &mut self, ) -> RwLockWriteGuard<'_, TrackStore<SortAttributes, SortMetric, Universal2DBox>>
fn get_main_store( &self, ) -> RwLockReadGuard<'_, TrackStore<SortAttributes, SortMetric, Universal2DBox>>
fn get_wasted_store( &self, ) -> RwLockReadGuard<'_, TrackStore<SortAttributes, SortMetric, Universal2DBox>>
Source§fn set_auto_waste(&mut self, periodicity: usize)
fn set_auto_waste(&mut self, periodicity: usize)
change auto waste job periodicity
Source§fn skip_epochs(&mut self, n: usize)
fn skip_epochs(&mut self, n: usize)
Skip number of epochs to force tracks to turn to terminal state Read more
Source§fn skip_epochs_for_scene(&mut self, scene_id: u64, n: usize)
fn skip_epochs_for_scene(&mut self, scene_id: u64, n: usize)
Skip number of epochs to force tracks to turn to terminal state Read more
Source§fn current_epoch(&self) -> usize
fn current_epoch(&self) -> usize
Get the current epoch for
scene_id == 0Source§fn current_epoch_with_scene(&self, scene_id: u64) -> usize
fn current_epoch_with_scene(&self, scene_id: u64) -> usize
Get the current epoch for
scene_id Read moreSource§fn get_main_store_wasted(&mut self) -> Vec<Track<TA, M, OA, N>>
fn get_main_store_wasted(&mut self) -> Vec<Track<TA, M, OA, N>>
Receive all the tracks with expired life from the main store
fn auto_waste(&mut self)
fn wasted(&mut self) -> Vec<Track<TA, M, OA, N>>
Source§fn active_shard_stats(&self) -> Vec<usize>
fn active_shard_stats(&self) -> Vec<usize>
Get the amount of tracks kept in main store per shard
Source§fn wasted_shard_stats(&self) -> Vec<usize>
fn wasted_shard_stats(&self) -> Vec<usize>
Get the amount of tracks kept in wasted store per shard
Source§fn clear_wasted(&self)
fn clear_wasted(&self)
Clears wasted tracks
Source§impl TrackerAPI<SortAttributes, SortMetric, Universal2DBox, SortAttributesOptions, NoopNotifier> for Sort
impl TrackerAPI<SortAttributes, SortMetric, Universal2DBox, SortAttributesOptions, NoopNotifier> for Sort
fn get_auto_waste_obj_mut(&mut self) -> &mut AutoWaste
fn get_opts(&self) -> &SortAttributesOptions
fn get_main_store_mut( &mut self, ) -> RwLockWriteGuard<'_, TrackStore<SortAttributes, SortMetric, Universal2DBox, NoopNotifier>>
fn get_wasted_store_mut( &mut self, ) -> RwLockWriteGuard<'_, TrackStore<SortAttributes, SortMetric, Universal2DBox, NoopNotifier>>
fn get_main_store( &self, ) -> RwLockReadGuard<'_, TrackStore<SortAttributes, SortMetric, Universal2DBox, NoopNotifier>>
fn get_wasted_store( &self, ) -> RwLockReadGuard<'_, TrackStore<SortAttributes, SortMetric, Universal2DBox, NoopNotifier>>
Source§fn set_auto_waste(&mut self, periodicity: usize)
fn set_auto_waste(&mut self, periodicity: usize)
change auto waste job periodicity
Source§fn skip_epochs(&mut self, n: usize)
fn skip_epochs(&mut self, n: usize)
Skip number of epochs to force tracks to turn to terminal state Read more
Source§fn skip_epochs_for_scene(&mut self, scene_id: u64, n: usize)
fn skip_epochs_for_scene(&mut self, scene_id: u64, n: usize)
Skip number of epochs to force tracks to turn to terminal state Read more
Source§fn current_epoch(&self) -> usize
fn current_epoch(&self) -> usize
Get the current epoch for
scene_id == 0Source§fn current_epoch_with_scene(&self, scene_id: u64) -> usize
fn current_epoch_with_scene(&self, scene_id: u64) -> usize
Get the current epoch for
scene_id Read moreSource§fn get_main_store_wasted(&mut self) -> Vec<Track<TA, M, OA, N>>
fn get_main_store_wasted(&mut self) -> Vec<Track<TA, M, OA, N>>
Receive all the tracks with expired life from the main store
fn auto_waste(&mut self)
fn wasted(&mut self) -> Vec<Track<TA, M, OA, N>>
Source§fn active_shard_stats(&self) -> Vec<usize>
fn active_shard_stats(&self) -> Vec<usize>
Get the amount of tracks kept in main store per shard
Source§fn wasted_shard_stats(&self) -> Vec<usize>
fn wasted_shard_stats(&self) -> Vec<usize>
Get the amount of tracks kept in wasted store per shard
Source§fn clear_wasted(&self)
fn clear_wasted(&self)
Clears wasted tracks
Auto Trait Implementations§
impl Freeze for SortAttributes
impl RefUnwindSafe for SortAttributes
impl Send for SortAttributes
impl Sync for SortAttributes
impl Unpin for SortAttributes
impl UnwindSafe for SortAttributes
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<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 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>
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.