Skip to content

Commit

Permalink
Fixed a bug in eval.py that caused a crash with --display when no det…
Browse files Browse the repository at this point in the history
…ections are output.
  • Loading branch information
dbolya committed Oct 9, 2018
1 parent e55b9b0 commit b627472
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def prep_display(dets_out, img, gt, gt_masks, h, w):
classes, scores, boxes, masks = [x[:args.top_k].cpu().numpy() for x in t]
if classes.shape[0] == 0:
print('Warning: No detections found.')
return
return img_numpy

for j in reversed(range(min(args.top_k, classes.shape[0]))):
x1, y1, x2, y2 = boxes[j, :]
Expand Down

0 comments on commit b627472

Please sign in to comment.