waspinator / pycococreator

Helper functions to create COCO datasets
Apache License 2.0
765 stars 179 forks source link

Extra annotations #33

Open konstantin-frolov opened 4 years ago

konstantin-frolov commented 4 years ago

Hi guys, does anyone have a problem adding extra annotations for some images? Extra annotations

konstantin-frolov commented 4 years ago

I found a solution: If you use mask names such as _ _ The filter_for_annotations function tries to find all annotations for each , but the search works by the prefix and img_ids 1, 10, 11, 12, etc., which are perceived as the same. On line 208 you need to change to file_name_prefix = basename_no_extension + '_.*' Then search would works by prefix <img_id>_