Commit 13b35ffa authored by fsavard-eai's avatar fsavard-eai Committed by Francisco Massa
Browse files

Fixing issue #1530 by starting ann_id to 1 in convert_to_coco_api (#1531)

parent 7d509c5d
......@@ -145,7 +145,8 @@ def _coco_remove_images_without_annotations(dataset, cat_list=None):
def convert_to_coco_api(ds):
coco_ds = COCO()
ann_id = 0
# annotation IDs need to start at 1, not 0, see torchvision issue #1530
ann_id = 1
dataset = {'images': [], 'categories': [], 'annotations': []}
categories = set()
for img_idx in range(len(ds)):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment