sportslabkit.metrics.mota#

Overview#

Function#

mota_score(bboxes_track, bboxes_gt)

Calculates CLEAR metrics for one sequence.

mota_final_scores(res)

Calculate final CLEAR scores

Functions#

sportslabkit.metrics.mota.mota_score(bboxes_track: sportslabkit.BBoxDataFrame, bboxes_gt: sportslabkit.BBoxDataFrame) dict[str, Any][source]#

Calculates CLEAR metrics for one sequence.

Parameters:
  • bboxes_track (BBoxDataFrame) – Bbox Dataframe for tracking in 1 sequence

  • bboxes_gt (BBoxDataFrame) – Bbox Dataframe for ground truth in 1 sequence

Returns:

CLEAR metrics

Return type:

dict[str, Any]

Note: The description of each evaluation indicator will be as follows: “MOTA” : Multi-Object Tracking Accuracy. “MOTAL” : MOTA with a logarithmic penalty for ID switches. “MOTP” : The average dissimilarity between all true positives and their corresponding ground truth targets.

res[“MOTP_sum”] / np.maximum(1.0, res[“CLR_TP”])

“MODA” : Multi-Object Detection Accuracy. This measure combines false positives and missed targets. “CLR_Re”: MOTA’s Recall. [“CLR_TP”] / np.maximum(1.0, res[“CLR_TP”] + res[“CLR_FN”]). “CLR_Pr”: MOTA’s Precision. [“CLR_TP”] / np.maximum(1.0, res[“CLR_TP”] + res[“CLR_FP”]). “MTR” : MT divided by the number of unique IDs in gt. “PTR” : PT divided by the number of unique IDs in gt. “MLR” : ML divided by the number of unique IDs in gt. “sMOTA” : Sum of similarity scores for matched bboxes. “CLR_TP” : Number of TPs. “CLR_FN” : Number of FNs. “CLR_FP” : Number of FPs. “IDSW” : Number of IDSW. “MT” : Mostly tracked trajectory. A target is mostly tracked if it is successfully tracked for at least 80% of its life span. “PT” : Partially tracked trajectory. All trajectories except MT and ML are PT. “ML” : Mostly lost trajectory. If a track is only recovered for less than 20% of its total length, it is said to be mostly lost (ML). “Frag” : Number of fragments. A fragment is a sub-trajectory of a track that is interrupted by a large gap in detection.

This is also based on the following original paper and the github repository. paper : https://arxiv.org/pdf/1603.00831.pdf code : https://github.com/JonathonLuiten/TrackEval

sportslabkit.metrics.mota.mota_final_scores(res)[source]#

Calculate final CLEAR scores