sportslabkit.metrics.cost_matrix_metrics#
Overview#
A base class for computing the cost matrix between trackers and |
|
Compute the IoU Cost Matrix Metric between trackers and detections. |
|
Compute the Euclidean Cost Matrix Metric between trackers and |
|
A base class for computing the cost matrix between trackers and |
|
Compute the Cosine Cost Matrix Metric between trackers and |
Classes#
- class sportslabkit.metrics.cost_matrix_metrics.BaseCostMatrixMetric[source]#
Bases:
abc.ABCA base class for computing the cost matrix between trackers and detections.
Overview
Methods# compute_metric(trackers, detections)abc Calculate the metric between trackers and detections.
Members
- abstract compute_metric(trackers: collections.abc.Sequence[sportslabkit.types.tracklet.Tracklet], detections: collections.abc.Sequence[sportslabkit.types.detection.Detection]) numpy.ndarray[source]#
Calculate the metric between trackers and detections.
- Parameters:
trackers – A list of trackers.
detections – A list of detections.
- Returns:
An array of containing the metric between trackers and detections.
- class sportslabkit.metrics.cost_matrix_metrics.IoUCMM(use_pred_box=False)[source]#
Bases:
BaseCostMatrixMetricCompute the IoU Cost Matrix Metric between trackers and detections.
Overview
Methods# compute_metric(trackers, detections)Calculate the metric between trackers and detections.
Members
- compute_metric(trackers: collections.abc.Sequence[sportslabkit.types.tracklet.Tracklet], detections: collections.abc.Sequence[sportslabkit.types.detection.Detection]) numpy.ndarray[source]#
Calculate the metric between trackers and detections.
- Parameters:
trackers – A list of trackers.
detections – A list of detections.
- Returns:
An array of containing the metric between trackers and detections.
- class sportslabkit.metrics.cost_matrix_metrics.EuclideanCMM(use_pred_box=False, im_shape: tuple[float, float] = (1080, 1920))[source]#
Bases:
BaseCostMatrixMetricCompute the Euclidean Cost Matrix Metric between trackers and detections.
Overview
Methods# compute_metric(trackers, detections)Calculate the metric between trackers and detections.
Members
- compute_metric(trackers: collections.abc.Sequence[sportslabkit.types.tracklet.Tracklet], detections: collections.abc.Sequence[sportslabkit.types.detection.Detection]) numpy.ndarray[source]#
Calculate the metric between trackers and detections.
- Parameters:
trackers – A list of trackers.
detections – A list of detections.
- Returns:
An array of containing the metric between trackers and detections.
- class sportslabkit.metrics.cost_matrix_metrics.EuclideanCMM2D(use_pred_pt=False, im_shape: tuple[float, float] = (1080, 1920))[source]#
Bases:
BaseCostMatrixMetricA base class for computing the cost matrix between trackers and detections.
Overview
Methods# compute_metric(trackers, detections)Calculate the metric between trackers and detections.
Members
- compute_metric(trackers: collections.abc.Sequence[sportslabkit.types.tracklet.Tracklet], detections: collections.abc.Sequence[sportslabkit.types.detection.Detection]) numpy.ndarray[source]#
Calculate the metric between trackers and detections.
- Parameters:
trackers – A list of trackers.
detections – A list of detections.
- Returns:
An array of containing the metric between trackers and detections.
- class sportslabkit.metrics.cost_matrix_metrics.CosineCMM[source]#
Bases:
BaseCostMatrixMetricCompute the Cosine Cost Matrix Metric between trackers and detections.
Overview
Methods# compute_metric(trackers, detections)Calculate the metric between trackers and detections.
Members
- compute_metric(trackers: collections.abc.Sequence[sportslabkit.types.tracklet.Tracklet], detections: collections.abc.Sequence[sportslabkit.types.detection.Detection]) numpy.ndarray[source]#
Calculate the metric between trackers and detections.
- Parameters:
trackers – A list of trackers.
detections – A list of detections.
- Returns:
An array of containing the metric between trackers and detections.