My laptop’s 4GB (used to be 2GB) cries in the darkness. It is crazy that so much RAM is still inadequate.
Are you on Windows?
32 gigs should easily be enough, even with other things running. I’ve only run into memory pressure on 50+ megapixel images. With that file open, I’m seeing about 7.5 gigabytes used. I think I can reduce this, though, by clearing away later, invalidated computation results early on in the pipeline.
The noise reduction switch can’t exactly cache the changes because the switch itself turns on or off a different demosaic method.
I need to stress-test it more to see what might be causing crashes.
Bear in mind that nlmeans is looking for similar patches. It might help to apply some noise reduction prior to nlmeans to help to identify similar patches.
I am not familiar with your implementation, but I would suggest doing impulse noise reduction prior to nlmeans. Strong impulse noise may reduce patch similarity when comparing patches.
In my GMIC noise reduction experiments, I often use a slightly blurred version of the image as a guide image. This reduces the impact of impulse noise. Patch weights are calculated on this image and then applied to the original image.
Likewise, doing some chroma noise reduction prior to nlmeans may help with patch finding. In my GMIC experiments, using a desaturated image as a guide gives improved chroma noise reduction in nlmeans, but chroma edges where the luminance is the same are destroyed.
I already tried putting chroma NR before nlmeans, thinking along the same lines, but it turned out horribly.
Ya I will try again too…maybe it was a one off
I ran into this as well. I guess one has to prioritize and compromise.
Well, I just found that I was leaking memory to a horrible extent.
With that fix and another change to reduce peak memory usage, the A7r4 only uses about 11 gigs peak, which I consider reasonable for an outrageously high res camera.
New builds should be coming soon…
Well done
After a large reordering of the pipeline to fix white balance, I’ve continued to work to improve things… today I had a breakthrough in that I should remove white balancing before nonlocal means and then restore it afterwards before chroma NR.
The difference in detail retention can be incredibly stark, especially in extreme white balance situations (here the blue channel multiplier is 3.8)
Left is new, right is old.