VisualSortOptions

Struct VisualSortOptions 

Source
pub struct VisualSortOptions { /* private fields */ }
Expand description

Class that is used to configure the Visual Tracker

Implementations§

Source§

impl VisualSortOptions

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for VisualSortOptions

Source§

fn clone(&self) -> VisualSortOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VisualSortOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VisualSortOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl IntoPy<Py<PyAny>> for VisualSortOptions

Source§

fn into_py(self, py: Python<'_>) -> PyObject

Performs the conversion.
Source§

impl PyClass for VisualSortOptions

Source§

type Frozen = False

Whether the pyclass is frozen. Read more
Source§

impl PyClassImpl for VisualSortOptions

Source§

const DOC: &'static str = "Class that is used to configure the Visual Tracker\u{0}"

Class doc string
Source§

const IS_BASETYPE: bool = false

#[pyclass(subclass)]
Source§

const IS_SUBCLASS: bool = false

#[pyclass(extends=…)]
Source§

const IS_MAPPING: bool = false

#[pyclass(mapping)]
Source§

const IS_SEQUENCE: bool = false

#[pyclass(sequence)]
Source§

type Layout = PyCell<VisualSortOptions>

Layout
Source§

type BaseType = PyAny

Base class
Source§

type ThreadChecker = ThreadCheckerStub<VisualSortOptions>

This handles following two situations: Read more
Source§

type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild

Immutable or mutable
Source§

type Dict = PyClassDummySlot

Specify this class has #[pyclass(dict)] or not.
Source§

type WeakRef = PyClassDummySlot

Specify this class has #[pyclass(weakref)] or not.
Source§

type BaseNativeType = PyAny

The closest native ancestor. This is PyAny by default, and when you declare #[pyclass(extends=PyDict)], it’s PyDict.
Source§

fn items_iter() -> PyClassItemsIter

Source§

fn lazy_type_object() -> &'static LazyTypeObject<Self>

Source§

fn dict_offset() -> Option<isize>

Source§

fn weaklist_offset() -> Option<isize>

Source§

impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a VisualSortOptions

Source§

type Holder = Option<PyRef<'py, VisualSortOptions>>

Source§

fn extract(obj: &'py PyAny, holder: &'a mut Self::Holder) -> PyResult<Self>

Source§

impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut VisualSortOptions

Source§

type Holder = Option<PyRefMut<'py, VisualSortOptions>>

Source§

fn extract(obj: &'py PyAny, holder: &'a mut Self::Holder) -> PyResult<Self>

Source§

impl PyMethods<VisualSortOptions> for PyClassImplCollector<VisualSortOptions>

Source§

fn py_methods(self) -> &'static PyClassItems

Source§

impl PyTypeInfo for VisualSortOptions

Source§

const NAME: &'static str = "VisualSortOptions"

Class name.
Source§

const MODULE: Option<&'static str> = ::core::option::Option::None

Module name, if any.
Source§

type AsRefTarget = PyCell<VisualSortOptions>

Utility type to make Py::as_ref work.
Source§

fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject

Returns the PyTypeObject instance for this type.
Source§

fn type_object(py: Python<'_>) -> &PyType

Returns the safe abstraction over the type object.
Source§

fn is_type_of(object: &PyAny) -> bool

Checks if object is an instance of this type or a subclass of this type.
Source§

fn is_exact_type_of(object: &PyAny) -> bool

Checks if object is an instance of this type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromPyObject<'a> for T
where T: PyClass + Clone,

Source§

fn extract(obj: &'a PyAny) -> Result<T, PyErr>

Extracts Self from the source PyObject.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> OkWrap<T> for T
where T: IntoPy<Py<PyAny>>,

Source§

type Error = PyErr

Source§

fn wrap(self, py: Python<'_>) -> Result<Py<PyAny>, PyErr>

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PyErrArguments for T
where T: IntoPy<Py<PyAny>> + Send + Sync,

Source§

fn arguments(self, py: Python<'_>) -> Py<PyAny>

Arguments for exception
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool

Source§

impl<T> PyTypeObject for T
where T: PyTypeInfo,

Source§

impl<T> Ungil for T
where T: Send,