clij / clijx

Other
4 stars 6 forks source link

greyscale attribute filtering; RAM consumption #19

Open pr4deepr opened 4 years ago

pr4deepr commented 4 years ago

Hi Robert I've just noticed a concern with greyscale attribute filtering plugin in CLIJx. So, I am working with an image: 1024x1024x75, 16-bit (150 MB). When I apply the filter with the parameters number_of_bins = 10; minimum_pixel_count = 30000; the RAM consumption goes ups significantly during the process, it shot up from around 8 to ~29 GB RAM (21 GB usage). The GPU RAM usage was a maximum of 1.8 GB interestingly. Wondering why this is the case? With larger images, FIJI froze as my PC only has 32 GB RAM. 😄

Cheers Pradeep

haesleinhuepf commented 4 years ago

Hey @pr4deepr ,

very interesting! That sounds like the statistical analysis (which used the CPU) has a memory leak. I'll some extensive loops and let you know if I can find something,

Thanks for reporting!

Cheers, Robert

pr4deepr commented 4 years ago

Hi Robert So, I had a closer look again and I can replicate this on "some" images after I've run an enhance contrast on them. Most of the images have extremely uneven labelling or labeling is uneven in the centre of thick objects (antibody penetration issues). To fill them up a bit, I apply an enhance contrast operation image When I run grayscale attrib filtering, within the console I see:

Min intensity: 0.0 Max intensity: 65535.0 Grey level 6553.5

There is no more output after this; normally all the grey values tested are listed. The RAM starts filling up after this and if the stack is large it hangs. The image I tested is a 16-bit image: 1024x1024x98.

Cheers Pradeep