Open luforestal opened 5 months ago
hey @luforestal thanks for the bug report. As a sane first step, can we try upgrading Label Studio to the latest? We just want to make sure that this bug is present on the latest version.
Hey, chiming in to say that I am encountering a similar issue with rotated bounding boxes when trying to work from the JSON export.
I get inconsistencies with the rotation that are visible for angles > 5°.
My example:
LabelStudio
Script output result (using nodejs/sharp to do the drawing and compositing with svg).
It looks like the angle value used in labelstudio does not have the center of the rectangle (cx, cy) for origin (as expected) but the top-left point of the rectangle instead, which is quite strange as the UI actually rotates around the center!
So for me the fix looks like to patch all rects with:
const patchLabelStudioRect = <T extends Rect>(rect: T): T => {
const { x, y } = rotatePoint({ x: rect.x, y: rect.y }, rect.rotation, getRectCenter(rect));
rect.x = x;
rect.y = y;
return rect;
};
Interesting to dig this up a bit more, do you know where I can find the code responsible for drawing the boxes?
I'm using label-studio 1.2.0.
Hi, I have exported my annotations in JSON format. But when I try to view them in python, they appear offset almost 100 pixels. Here is an example of how they look in LabelStudio and how I see them in my code.
The code that I'm using:
Screenshots IMAGE AND LABELS IN LABELSTUDIO
IMAGE AND ONE LABEL IN PYTHON My labels in python (at least one example)
Environment (please complete the following information):