ryouchinsa / Rectlabel-support

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

COCO JSON import doesn't work properly #192

Closed mamromer closed 2 years ago

mamromer commented 2 years ago

I have augmented my images outside of Rectlabel to make the image square. I generated a new Coco JSON file and try to import it in Rectlabel. I placed the json file in the images map where the images are. When I import the json file the xml files are generated but in only a few xml files the annotations are added. In the rest I only get:

images filename.jpg 608 608 3

As far as I can see all the information is present in the json file but just not saved in the xml files.

Any ideas? traincoco.json.zip

ryouchinsa commented 2 years ago

Thanks for writing the issue. Currently we assume that annotations array is sorted in ascending order by image_id. So that collecting annotations for each image_id is fast. In the next update, we will change so that for each image_id we search all annotations.

mamromer commented 2 years ago

Hi Ryo, Thanks for the prompt answer! When will the next update come out?

ryouchinsa commented 2 years ago

The next update will be released in a week. Until then, if you arrange your annotations array in ascending order by image_id, importing would work.

mamromer commented 2 years ago

I just did that and now it is working great. Thanks!

ryouchinsa commented 2 years ago

Hi,

Thanks for the feedback.

The new update version 3.07.6 was released. To show the new update on Mac App Store, press command + R to reload.

For importing coco json file, we were assuming that annotations array is sorted in ascending order by image_id. In this update, we changed so that for each image_id we search all annotations array elements.

ryouchinsa commented 2 years ago

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