type

states.KalmanUpdate

class KalmanUpdate:

Kalman measurement update (Joseph form) for matched tracklet-detection pairs.

Reads predicted mean ``cs.{field}`` of shape ``(N, D)`` and covariance ``cs.{cov_field}`` of shape ``(N, D, D)``, reads detection measurements ``ds.{field}`` of shape ``(M, M_dim)``, and writes back the updated mean and covariance for matched tracklets. Unmatched tracklets keep their predicted state (predict-only on miss). The update applies the standard Kalman gain ``K = P H^T (H P H^T + R)^{-1}`` via ``solve_psd``, then propagates covariance through the Joseph form ``(I - K H) P (I - K H)^T + K R K^T`` to preserve positive semi-definiteness under finite-precision arithmetic. The result is symmetrised to remove off-diagonal drift that accumulates over long sequences. ``H`` shape ``(M_dim, D)`` is the measurement matrix and ``R`` shape ``(M_dim, M_dim)`` is the measurement-noise covariance. Each bbox/centroid process ships a ``make_update(...)`` factory that constructs the matching :class:`KalmanUpdate`.

Parameters

NameTypeDescription
fieldstrField name for the mean.
cov_fieldstrField name for the covariance.
Htorch.Tensor``(M_dim, D)`` measurement matrix.
Rtorch.Tensor``(M_dim, M_dim)`` measurement-noise covariance.

Raises

  • ValueError — If ``H`` and ``R`` have different dtypes (would force silent per-call casting).

Members

method

  • __call__Apply Kalman measurement update for matched tracklet-detection pairs.
  • __init__

constant

Source: unitrack/states/kalman/update.py:15