Skip to content

Optimize mask merging and improve memory use#101

Merged
zhiltsov-max merged 10 commits intodevelopfrom
zm/optimize-masks
Feb 5, 2021
Merged

Optimize mask merging and improve memory use#101
zhiltsov-max merged 10 commits intodevelopfrom
zm/optimize-masks

Conversation

@zhiltsov-max
Copy link
Copy Markdown
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 requested a review from azhavoro February 2, 2021 19:20
@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
zhiltsov-max pushed a commit to zhiltsov-max/datumaro that referenced this pull request Jan 27, 2026
- Added native support for ellipses in Datumaro format
- Added support for streaming in Datumaro format import and export
- Added support for Datumaro v1 format (for import)
- Added support for point positions in skeleton categories
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