Skip to content

Commit

Permalink
fix(pre_commit): 🎨 auto format pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Oct 13, 2024
1 parent 1d3f61a commit 9822406
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions supervision/metrics/mean_average_precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@

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 (
Expand Down Expand Up @@ -177,9 +181,13 @@ def _compute(
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
Expand Down

0 comments on commit 9822406

Please sign in to comment.