sportslabkit.motion_model.models#
Overview#
Exponential Moving Average (EMA) motion model for object tracking. |
|
Abstract base class for motion models. |
Classes#
- class sportslabkit.motion_model.models.ExponentialMovingAverage(gamma: float = 0.5)[source]#
Bases:
sportslabkit.motion_model.base.BaseMotionModelExponential Moving Average (EMA) motion model for object tracking.
This class implements an EMA-based motion model for object tracking. It can be used both in a stateful and a procedural manner.
Overview
Attributes# -
-
-
Methods# predict(observations, states)Compute the next internal state and prediction based on the current observation and internal state.
Members
- hparam_search_space :dict[str, dict[str, object]]#
- required_observation_types = ['box']#
- required_state_types = ['EMA_t']#
- class sportslabkit.motion_model.models.KalmanFilter(dt: float = 1 / 30, process_noise: float = 0.001, measurement_noise: float = 0.001, confidence_scaler: float = 1.0)[source]#
Bases:
sportslabkit.motion_model.base.BaseMotionModelAbstract base class for motion models.
This class defines a common interface for all motion models. Derived classes should implement the update, and predict methods. MotionModels are procedural and stateless. The state of tracklet is managed by the Tracklet class. The tracklet must have the required observations and states for the motion model to work. If the tracklet doesn’t have the required observations or states, the motion model will raise an error and tell the user which observations or states are missing.
Overview
Attributes# -
-
-
Methods# -
predict(observations, states)Compute the next internal state and prediction based on the current observation and internal state.
Members
- hparam_search_space :dict[str, dict[str, Any]]#
- required_observation_types :list[str] = ['box', 'score']#
- required_state_types :list[str] = ['x', 'P', 'F', 'H', 'R', 'Q']#
- get_initial_kalman_filter_states(box: numpy.ndarray) dict[str, numpy.ndarray]#