diff --git a/supervision/metrics/mean_average_precision.py b/supervision/metrics/mean_average_precision.py index b02a2742..ec9d0fd4 100644 --- a/supervision/metrics/mean_average_precision.py +++ b/supervision/metrics/mean_average_precision.py @@ -75,7 +75,7 @@ class MeanAveragePrecision(Metric): f"The number of predictions ({len(predictions)}) and" f" targets ({len(targets)}) during the update must be the same." ) - + if self._class_agnostic: for prediction in predictions: prediction.class_id[:] = -1 @@ -183,7 +183,6 @@ class MeanAveragePrecision(Metric): "Unsupported metric target for IoU calculation" ) - if self._class_agnostic: matches = self._match_detection_batch_class_agnostic( iou, iou_thresholds