-
Notifications
You must be signed in to change notification settings - Fork 28
FIX: region outflow #204 #226
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
Conversation
If the user annotates a region outside of the image, the downloaded data will only reflect portions within the image.
|
@glenntfung is attempting to deploy a commit to the Suman Kunwar's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Added a new commit; this should prevent the annotator from working beyond the image :) |
Can you confirm this @sumn2u? I think we need another issue/PR for Annotated Image download if this is also the case on your machine as well, to keep things clean. If this is not the case, then it's my problem and I will try to find it out. Thanks! |
The annotated image is working fine on my machine with recent changes. Did you first save the image and checked the box before downloading it?
|
|
I think things are fine now. The problem I had, but not you, should be due to the input image mode. I added a convert to the server so we might not have a problem. My test image was the A Lab's logo in the repo. |
What do you think about checking the image mode first and then converting if necessary? This might prevent unnecessary conversions. image = Image.open(BytesIO(response.content))
if image.mode != "RGBA":
image = image.convert("RGBA") |
Yes! That's better. I did this. |
sumn2u
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Fixes #204 |
|
Great work @glenntfung. |






If the user annotates a region outside of the image, the downloaded data will only reflect portions within the image.