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

fixed multipolygon error, submask speedup 1700x #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

diogo-aos
Copy link

This pull requests makes 2 contributions:

  • addressing the multipolygon problem
  • speedup sub mask creation 1700x

This pull request addresses the multipolygon error in issues 9 and 12, by adding each individual polygon in the multipolygon.

The current sub mask creation is very slow because it uses Python loops. This function was reimplemented using NumPy native boolean logic. This implementation receives the category colors instead of the image size. Using cProfile, in our dataset, the speedup was of 1700x.

Contributions by myself and @fsmatilde.

Copy link

@joeyst joeyst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes both sped up generating annotations (while maintaining correct annotations) and fixed the multipolygon error for me as diogo-aos said. (P.S., thank you diogo-aos!)

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.

2 participants