HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
19.24k stars 2.39k forks source link

Converting Labelme Annotations to Label Studio pre-annotated annotations #6069

Open luckysusanto opened 4 months ago

luckysusanto commented 4 months ago

Hello all!

I and my team need to migrate to Label Studio.

Previously, we used Labelme, which works well for text segmentation. However, we needed to create a custom task for text segmentation + text transcription. It is quite similar to the OCR setup label studio has, really.

We uploaded labelme's annotation results (.json) and their respective images (.png) to 2 separate folders in a s3 bucket.

The issue is, while trying to convert Labelme's annotation format into Label Studio's, we fail to load the image available in the s3 bucket to Label Studio.

Issues:

  1. Label studio's cloud storage only takes .json, so the images must be saved on the cloud and the .json must have a link to that image. However, when we tried that, the image failed to load.
  2. When attempting to map Labelme's annotation format into Label Studio's annotation format, we realize that IDs are needed in Label Studio's annotation format. Meanwhile, our data is from Labelme. How can we circumvent the ID issue? Can we create our own ID schema?

Labelme's .json format can be seen here: https://aksara-test.s3.amazonaws.com/Annotated/Bali_1.json

An example image can be seen here: https://aksara-test.s3.amazonaws.com/Raw/Bali_1.png

jombooth commented 3 months ago

Hi @luckysusanto - my colleague @makseq made a suggestion here that I think might be helpful: https://github.com/HumanSignal/label-studio/issues/2998#issuecomment-1260301431 - idea is to export from LabelMe to YOLO, then use Label Studio Converter to convert the exported YOLO data to Label Studio's import format:

https://github.com/HumanSignal/label-studio-converter?tab=readme-ov-file#tutorial-importing-yolo-pre-annotated-images-to-label-studio-using-local-storage

Regarding the image loading issue, can you provide some more details on the error you were experiencing? There are many reasons images might not load in a Label Studio project, and we'd need to understand exactly how you were trying to display the images, as well as what errors you were getting, in order to help with debugging.