Skip to content

Label Studio 1.15.0 displays large images with edge cropping. Computes coordinates based upon displayed image. #7379

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

Open
markwilber opened this issue Apr 15, 2025 · 2 comments

Comments

@markwilber
Copy link

Describe the bug

For large images (e.g., 5100 x 6600 pixels), Label Studio's GUI crops margins, and computes locations for bounding boxes (as percentages) based upon the displayed image, rather than the actual image. Documentation clearly states that its label boundaries are computed in terms of original image, not displayed image.

Evidence that the displayed image is cropped: multiple image viewers show 15% margins on the left and right sides of some documents (example attached), but LS shows margins of about 6% (example attached).

Evidence that the bounding boxes (as percentages) are based upon the displayed image, rather than the original document: When selecting a word at the edge of the left margin, the bounding box reported shows 6%, which is consistent with displayed image text limits, but is clearly exterior to the text in the original image.

Bounding box errors.

To Reproduce
Steps to reproduce the behavior:

  1. Load a large document image
  2. Select a rectangular bounding box label
  3. Select a word on the edge of the displayed text
  4. View the x coordinate as consistent with the displayed image, which is not consistent with the original image.

Expected behavior

If an original image is cropped (presumably to maximize the magnification of relevant portions of the image), the bounding box values for extreme points displayed would be well within the ranges 0 - 100% (in x or y), not near 0 or 100%.

Screenshots

Image, as presented in Windows Photo app:

Image

Label Studio GUI (note X coordinate for bounding box is 5.71%, which matches displayed image, but which is outside the text of original image):

Image

Image as loaded into a jupyter notebook, with exported bounding boxes in red. I confirmed conversion of LS locations to pixels to establish that exported bounding boxes matched what is shown in Selection Details of GUI image.
Image

Environment (please complete the following information):

  • OS: Windows 11
  • Label Studio Version 1.15.0

Additional context
Add any other context about the problem here.

@heidi-humansignal
Copy link
Collaborator

Hello,

Would you mind providing your labeling config?

Also, do you mind testing with the latest version of LS?

Thank you,
Abu

Comment by Abubakar Saad
Workflow Run

@markwilber
Copy link
Author

markwilber commented Apr 18, 2025 via email

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

No branches or pull requests

2 participants