sportslabkit.metrics.tracking_preprocess#
Overview#
|
Converts tracking and ground truth data to the format(dictionary) |
Functions#
- sportslabkit.metrics.tracking_preprocess.to_mot_eval_format(gt_bbdf: sportslabkit.BBoxDataFrame, pred_bbdf: sportslabkit.BBoxDataFrame) dict[str, Any][source]#
Converts tracking and ground truth data to the format(dictionary) required by the MOT metrics.
- Parameters:
gt_bbdf (BBoxDataFrame) – Bbox Dataframe for ground truth tracking data.
pred_bbdf (BBoxDataFrame) – Bbox Dataframe for predicted tracking data.
- Returns:
Dictionary containing the data required by the MOT metrics
- Return type:
Note: data is a dict containing all of the information that metrics need to perform evaluation. It contains the following fields:
[num_timesteps, num_gt_ids, num_tracker_ids, num_gt_dets, num_tracker_dets] : integers. [gt_ids, tracker_ids]: list (for each timestep) of 1D NDArrays (for each det). [gt_dets, tracker_dets]: list (for each timestep) of lists of detection masks. [similarity_scores]: list (for each timestep) of 2D NDArrays.