label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

How to import from roboflow dataset?

Open hemangjoshi37a opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. It's not quite a problem.

Describe the solution you'd like I want to import dataset from my roboflow account which is about image segmentation on electronics pcb

Describe alternatives you've considered No

Additional context No

hemangjoshi37a avatar Jul 28 '24 06:07 hemangjoshi37a

Hi @hemangjoshi37a - I'm not very familiar with Roboflow, but are you able to export your roboflow data as JSON or similar, then run some kind of batch job on that export to convert it into one of Label Studio's supported import formats? Docs on that are here: https://labelstud.io/guide/tasks.html

jombooth avatar Jul 31 '24 22:07 jombooth

Hey @hemangjoshi37a , have you accomplished that? I am facing the same issue.

sandeepy0 avatar Nov 15 '24 20:11 sandeepy0

@sandeepy0 not yet

hemangjoshi37a avatar Nov 15 '24 20:11 hemangjoshi37a

To import from Roboflow, or another dataset source, using the label-studio-converter. Note that it is now part of the label-studio-sdk and has been renamed to converter.py, so the instructions might be slightly different.

  • Export the dataset in an import format known to label-studio converter (i.e. a yolo format)
  • Extract the dataset to a known location: i.e. MyDataset
  • Create a classes.txt in MyDataset directory
  • Copy/upload the images to their final URI i.e. my_uri
  • Run cmd: label-studio-converter import yolo -i ./MyDataset --image-root-url my_uri -0 MyDataset.json
  • Import JSON file to label-studio

Note: ensure label-studio known classes and classes.txt contain the same classes. Using classes.txt, you can ignore classes you do not want but ensure the names are at the correct index/line.

SheldonWBM avatar Nov 19 '24 17:11 SheldonWBM