Closed timofurrer closed 2 years ago
how do I use "pycococreatortools.create_annotation_infos" ? I tried to change "pycococreatortools.create_annotation_info" to "pycococreatortools.create_annotation_infos". but when I tried to load json to coco api I'm getting an error,
loading annotations into memory...
Done (t=0.11s)
creating index...
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-131-b9f9f7b13f18> in <module>()
----> 1 example_coco = COCO(annotation_file)
1 frames
/usr/local/lib/python3.6/dist-packages/pycocotools/coco.py in createIndex(self)
92 if 'annotations' in self.dataset:
93 for ann in self.dataset['annotations']:
---> 94 imgToAnns[ann['image_id']].append(ann)
95 anns[ann['id']] = ann
96
TypeError: list indices must be integers or slices, not str
this is my notebook https://github.com/overclock98/PSB-2015-crowdsourced-nuclei-dataset-to-coco/blob/master/PSB_2015_crowdsourced_nuclei_dataset_to_coco.ipynb
I'd be very useful to get multiple annotations from a single binary mask whereas disconnected shapes are separate annotations instead of one.
Is that something which could make it into this package?