Skip to content
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

When used for instance segmentation image rotation, points beyond the image boundary are not handled accurately #1873

Open
sunstudio opened this issue Aug 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@sunstudio
Copy link

sunstudio commented Aug 12, 2024

Describe the bug

I am doing instance segmentation image enhancement, and there is a polygon object. For the convenience of discussion, it is assumed to be a 4-sided polygon. After rotation, if one of the points exceeds the image boundary, the polygon in the target image becomes 3 points, which will reduce a large part of the target object area.

Screenshots

albumentations

In the left picture, the blue is the mask and the black rectangle is the canvas. In the right picture, after the augmentation rotation, the lower right corner of the mask rotates outside the canvas and is lost. In this case, the correct mask should be all the blue areas in the canvas, but the algorithm simply deletes the points outside the canvas and obtains the triangular area in the picture.

@sunstudio sunstudio added the bug Something isn't working label Aug 12, 2024
@ternaus
Copy link
Collaborator

ternaus commented Aug 12, 2024

Could you please provide the minimal code that reproduces the issue?

@ternaus
Copy link
Collaborator

ternaus commented Aug 12, 2024

Does using mask to represent the polygon will get the desired bahavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants