Out of memory error not fixed by SpeedUpCellProfiler


#1

I’ve started to do medium-scale image analysis on my Mac (>50 images at a time), but I’ve encountered problems with CellProfiler crashing after 20-35 cycles of image analysis with an “Out of Memory” error. I’ve modified the pipeline to include SpeedUpCellProfiler at the end, and set it to clear the entire memory each time, but that doesn’t seem to help at all.

My computer has 2 GB of RAM, and if I watch the memory usage over time, I see I have about 1.2 GB free before I start CellProfiler. When I start the image analysis it goes down to around 800 MB, and then oscillates each cycle ending at a lower number until it finally reaches 0 MB and CellProfiler crashes. I’ve pasted the error code and my pipeline file below.

I’m using the latest Devloper’s version (7098) of MATLAB, and don’t have any windows displayed during the image processing to reduce memory usage.

Any ideas how I can fix this?

Thanks,
Chris

There was a problem running the image analysis. Sorry, it is unclear what the problem is. It would be wise to close the entire CellProfiler program in case something strange has happened to the settings. The output file may be unreliable as well. Matlab says the error is: Out of memory. Type HELP MEMORY for your options. in the OverlayOutlines module, which is module #09 in the pipeline.

Stack:
OverlayOutlines in /Users/Chris/Documents/MATLAB/CellProfiler/Modules/OverlayOutlines.m (138)
AnalyzeImagesButton_Callback in /Users/Chris/Documents/MATLAB/CellProfiler/CellProfiler.m (4497)
gui_mainfcn in /Users/Chris/Documents/MATLAB/CellProfiler/CellProfiler.m (6257)
CellProfiler in /Users/Chris/Documents/MATLAB/CellProfiler/CellProfiler.m (55)
NucleiPIPE.mat (1.74 KB)


#2

Hi Chris,

I’m guessing you’re already taken a look at Memory and Speed Help under help >> General Help? If not, you may want to take a look and see if any the suggestions are helpful.

Also, how big are your image files? If they are extremely large, you may want to consider using the Resize module to conserve space…

Regards,
-Mark


#3

Hi Mark,

Thanks for your reply. The original images that I used were 1.3 MB tiff files, but I’ve had some luck with smaller images (by either using resize, or using 2x2 binning). However, this somewhat limits what I can do, as the resolution offered by these images is a little too low for my purposes.

I’ve read the help files and also earlier threads on this topic, and made the following modifications to my pipeline:

  1. Re-using the same image names throughout the pipeline
  2. Not displaying any windows during processing
  3. Using SpeedUpCellProfiler
  4. Resizing images to a lower resolution

As I said before, I’ve had some luck with #4, and am able to get through 50-60 images before things slow down to a crawl. (The 2x2 binned images are around 450 KB). However, I’d ideally like to use full resolution images. Does compressing the full resolution tiff images (which can get the image size <100 KB) have any affect on the resolution or on quantitative readouts of those images?

Thanks,
Chris


#4

Hi Chris,

Would you be able to post a few of your images (2-3 perhaps) to the forum, so we can run your pipeline and examine its performance?

Regards
-Mark


#5

Hi Mark,

Sorry for the delayed response. While I haven’t fixed the problem on my own machine, I was able to use a more powerful computer (dual 3 GHz, 8 GB ram) to do my calculations, and it worked well without giving me any out of memory errors. I’m posting the pipeline and sample images below in case the information is useful for you.

Best,
Chris







#6

And the pipeline:
NucleiHighResPIPE.mat (1.56 KB)