HumanSignal / label-studio-converter

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

fix: YOLO import with image root #195

Closed makseq closed 1 year ago

javi-desp commented 1 year ago

nope, with this input : label-studio-converter import yolo --out-type="predictions" --image-root-url '/data/local-files/?d=images' -i ./ -o prelabeling_yolo.json

writes the next:

[{"data": {"image": "/data/local-files/%3Fd%3Dimages/1675237968.9161572.jpg"}, "predictions": .....

when it should be :

[{"data": {"image": "/data/local-files/?d=images/1675237968.9161572.jpg"}, "predictions": .....

Could you switch to this branch and check how it works please? #195

javi-desp commented 1 year ago

now works good but it don't print the "/" after images. Example:

[{"data": {"image": "/data/local-files/?d=images1675863733.1414223.png"}, "predictions":...

when should be:

[{"data": {"image": "/data/local-files/?d=images/1675863733.1414223.png"}, "predictions":

makseq commented 1 year ago

@javi-desp thanks for testing! I've added a fix. BTW I believe you can easily fix it on your end with this param in the command:

 --image-root-url="/data/local-files/?d=images/"