ryouchinsa / Rectlabel-support

RectLabel is an offline image annotation tool for object detection and segmentation.
https://rectlabel.com
504 stars 73 forks source link

Batch load COCO JSON #230

Closed alelordelo closed 12 months ago

alelordelo commented 1 year ago

Hi,

How can I batch load thousands of COCO JSON files?

I tried:

thanks!

ryouchinsa commented 1 year ago

We will improve the "Import COCO RLE JSON files" to import the usual COCO JSON files. Each JSON file name should be the same as image file name. image.jpg -> image.json, etc.

ryouchinsa commented 1 year ago

The new version 2023.07.05 was released. Please let us know your opinion.

rromanchuk commented 1 year ago

@ryouchinsa This is a really dumb question i'm embarrassed to ask, i've just been using bash and jq to pre-process but it's super annoying and i want to be lazy.

How do you import a coco json file that has file_names that have RIDICULOUSLY nested file paths? Painfully nested. I need something like -r ./images && ./images/annotations so i can do a clean import in one shot.

ryouchinsa commented 1 year ago

Thanks for writing the issue.

We think this question is about how to import the COCO format when images are in multiple folders. Before importing, you have to open multiple images/annotations folders.

For the "file_name" in the "images" array in the COCO format, if opened_images_folder_i + "file_name" exists, the annotation is imported and saved in the opened_annotations_folder_i.

If the "file_name" is "subpath/1.jpg", we check both opened_images_folder_i + "1.jpg" and opened_images_folder_i + "subpath/1.jpg".

If this algorithm does not satisfy with your use-case, please show us the detailed folder structure and the "file_name" in your COCO file.

ryouchinsa commented 12 months ago

Currently If you need our support to fix this problem, please let us know.