COCO Import and Export [Discussion thread]
Import and Export of annotations in COCO format is a widely used feature in VIA2. VIA2 supports a large number of region shape (e.g. rect, circle, ellipse, polygon, polyline, etc) and multiple types of region attributes (e.g. text input, dropdown, radio, checkbox, etc.). However, COCO instance annotation only supports polygon shape and (supercategory,category) region attribute type which is basically VIA2 radio and dropdown attribute type. Therefore, we recently released via-2.0.10 which manages COCO import/export as follows:
- COCO instance annotation can only support radio and dropdown attribute types available in VIA2. Therefore, during COCO export, VIA2 ignores all the other attribute types (e.g. text input, checkbox, etc.)
- COCO only supports polygon shape for instance segmentation. Therefore, VIA2 converts standard shapes like rect, circle, ellipse to polygon shape during COCO export. For COCO import, all the regions are imported as polygon and the polygon regions that correspond to rectangle are imported as
rectshaped region. - We use the following COCO annotation snippet borrowed from COCO 2017 dataset to test and verify VIA2 COCO import/export. The category-id and image-id are preserved during [import -> edit -> export] cycle.
We want to keep improving the COCO import/export feature of VIA2 and therefore in this discussion thread we request you to send in details about your use cases that is not currently properly handled by VIA2. We will work to upgrade the code in order to address your use cases.