type

gates.MotionGate

class MotionGate:

Mahalanobis chi-squared gate over a Kalman covariance field.

For each (tracklet, detection) pair, the squared Mahalanobis distance ``d2 = (x - z)^T S^{-1} (x - z)`` is computed from the predicted tracklet mean ``x``, the projected covariance ``S`` on ``cov_field``, and the detection measurement ``z``. Pairs with ``d2 <= max_chi2`` are admitted; the rest are rejected.

Parameters

NameTypeDescription
mean_fieldstrName of the field on :class:`~unitrack.data.Tracklets` and :class:`~unitrack.data.Detections` holding the state mean used to form the residual.
cov_fieldstrName of the field on :class:`~unitrack.data.Tracklets` holding the projected measurement covariance ``S``.
max_chi2floatChi-squared threshold on the squared Mahalanobis distance. A common choice is the 0.95 quantile of the chi-squared distribution at the measurement dimensionality (e.g. ``9.4877`` for 4 degrees of freedom, as used by SORT/DeepSORT).

Members

method

Source: unitrack/gates/motion.py:13