Closed
Description
Hi,
I think ann_id
should be initialized to 1, not 0, in convert_to_coco_api
:
vision/references/detection/coco_utils.py
Line 148 in f052c53
That's because pycocotools assumes IDs are greater than 1 when evaluating. More precisely it creates a list of matches per detection box, and uses IDs as entries in that list:
It then uses that list as boolean values, hence ID '0' is interpreted as a negative.
Also, as a separate argument, all ann['id']
values are initialized starting from 1 in their initialization code, e.g.
The consequence is almost negligible for a large dataset (you may have one more false negative) but for unit tests or for very small datasets (as our own use case) it can matter.