diff --git a/ppdet/utils/voc_eval.py b/ppdet/utils/voc_eval.py index 496f7b42394ce18a8e1c8ab612fa4620aca7b722..67e66e4c683aaf7d5af2fd352817daf1ad3576d4 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(