Skip to content

Conversation

@JBWilkie
Copy link
Contributor

Problem

As described in PY-646, sufficiently small polygons can result in an assertion error due to rounding 4 decimal place floats to integers. This can cause the minimum & maximum x or y coordinates of the enclosing bounding box to be equal, resulting in a "flat" bbox with no area that is therefore invalid

Solution

Pass the rounding arg as False to prevent this

Changelog

Resolved rounding error for very small polygons in Pytorch dataloaders

@linear
Copy link

linear bot commented Dec 13, 2023

@JBWilkie JBWilkie merged commit 254d05a into master Dec 13, 2023
JBWilkie added a commit that referenced this pull request Dec 13, 2023
JBWilkie added a commit that referenced this pull request Dec 13, 2023
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