Skip to content

Commit 68e0286

Browse files
author
rpehkone
committed
fix bug in _write_voc_results_file. When dets is empty Megvii-BaseDetection#1755
1 parent 2360277 commit 68e0286

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

yolox/data/datasets/voc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def _write_voc_results_file(self, all_boxes):
261261
for im_ind, index in enumerate(self.ids):
262262
index = index[1]
263263
dets = all_boxes[cls_ind][im_ind]
264-
if dets == []:
264+
if dets.shape[0] == 0:
265265
continue
266266
for k in range(dets.shape[0]):
267267
f.write(

0 commit comments

Comments
 (0)