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
| Name | Type | Description |
|---|---|---|
| field | str | Field name for the mean. |
| cov_field | str | Field name for the covariance. |
| H | torch.Tensor | ``(M_dim, D)`` measurement matrix. |
| R | torch.Tensor | ``(M_dim, M_dim)`` measurement-noise covariance. |
Raises
- ValueError — If ``H`` and ``R`` have different dtypes (would force silent per-call casting).
Members
Source: unitrack/states/kalman/update.py:15