CellProfiler 2.1 - headless mode and input


I updated my existing pipelines from CP 2.0 to the newest version (CP 2.1) - change every “loadImage” module to the new Images/Metadata/… section.
Everything is running smoothly under GUI, when I however tried to run it headless, CP does not do anything - starts and stops.
The same pipeline with the old loading method is working perfectly.

I run it on Win7 x64 with command:

"C:\Program Files\CellProfiler\CellProfiler.exe" -c -i C:\Users\user\Test1 -o C:\Users\user\Test1_out -p C:\Users\user\pipeline_test.cppipe

The output is:

Version ... Pipeline saved with... stopping worker thread 0 ... stopping worker thread 8 Exiting...

It seems that CP does not load any image.

Is it possible to run CP2.1 without GUI, using the new loading approach or should I just stick with the old method?
I upload an example of my pipeline (but as i said - it’s working under GUI - so i guess it is correct)
I could not find the answer in manual or somewhere in the forum.

Thanks for help! :smile:
pipeline_test.cppipe (7.79 KB)


Possibly this fix may clear this up. Would you try a new trunk build? github.com/CellProfiler/CellPro … TrunkBuild


Unfortunately, the newest trunk version does not help.

I believe the issue is that for 2.1, the upgraded pipeline doesn’t use the default Input folder for input, but instead the file list from the Images module. This list is not normally saved with the pipeline, and so CP doesn’t know what files to grab.

However, you can export the pipeline with the image list and it should then run headless. You can do this by selecting *File > Export > Pipeline… * and then in the dialog box that comes up, change the “Save as type” drop-down box to “Cellprofiler pipeline and file list”. This also means the -i flag is not necessary.

As an aside: You should also be able to run CP headless with the project file (which also saves the image list), but it doesn’t seem to work; I’ve filed a bug report here.

EDIT: The bug has since been fixed.

1 Like

Your solution works, but i would like to be able to run simulatenously several instances of CP, fully automatically from a batch script. This way I would not have to upload every image set manually (I am using TrackObject, so i cannot load them all at once). Anyway, I believe i must stick to the older approach.

Thank you for every answer!



This info is helpful for me too as I was having the exact same problem. By exporting both pipeline and file list I can now run headless locally on my Mac.

However, I really want to run this on a remote CentOS server over SSH, and I’m confused as to how the file list will work there… If I make the pipeline+file list on my Mac by dragging and dropping images, I assume the file list will contain my local image paths? If I then run remotely on the server and CP ignores the -i flag, how do I tell it where the images are located on the server?

Thanks for any help!