Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jan 14, 2022
1 parent cfee310 commit ee0ecce
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion torchmetrics/detection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
from torchmetrics.utilities.imports import _TORCHVISION_AVAILABLE, _TORCHVISION_GREATER_EQUAL_0_8

if _TORCHVISION_AVAILABLE and _TORCHVISION_GREATER_EQUAL_0_8:
from torchmetrics.detection.map import MeanAveragePrecision
from torchmetrics.detection.map import MeanAveragePrecision # noqa: F401
24 changes: 12 additions & 12 deletions torchmetrics/detection/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,9 @@ def _evaluate_image(
if torch.numel(ious) > 0:
for idx_iou, t in enumerate(self.iou_thresholds):
for idx_det in range(nb_det):
m = MeanAveragePrecision._find_best_gt_match(t, nb_gt, gt_matches, idx_iou, gt_ignore, ious, idx_det)
m = MeanAveragePrecision._find_best_gt_match(
t, nb_gt, gt_matches, idx_iou, gt_ignore, ious, idx_det
)
if m != -1:
det_ignore[idx_iou, idx_det] = gt_ignore[m]
det_matches[idx_iou, idx_det] = True
Expand Down Expand Up @@ -780,9 +782,7 @@ class MAP(MeanAveragePrecision):
}
"""

@deprecated(
target=MeanAveragePrecision, deprecated_in="0.7", remove_in="0.8", stream=_future_warning
)
@deprecated(target=MeanAveragePrecision, deprecated_in="0.7", remove_in="0.8", stream=_future_warning)
def __init__(
self,
box_format: str = "xyxy",
Expand All @@ -797,12 +797,12 @@ def __init__(
) -> None: # type: ignore
void(
box_format,
iou_thresholds,
rec_thresholds,
max_detection_thresholds,
class_metrics,
compute_on_step,
dist_sync_on_step,
process_group,
dist_sync_fn
iou_thresholds,
rec_thresholds,
max_detection_thresholds,
class_metrics,
compute_on_step,
dist_sync_on_step,
process_group,
dist_sync_fn,
)

0 comments on commit ee0ecce

Please sign in to comment.