HumanSignal / label-studio-converter

Tools for converting Label Studio annotations into common dataset formats
https://labelstud.io/
262 stars 130 forks source link

fix: Handle multi-layer image in YOLO export #244

Closed luuzk closed 5 months ago

luuzk commented 1 year ago

Fix issue https://github.com/HumanSignal/label-studio/issues/4783

Enable the YOLO export to handle images with multiple layers, i.e. a list of URLs instead of a single URL as value for data/image. In the multi-layer case, the filename of the first layer/image is assigned to the exported .txt label.

Since YOLO conversion currently downloads images, this mechanism is extended to download all layers of a multi-layer image.

hogepodge commented 1 year ago

@luuzk thanks for your pull request. I've moved this on to the engineering team to ask for review.

niklub commented 5 months ago

Thanks @luuzk , we will update the code with your suggested change and continue to work on updates in the label-studio-sdk repo. The fix will be rolled out in label-studio-sdk>=1. However, I think the code is not fully functionable in case of multi-page annotation, since you still have to relate each bounding box or polygon with the corresponding page or image item in the list. Feel free to submit your suggestions and further improvements here, appreciate your contribution!