HumanSignal / label-studio-converter

Tools for converting Label Studio annotations into common dataset formats
https://labelstud.io/
255 stars 132 forks source link

RectangleLabels : x,y values inconsistent #235

Closed syedfquadri closed 1 year ago

syedfquadri commented 1 year ago

The values of x,y is NOT "_ coordinate of the top left corner before rotation (0-100)" when the BBox is rotated using anchor thingy (by dragging). In this the rotation transformation occurs around cx,cy.

However, values of x,y is "_ coordinate of the top left corner before rotation (0-100)" when BBox rotation values is typed. In this the rotation transformation occurs around x,y.

Help. This is expected behavious or a bug in rotation using dragging method?

BBox: Screenshot (820) "value": { "x": 21.331058020477816, "y": 22.727272727272727, "width": 33.27645051194539, "height": 18.181818181818183, "rotation": 0, "rectanglelabels": [ "bbox" ]

Typed-Rotation: Screenshot (822) "value": { "x": 21.331058020477816, "y": 22.727272727272727, "width": 33.27645051194539, "height": 18.181818181818183, "rotation": 45, "rectanglelabels": [ "typed-rotated-bbox" ]

Drag-Rotation: Screenshot (821) "value": { "x": 29.54614896742924, "y": 3.0447607617210197, "width": 33.27645051194534, "height": 18.181818181818233, "rotation": 44.8606754121663, "rectanglelabels": [ "drag-rotated-bbox" ]

Values below images are from json export, notice the value.x ,value.y for dragged and typed

Thanking in anticipation.

syedfquadri commented 1 year ago

Posted in main label-studio repo. https://github.com/heartexlabs/label-studio/issues/4554