voc2coco icon indicating copy to clipboard operation
voc2coco copied to clipboard

Category ID starts from 0 instead of 1

Open priteshgohil opened this issue 5 years ago • 0 comments

COCO expect that class ID starts from 1 as below, https://github.com/Tony607/voc2coco/blob/207f265dfc4afaae0dda229b8c27a91ab7e0494a/voc2coco.py#L14

However, It came to the notice that class ID starts from 0 in output.json.

To fix this issue, change the following line https://github.com/Tony607/voc2coco/blob/207f265dfc4afaae0dda229b8c27a91ab7e0494a/voc2coco.py#L66 to return {name: i+1 for i, name in enumerate(classes_names)}

priteshgohil avatar Sep 26 '20 18:09 priteshgohil