From 623f2ee4b81f336c4ec32b0d2d2936e1904edd3b Mon Sep 17 00:00:00 2001 From: Kaipeng Deng Date: Wed, 4 Sep 2019 11:17:29 +0800 Subject: [PATCH] fix voc_eval difficult as None (#3259) --- PaddleCV/PaddleDetection/ppdet/utils/voc_eval.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PaddleCV/PaddleDetection/ppdet/utils/voc_eval.py b/PaddleCV/PaddleDetection/ppdet/utils/voc_eval.py index 496f7b42..67e66e4c 100644 --- a/PaddleCV/PaddleDetection/ppdet/utils/voc_eval.py +++ b/PaddleCV/PaddleDetection/ppdet/utils/voc_eval.py @@ -81,7 +81,8 @@ def bbox_eval(results, for i in range(len(gt_boxes)): gt_box = gt_boxes[i] gt_label = gt_labels[i] - difficult = difficults[i] + difficult = None if difficults is None \ + else difficults[i] bbox_num = bbox_lengths[i] bbox = bboxes[bbox_idx: bbox_idx + bbox_num] gt_box, gt_label, difficult = prune_zero_padding( -- GitLab