From e3c86ffa316d72da0d75269ca6fd6fdf4cc0c137 Mon Sep 17 00:00:00 2001 From: SkafteNicki Date: Fri, 10 Mar 2023 11:14:05 +0100 Subject: [PATCH 1/2] conversion --- src/torchmetrics/detection/mean_ap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/torchmetrics/detection/mean_ap.py b/src/torchmetrics/detection/mean_ap.py index ff9ace379f2..732342d6b69 100644 --- a/src/torchmetrics/detection/mean_ap.py +++ b/src/torchmetrics/detection/mean_ap.py @@ -392,10 +392,10 @@ def __init__( raise ModuleNotFoundError("When `iou_type` is set to 'segm', pycocotools need to be installed") self.iou_type = iou_type self.bbox_area_ranges = { - "all": (0**2, int(1e5**2)), - "small": (0**2, 32**2), - "medium": (32**2, 96**2), - "large": (96**2, int(1e5**2)), + "all": (float(0**2), float(1e5**2)), + "small": (float(0**2), float(32**2)), + "medium": (float(32**2), float(96**2)), + "large": (float(96**2), float(1e5**2)), } if not isinstance(class_metrics, bool): From 261a0a420d23fe4df73d574f2a0c43f7ced06dac Mon Sep 17 00:00:00 2001 From: SkafteNicki Date: Fri, 10 Mar 2023 11:17:57 +0100 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25022f9a595..6b3291bb1dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -114,6 +114,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed corner case for `PearsonCorrCoef` when running in ddp mode but only on single device ([#1587](https://github.com/Lightning-AI/metrics/pull/1587)) +- Fixed overflow error for specific cases in `MAP` when big areas are calculated ([#1607](https://github.com/Lightning-AI/metrics/pull/1607)) + + ## [0.11.2] - 2023-02-21 ### Fixed