-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Labels
Comments
Hello, Would you mind providing your labeling config? Also, do you mind testing with the latest version of LS? Thank you,
|
Hi Abubakar,
Thanks for looking into this.
After updating Label Studio to version 1.17.0, and get the same cropping of the image in the GUI, and similar 6% X coordinates for (new) rectangular selections at the left edge of the document text – locations that on the original document would be well into the 15% margins.
Not sure if this is what you have in mind for ‘labeling config’, here is my Labeling Interface code:
<View>
<Header value="Select label and click the image to start"/>
<Image name="img-1" value="$img" zoom="true"/>
<PolygonLabels name="eraseRegion" toName="img-1" strokeWidth="3" pointSize="small" opacity="0.9">
<Label value="Erasure Region" background="#FFCEAE"/>
</PolygonLabels>
<PolygonLabels name="eraseRegionNoSignature" toName="img-1" strokeWidth="3" pointSize="small" opacity="0.9">
<Label value="Erasure Region (not signature)" background="#00F080"/>
</PolygonLabels>
<RectangleLabels name="initials" toName="img-1">
<Label value="Initials" background="#A080C0"/>
</RectangleLabels>
<RectangleLabels name="noinitials" toName="img-1">
<Label value="No Initials" background="#E0C0FF"/>
</RectangleLabels>
<RectangleLabels name="signature" toName="img-1">
<Label value="Signature" background="#CEAD80"/>
</RectangleLabels>
<RectangleLabels name="nosignature" toName="img-1">
<Label value="No Signature" background="#FEE0B0"/>
</RectangleLabels>
<RectangleLabels name="handwrittenSignature" toName="img-1">
<Label value="Handwritten Signature" background="#6060A0"/>
</RectangleLabels>
<RectangleLabels name="digitalSignature" toName="img-1">
<Label value="Digital Signature" background="#8080F0"/>
</RectangleLabels>
<RectangleLabels name="missingDate" toName="img-1">
<Label value="Missing Date" background="#A06060"/>
</RectangleLabels>
<RectangleLabels name="withDate" toName="img-1">
<Label value="Date" background="#F08080"/>
</RectangleLabels>
<RectangleLabels name="handwrittendate" toName="img-1">
<Label value="Handwritten Date" background="#308000"/>
</RectangleLabels>
<RectangleLabels name="digitaldate" toName="img-1">
<Label value="Digital Date" background="#80F080"/>
</RectangleLabels>
<RectangleLabels name="signInsertBox" toName="img-1">
<Label value="Signature Insert Box" background="#FF80EF"/>
</RectangleLabels>
</View>
***@***.***
Mark Wilber
Data Scientist IV
M: 510 282-2018
***@***.******@***.***> || dmatter.com<http://www.dmatter.com/>
From: Heidi ***@***.***>
Sent: Thursday, April 17, 2025 2:27 PM
To: HumanSignal/label-studio ***@***.***>
Cc: Mark Wilber ***@***.***>; Author ***@***.***>
Subject: Re: [HumanSignal/label-studio] Label Studio 1.15.0 displays large images with edge cropping. Computes coordinates based upon displayed image. (Issue #7379)
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<https://urldefense.com/v3/__https:/github.com/HumanSignal/label-studio/actions/runs/14525115757__;!!Pa1X2xkvRlqUvg!nLibeJ9-QeStOZC94EMgon2EeGANtjglSHYnPULxo6IavPqBnsWGqp2b_OcmZDcEXcr8gLiyDizGssZGqagKn07xmng$>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/HumanSignal/label-studio/issues/7379*issuecomment-2814056193__;Iw!!Pa1X2xkvRlqUvg!nLibeJ9-QeStOZC94EMgon2EeGANtjglSHYnPULxo6IavPqBnsWGqp2b_OcmZDcEXcr8gLiyDizGssZGqagKx3VJTzM$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ATBM5I2PEAFXOK2XPI56J2L22AMAVAVCNFSM6AAAAAB3GVZK22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJUGA2TMMJZGM__;!!Pa1X2xkvRlqUvg!nLibeJ9-QeStOZC94EMgon2EeGANtjglSHYnPULxo6IavPqBnsWGqp2b_OcmZDcEXcr8gLiyDizGssZGqagKsejWfas$>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
[https://avatars.githubusercontent.com/u/183714153?s=20&v=4]heidi-humansignal left a comment (HumanSignal/label-studio#7379)<https://urldefense.com/v3/__https:/github.com/HumanSignal/label-studio/issues/7379*issuecomment-2814056193__;Iw!!Pa1X2xkvRlqUvg!nLibeJ9-QeStOZC94EMgon2EeGANtjglSHYnPULxo6IavPqBnsWGqp2b_OcmZDcEXcr8gLiyDizGssZGqagKx3VJTzM$>
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<https://urldefense.com/v3/__https:/github.com/HumanSignal/label-studio/actions/runs/14525115757__;!!Pa1X2xkvRlqUvg!nLibeJ9-QeStOZC94EMgon2EeGANtjglSHYnPULxo6IavPqBnsWGqp2b_OcmZDcEXcr8gLiyDizGssZGqagKn07xmng$>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/HumanSignal/label-studio/issues/7379*issuecomment-2814056193__;Iw!!Pa1X2xkvRlqUvg!nLibeJ9-QeStOZC94EMgon2EeGANtjglSHYnPULxo6IavPqBnsWGqp2b_OcmZDcEXcr8gLiyDizGssZGqagKx3VJTzM$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ATBM5I2PEAFXOK2XPI56J2L22AMAVAVCNFSM6AAAAAB3GVZK22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJUGA2TMMJZGM__;!!Pa1X2xkvRlqUvg!nLibeJ9-QeStOZC94EMgon2EeGANtjglSHYnPULxo6IavPqBnsWGqp2b_OcmZDcEXcr8gLiyDizGssZGqagKsejWfas$>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
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:
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 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.

Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: