I would like to convert my coco JSON file as follows:
The CSV file with annotations should contain one annotation per line. Images with multiple bounding boxes should use one row per bounding box. Note that indexing for pixel values starts at 0. The expected format of each line is:
path/to/image.jpg,x1,y1,x2,y2,class_name
A full example:
*/data/imgs/img_001.jpg,837,346,981,456,cow
/data/imgs/img_002.jpg,215,312,279,391,cat
/data/imgs/img_002.jpg,22,5,89,84,bird
This defines a dataset with 3 images: img_001.jpg contains a cow, img_002.jpg contains a cat and a bird, and img_003.jpg contains no interesting objects/animals.
How could I do that?