cellpose icon indicating copy to clipboard operation
cellpose copied to clipboard

[BUG] Memory Leak maybe?

Open mayishazn opened this issue 1 year ago • 1 comments

Using the new cellpose denoise cyto3. It seems while running through the model.eval. my machine is using up 15GB RAM. My images are 2048*2048 pixels. They're just not that big. And I set a limit to only parse through 5 images at a time.

image

The notebook I am running is as follows: https://drive.google.com/file/d/1-Wat0MptBA9t4jyKJt9BLUhanU5LrA5t/view?usp=sharing

Any help appreciated! Thanks!!

mayishazn avatar Apr 19 '24 00:04 mayishazn

To add more details - I have watched the RAM increase as it went through a batch of 5 images. Even after running: del styles del names del imgs del imgs_dn gc.collect()

the RAM usage remains capped. It seems cellpose itself is hogging memory and not clearing info between processing batches of images.

mayishazn avatar May 07 '24 21:05 mayishazn

if the model is on the CPU then it will stay in RAM, we are working on improving memory usage so I will close this issue for now but let us know if you have more questions

carsen-stringer avatar Sep 10 '24 08:09 carsen-stringer