Reputation: 73
I'm trying to figure out how to open/import/view a Label Studio yolo export from a different machine on my machine in order to directly view the bounding boxes as they were labeled.
I received a folder with /images, /labels, and classes.txt that was created as a yolo export from someone using label-studio. The labels are for rectangular bounding boxes with rotation. I currently have a python program that runs through each image and annotation to create and save a new image with the bounding box on it, so that I can see how things were labeled. However, I'd really like to be able to open my local Label Studio to view the folder I received from someone who used Label Studio on their own machine.
It seems I'm missing something very basic and obvious. Any help is appreciated.
I reviewed the documentation, including here https://labelstud.io/guide/tasks.html but the imports are for the original source data, not the data + labels. I don't see any mention of importing the labels text files. Google searching is turning up nothing related to importing the exported data. I may not be using the right search terms.
Upvotes: 6
Views: 3444
Reputation: 36
I was quite surprised this obvious case was not clearly explained in the documentation; asked for help myself and got no answer, so I figured out a solution that worked for me. The explanation is very long, but in practice, it is quite straightforward.
All the above is longer to explain than to do. The only further point you should remember to make is to enable the use of local files in settings. In Label-Studio go to Settings->Cloud storage->Add Source Storage ->Local files Based on the OS you are using, you might need to set an environment variable to allow for this.
Once everything works, you might just need a single short script to do step 2 and 3 at once. This workaround has the additional benefit of allowing for programmatic changes to the labels. For instance, you might want to change a given label text from 10000 annotated images into a different text (e.g. more specific) with this script you can programmatically do that easily.
Upvotes: 2