NRCan / geo-deep-learning

Deep learning applied to georeferenced datasets
https://geo-deep-learning.readthedocs.io/en/latest/
MIT License
150 stars 49 forks source link

BUG: AOIs out-of-memory error #539

Closed valhassan closed 6 months ago

valhassan commented 1 year ago

Describe the bug When processing a large number of rasters (AOIs) >50 the processes (verification/tiling) becomes memory intensive. Hence, to process AOIs large amounts of memory are required which is not sustainable.

To Reproduce Steps to reproduce the behavior: Given large AOIs and constrained memory we run into OOM errors.

Expected behavior We would like to successfully process large AOIs without OOM errors.

Screenshots OOM_error

OOM_rgb_quartre_classes

Additional context The code logic in AOI.py needs to be rethought and refactored to allow for better memory management. e.g. refactor loops as generators.