From 54cd0098b65828f82aa2cc8051f1733967f563ee Mon Sep 17 00:00:00 2001 From: risingClouds <8832103+ringcloud@user.noreply.gitee.com> Date: Thu, 5 Dec 2024 22:02:01 +0800 Subject: [PATCH 1/2] [Bug Fix] fix eval_recalls for compatibility with NumPy >= 1.23 --- mmdet/evaluation/functional/recall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmdet/evaluation/functional/recall.py b/mmdet/evaluation/functional/recall.py index 4bce2bf3614..21da9294356 100644 --- a/mmdet/evaluation/functional/recall.py +++ b/mmdet/evaluation/functional/recall.py @@ -108,7 +108,7 @@ def eval_recalls(gts, img_proposal[:prop_num, :4], use_legacy_coordinate=use_legacy_coordinate) all_ious.append(ious) - all_ious = np.array(all_ious) + all_ious = np.array(all_ious,dtype=object) recalls = _recalls(all_ious, proposal_nums, iou_thrs) print_recall_summary(recalls, proposal_nums, iou_thrs, logger=logger) From 4c0a9fdbf1367b2a827056f3af159d9269843852 Mon Sep 17 00:00:00 2001 From: risingClouds Date: Thu, 5 Dec 2024 22:38:10 +0800 Subject: [PATCH 2/2] [Bug Fix] fix eval_recalls for compatibility with NumPy >= 1.23 --- mmdet/evaluation/functional/recall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmdet/evaluation/functional/recall.py b/mmdet/evaluation/functional/recall.py index 21da9294356..abbe4e15b83 100644 --- a/mmdet/evaluation/functional/recall.py +++ b/mmdet/evaluation/functional/recall.py @@ -108,7 +108,7 @@ def eval_recalls(gts, img_proposal[:prop_num, :4], use_legacy_coordinate=use_legacy_coordinate) all_ious.append(ious) - all_ious = np.array(all_ious,dtype=object) + all_ious = np.array(all_ious, dtype=object) recalls = _recalls(all_ious, proposal_nums, iou_thrs) print_recall_summary(recalls, proposal_nums, iou_thrs, logger=logger)