boxmot.trackers.ocsort.track
This script is adopted from the SORT script by Alex Bewley alex@bewley.ai
KalmanBoxTracker
KalmanBoxTracker(
bbox,
cls,
det_ind,
delta_t=3,
max_obs=50,
is_obb=False,
id_allocator: TrackIdAllocator | None = None,
*,
noise_config: KalmanNoiseConfig | None = None,
kalman_type: str | None = None,
)
Bases: SortBoxTrack
One OC-SORT identity with its filter, observations, and motion direction.
cls
instance-attribute
NOTE: [-1,-1,-1,-1,-1] is a compromising placeholder for non-observation status, the same for the return of function k_previous_obs. It is ugly and I do not like it. But to support generate observation array in a fast and unified way, which you would see below k_observations = np.array([k_previous_obs(...]]), let's bear it for now.
last_observation
instance-attribute
motion_model
instance-attribute
motion_model = create_motion_model(
kalman_type or XYSR,
is_obb=is_obb,
max_obs=max_obs,
cls_id=int(cls),
)
camera_update
Transform this track and its recovery histories to the current frame.
multi_camera_update
classmethod
Transform complete AABB/OBB motion and association state in batches.
predict
Advances the state vector and returns the predicted bounding box estimate.