From d386aed3f60fa8515a01a3bf727af64060f6de29 Mon Sep 17 00:00:00 2001 From: FishBigOcean <36850642+FishBigOcean@users.noreply.github.com> Date: Sun, 23 Apr 2023 14:09:08 +0800 Subject: [PATCH] fix and op bug (#2286) --- mmpose/evaluation/functional/nms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmpose/evaluation/functional/nms.py b/mmpose/evaluation/functional/nms.py index 50bbe1550b..eed4e5cf73 100644 --- a/mmpose/evaluation/functional/nms.py +++ b/mmpose/evaluation/functional/nms.py @@ -102,7 +102,7 @@ def oks_iou(g: np.ndarray, dy = yd - yg e = (dx**2 + dy**2) / vars / ((a_g + a_d[n_d]) / 2 + np.spacing(1)) / 2 if vis_thr is not None: - ind = list(vg > vis_thr) and list(vd > vis_thr) + ind = list((vg > vis_thr) & (vd > vis_thr)) e = e[ind] ious[n_d] = np.sum(np.exp(-e)) / len(e) if len(e) != 0 else 0.0 return ious