From 1b42de24578a368d7bb3aca9036c591f023775d6 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) --- ppdet/utils/voc_eval.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ppdet/utils/voc_eval.py b/ppdet/utils/voc_eval.py index 496f7b423..67e66e4c6 100644 --- a/ppdet/utils/voc_eval.py +++ b/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