Skip to content

Commit

Permalink
fix bug in _write_voc_results_file. When dets is empty Megvii-BaseDet…
Browse files Browse the repository at this point in the history
  • Loading branch information
rpehkone committed Apr 15, 2024
1 parent 2360277 commit 68e0286
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yolox/data/datasets/voc.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def _write_voc_results_file(self, all_boxes):
for im_ind, index in enumerate(self.ids):
index = index[1]
dets = all_boxes[cls_ind][im_ind]
if dets == []:
if dets.shape[0] == 0:
continue
for k in range(dets.shape[0]):
f.write(
Expand Down

0 comments on commit 68e0286

Please sign in to comment.