Closed iparask closed 5 years ago
This apparently is my mistake. Closing until I investigate further
I'm realizing that rasterio
is responsible for the large memory consumption. Please take a look at this notebook Cell 12 (Password can be provided via our slack channel).
Regardless of the image size, the memory consumption can be either high or low. I was discussing this with @AymenFJA and we think that the memory consumption is related with the image attributes when they are opened by rasterio
.
@bentocg, do you agree with this understanding. Also, @mmacferrin and @AymenFJA are using GDAL for tilling. Would that work here as well?
For what it’s worth, we’ve had good luck using GDAL in Python for reading image segments if you don’t need the entire image. It only helps, I think, if the TIF images are tiled (in the TIF format) to begin with, but if so it’s pretty good about using only necessary memory to read portions of the image.
This may not help, I haven’t been following this conversation closely (if it doesn’t, feel free to disregard). Just thought I’d toss that out here if it helps.
@mmacferrin this is actually helpful! Thank you!
In the ASIFT (mmacferrin branch)/phase_1.../tile_writer.py file, lines 46, 48 & 80 are what you'd need to do that, copy/paste and test it out, see if it helps. (Line 48, "GetRasterBand", doesn't actually read the band data, it just creates the object and gets metadata).
Hello @bentocg, I just fund out that the GPU prediction task requires 80GB of memory. Is that expected? Is there something in the implementation that causes it to reach those levels?
This is the case regardless the image size. Thank you!