Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Vision to Yolo format #6043

Closed
1 task done
epiccucumber15 opened this issue Dec 20, 2021 · 3 comments
Closed
1 task done

Google Vision to Yolo format #6043

epiccucumber15 opened this issue Dec 20, 2021 · 3 comments
Labels
question Further information is requested

Comments

@epiccucumber15
Copy link

Search before asking

Question

Hi, Firstly, I want to thank you for such a great project. I'm trying to convert a Google Vision's OBJECT_LOCALIZATION response to Yolo format which is <object-class> <x> <y> <width> <height>

The response looks like this:

       "boundingPoly": {
            "normalizedVertices": [{
                "x": 0.026169369
            }, {
                "x": 0.99525446
            }, {
                "x": 0.99525446,
                "y": 0.688811
            }, {
                "x": 0.026169369,
                "y": 0.688811
            }]
        }

I already know what the object-class is but I'm lost on the rest. Any help is appreciated.

Additional

No response

@epiccucumber15 epiccucumber15 added the question Further information is requested label Dec 20, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Dec 20, 2021

👋 Hello @epiccucumber15, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.

For business inquiries or professional support requests please visit https://ultralytics.com or email Glenn Jocher at [email protected].

Requirements

Python>=3.6.0 with all requirements.txt installed including PyTorch>=1.7. To get started:

$ git clone https://github.com/ultralytics/yolov5
$ cd yolov5
$ pip install -r requirements.txt

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

@glenn-jocher
Copy link
Member

glenn-jocher commented Dec 20, 2021

@epiccucumber15 see YOLOv5 Train Custom Data tutorial for dataset format directions:

1.2 Create Labels

After using a tool like Roboflow Annotate to label your images, export your labels to YOLO format, with one *.txt file per image (if no objects in image, no *.txt file is required). The *.txt file specifications are:

  • One row per object
  • Each row is class x_center y_center width height format.
  • Box coordinates must be in normalized xywh format (from 0 - 1). If your boxes are in pixels, divide x_center and width by image width, and y_center and height by image height.
  • Class numbers are zero-indexed (start from 0).

Image Labels

The label file corresponding to the above image contains 2 persons (class 0) and a tie (class 27):

YOLOv5 Tutorials

Good luck 🍀 and let us know if you have any other questions!

@epiccucumber15
Copy link
Author

How would I convert the normalizedVertices object to Yolo format?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants