Closed francescocarpanese closed 1 year ago
Hi @francescocarpanese Great feature!
Could you please add changes from latest master to fix tests issue?
Hi @francescocarpanese Great feature!
Could you please add changes from latest master to fix tests issue?
Done
Use case:
Issue:
In case different users performed different annotation of the same image, when exporting the results to label studio standard
.json
, the different labels are distinguished bycompled_by=<user_id>
field (ex. here ).In the current master, when converting the exported
.json
to YOLO, withconvert_to_yolo
from label_studio_converter/converter.py, a single.txt
file containing the annotation for a givenimage
is created.However, the current looping logic overwrites the
.txt
for each user and, as a result, the final.txt
file contains the annotation only one user (the annotations which appear at last in the .json) file.Moreover the information regarding the user that performed the annotation is lost in YOLO format.
Implemented solution:
The function convert_to_yolo takes now an optional argument
split_labelers
. Iftrue
, it generates dedicated subfolders for each use, containing the annotation of the user.By default
split_labelers
is set to false preserving the former behavior.Test:
A test is implemented for the use case, converting a json file created from label-studio with multiple labelers for the same image, which servers also as an example for documentation.