From c1a21706a6848aa2cf599f25089cb8872ac0f29f Mon Sep 17 00:00:00 2001 From: Amir Mohammad Fakhimi Date: Thu, 10 Oct 2024 12:44:35 +0330 Subject: [PATCH] Change np.bool to bool in metrics.py It seems np.bool have deprecated: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations --- utils/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/metrics.py b/utils/metrics.py index 06ce6e3..e450da9 100644 --- a/utils/metrics.py +++ b/utils/metrics.py @@ -56,7 +56,7 @@ def cal_pro_metric(labeled_imgs, score_imgs, fpr_thresh=0.3, max_steps=200): labeled_imgs = np.array(labeled_imgs) labeled_imgs[labeled_imgs <= 0.45] = 0 labeled_imgs[labeled_imgs > 0.45] = 1 - labeled_imgs = labeled_imgs.astype(np.bool) + labeled_imgs = labeled_imgs.astype(bool) max_th = score_imgs.max() min_th = score_imgs.min()