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

empty segmentation fix #1094

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

empty segmentation fix #1094

wants to merge 4 commits into from

Conversation

timonpalm
Copy link

I struggle with an issue that sometimes the model returns an empty mask which eventually let the program fail.

Either poly1 or poly2 was an empty polygon, taking the union with that will also always result in an empty polygon. I simply fixed it by setting the merged polygon to the not empty one.

That worked fine for me and I thought maybe someone else had the same error and this is a reasonable change.

@mookghg
Copy link

mookghg commented Dec 12, 2024

    xmin = max(bbox[0], 0)
               ~~~~^^^
TypeError: 'NoneType' object is not subscriptable

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

Successfully merging this pull request may close these issues.

3 participants