joheras / CLoDSA

122 stars 33 forks source link

Error in Augmenting a dataset for instance segmentation using COCO format #77

Open diegbarrientos1 opened 1 year ago

diegbarrientos1 commented 1 year ago

I used the code to augment an annotation file from labelme that is converted to a coco format.

This raised me the question, can clodsa augment a labelme json annotation file (that is converted to coco format)?

Natriumpikant commented 1 year ago

i would just give it a try. if labelme converts the file to the standard coco-format it should be no problem.

The structure has to be the following - compare it with your converted file:

{ "info": { "year": "2021", "version": "1.0", "description": "Exported from FiftyOne", "contributor": "Voxel51", "url": "https://fiftyone.ai", "date_created": "2021-01-19T09:48:27" }, "licenses": [ { "url": "http://creativecommons.org/licenses/by-nc-sa/2.0/", "id": 1, "name": "Attribution-NonCommercial-ShareAlike License" }, ...
], "categories": [ ... { "id": 2, "name": "cat", "supercategory": "animal" }, ... ], "images": [ { "id": 0, "license": 1, "file_name": ".", "height": 480, "width": 640, "date_captured": null }, ... ], "annotations": [ { "id": 0, "image_id": 0, "category_id": 2, "bbox": [260, 177, 231, 199], "segmentation": [...], "area": 45969, "iscrowd": 0 }, ... ] }

diegbarrientos1 commented 1 year ago

My file has no details about "info" and "licenses". It has all other details however it is not arranged like the one you provided.

Does it need to have those details?

And Does it need to be arranged exactly like the one you provided?

Untitled

Natriumpikant commented 1 year ago

Informations like license, info, etc. are optional and also the arrangement of the different topics is not required.

Your file seems to be fine :)

diegbarrientos1 commented 1 year ago

I will have to try again and will try to update you in the future.

Thank you for the response!

joheras commented 1 year ago

Information such as license and info is optional, but those keys should appear in the json file. I will upload a new version of CLODSA to avoid the necessity of providing those keys in the json file.