Code Monkey home page Code Monkey logo

Comments (3)

rafaelpadilla avatar rafaelpadilla commented on May 30, 2024 2

@dmesquita ,

Note that Azure follows COCO's annotation format, which is x_relative, y_relative, width_relative, height_relative.

In our repository, the BoundingBox object in the format XYWH RELATIVE refers to YOLO's relative format:
image

The difference is that YOLO's format has the first two coordinates (x,y) as the center of the bounding box.

I hope that helped. :)

from review_object_detection_metrics.

rafaelpadilla avatar rafaelpadilla commented on May 30, 2024

Hi @dmesquita ,

Thank you for your message.

The values are correct. Please, see the explanation below:

When you create the following bounding box:

bbox = BoundingBox(
    "img_filename",
    "category_class",
    (
        0.04287003610108303,
        0.04801829268292683,
        0.22021660649819497,
        0.11178861788617887,
    ),
    CoordinatesType.RELATIVE,
    (540, 960),
    None,
    BBType.GROUND_TRUTH,
    BBFormat.XYWH,
)
  1. you are setting the following bounding box coordinates in the relative format:
x_center = 0.04287003610108303
y_center = 0.04801829268292683
width = 0.22021660649819497
height = 0.11178861788617887
  1. you are considering the resolution of your image as width=540 and height=960

Note that the relative coordinates you are providing are in the following format (x_center, y_center, width, height):
image

So, when you convert the relative coordinates into absolute coordinates, you will have the following values:
X = -36.3086
Y = -7.9024
width = 118.9169
height = 107.3170

Best regards,
Rafael

from review_object_detection_metrics.

dmesquita avatar dmesquita commented on May 30, 2024

Thanks! It' seems strange, I'm using a dataset from the Azure Custom Vision export and it says the coordinates are "bbox": [x,y,width,height]". When I plot them using x and y with bbox (instead of Xc and Yc) the bb seem to be ploted correctly. I'll dig deep to see what's going on, thanks!

from review_object_detection_metrics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.