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

Optimize mask merging and improve memory use #101

Merged
merged 10 commits into from
Feb 5, 2021
Merged

Conversation

zhiltsov-max
Copy link
Contributor

@zhiltsov-max zhiltsov-max commented Feb 2, 2021

Summary

  • Added more memory control for mask merging and mask materialization operations
  • merge_masks can now receive an iterator, which can be helpful for reducing memory consumption
  • Improved the memory situation in and fixed Dumping Segmentation Masks 1.1. takes way too long #53
    • Memory for masks should not be an issue anymore
    • There is still can be a problem with low performance, when merging lots of masks (or polygons into masks)
  • Significantly improved performance:
    • of masks_to_polygons (10k x 10k image & 250 masks experiment: 200s -> 30s)
    • of CompiledMask building (10k x 10k image & 250 masks experiment: 200s -> 80s)

How to test

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

@zhiltsov-max zhiltsov-max merged commit d1810b7 into develop Feb 5, 2021
@zhiltsov-max zhiltsov-max deleted the zm/optimize-masks branch February 5, 2021 04:44
@zhiltsov-max zhiltsov-max mentioned this pull request Feb 11, 2021
7 tasks
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.

Dumping Segmentation Masks 1.1. takes way too long
2 participants