Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

yolo preannotated dataset #45

Closed
haviduck opened this issue Aug 27, 2021 · 9 comments
Closed

yolo preannotated dataset #45

haviduck opened this issue Aug 27, 2021 · 9 comments

Comments

@haviduck
Copy link

Hey, we are moving our operation to label studio from cvat. we have a bunch of pre-annotated images that exist in yolos 1 txt file per image thing. Do you know a way i can batch convert these to label studio's json format?

@makseq
Copy link
Member

makseq commented Aug 28, 2021

Hi, check this PR please: #46

@makseq
Copy link
Member

makseq commented Aug 28, 2021

@smoreface I've added YOLO => LS Json format converter (see #46).
I would like to add this into our docs, what do you think about it? I'd even add this to our blog post about YOLO.

@haviduck
Copy link
Author

haviduck commented Aug 29, 2021

Hi, check this PR please: #46

absolutely spot on. i -really- dig label studio and this removes the last block for integration for me. thank you thank you thank you. can you provide a base structure for the dataset? obj.data, obj.names, img/imagelist.jpgs + img/txtlist.txts ?

**update on that, you get the notes.json by exporting from your project or you can manually make it by something like this:

{
  "categories": [
    {
      "id": 0,
      "name": "classname1"
    },
    {
      "id": 1,
      "name": "classname2"
    },
    {
      "id": 2,
      "name": "classname3"
    }
  ],
  "info": {
    "year": 2021,
    "version": "1.0",
    "contributor": "Label Studio"
  }
}

Additionally, place your txts in a labels dir and your images in an images dir near notes.json.

@makseq have you had a go at using yolo as a ml backend? just curious.

@makseq
Copy link
Member

makseq commented Aug 29, 2021

@haviduck This is yolo structure.
I've updated codes, please, pull the latest changes.

  1. Now categories are taken from classes.txt (instead of notes.json).
  2. Labeling config for the project will be generated automatically.

YOLO export example:

images
 - 1.jpg
 - 2.jpg
 - ...
labels
 - 1.txt
 - 2.txt

classes.txt

classes.txt example

Airplane
Car

@haviduck
Copy link
Author

@haviduck This is yolo structure.
I've updated codes, please, pull the latest changes.

  1. Now categories are taken from classes.txt (instead of notes.json).
  2. Labeling config for the project will be generated automatically.

YOLO export example:

images
 - 1.jpg
 - 2.jpg
 - ...
labels
 - 1.txt
 - 2.txt

classes.txt

classes.txt example

Airplane
Car

perfect, thank you! im seeing some discrepancies, but i will do more research, before making a claim. thanks for swift and good support.

@makseq
Copy link
Member

makseq commented Aug 29, 2021

@haviduck Waiting for your feedback and details :)

@haviduck
Copy link
Author

issue was with my own shitty pseudolabeling :) works great, thanks a bunch!

@haviduck
Copy link
Author

im not gonna complain about open source stuff, but some quick feedback, adding local storage along with a labelstudio json file isnt super intuitive. i found myself mounting my images then connecting them via the storace connector. the image url had a ?d paramater that my converted json didnt honor. its just a matter of search and replace, but it was a bit unclear until then. i couldnt sync the mount AND upload the json as it would duplicate tasks. id be more than happy to push a pr or help out if needed, just some feedback.

@makseq
Copy link
Member

makseq commented Sep 1, 2021

@haviduck PRs are highly appreciated!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants