From 61a8b0e700817353594cf31161801c45243244f9 Mon Sep 17 00:00:00 2001 From: Kaipeng Deng Date: Fri, 21 Feb 2020 12:21:04 +0800 Subject: [PATCH] fix voc eval (#249) --- ppdet/utils/map_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ppdet/utils/map_utils.py b/ppdet/utils/map_utils.py index fe0530596..085556972 100644 --- a/ppdet/utils/map_utils.py +++ b/ppdet/utils/map_utils.py @@ -145,7 +145,9 @@ class DetectionMAP(object): valid_cnt = 0 for score_pos, count in zip(self.class_score_poss, self.class_gt_counts): - if count == 0 or len(score_pos) == 0: + if count == 0: continue + if len(score_pos) == 0: + valid_cnt += 1 continue accum_tp_list, accum_fp_list = \ -- GitLab