fix(pre_commit): 🎨 auto format pre-commit hooks

This commit is contained in:
pre-commit-ci[bot]
2024-10-13 07:45:06 +00:00
parent 1d3f61af85
commit 9822406cde
+11 -3
View File
@@ -9,7 +9,11 @@ from matplotlib import pyplot as plt
from supervision.config import ORIENTED_BOX_COORDINATES
from supervision.detection.core import Detections
from supervision.detection.utils import box_iou_batch, mask_iou_batch, oriented_box_iou_batch
from supervision.detection.utils import (
box_iou_batch,
mask_iou_batch,
oriented_box_iou_batch,
)
from supervision.draw.color import LEGACY_COLOR_PALETTE
from supervision.metrics.core import Metric, MetricTarget
from supervision.metrics.utils.object_size import (
@@ -177,9 +181,13 @@ class MeanAveragePrecision(Metric):
elif self._metric_target == MetricTarget.MASKS:
iou = mask_iou_batch(target_contents, prediction_contents)
elif self._metric_target == MetricTarget.ORIENTED_BOUNDING_BOXES:
iou = oriented_box_iou_batch(target_contents, prediction_contents)
iou = oriented_box_iou_batch(
target_contents, prediction_contents
)
else:
raise ValueError(f"Unsupported metric target: {self._metric_target}")
raise ValueError(
f"Unsupported metric target: {self._metric_target}"
)
matches = self._match_detection_batch(
predictions.class_id, targets.class_id, iou, iou_thresholds