Help! Why does CellProfiler say it can’t find any valid image sets?

Defining the input to CellProfiler can be the hardest part of getting your pipeline set up and your analysis underway.  Incoming images are configured in the first 4 modules of CellProfiler – Images, Metadata, NamesAndTypes, and Groups – which offer lots of flexibility. But it’s sometimes confusing what each one does, and it’s not always obvious which ones you need for your experiment.

If you have mistakes in any of these modules, you may run across the dreaded errors ‘The pipeline did not identify any image sets’ or ‘Sorry, your pipeline doesn’t produce any valid image sets as currently configured’.  These errors simply mean that CellProfiler doesn’t know how to sort the images you’ve given it, and it can’t process them until it knows how they should be organized.

If you want to learn more, we recommend reading the help sections for each module, and everything under ‘Help->Creating A Project’ is a fantastic resource as well (we’ve included a table from it below that’s a great cheat sheet to understanding these modules). But here are some common triggers for this kind of error.

  • You forgot to hit ‘Update’ in the Metadata module when using the ‘Extract from image file headers’ option.
  • A piece of extracted metadata is missing (e.g., you remembered to extract the Plate metadata from your ‘regular’ images but not from your illumination correction functions). Check the output of the Metadata module to ensure all of your images have the information that they need.
  • You turned on ‘Groups’ but never gave it a piece of metadata to group by (in which case the ‘Metadata category’ is still set to ‘None’).
  • One of the sets of rules you’ve used to identify a channel isn’t set correctly – for example:
    • You’ve told it to set files containing ‘ch4’ as your DNA image but your experiment only has files ending in ‘ch1’, ‘ch2’, and ’ch3’.
    • You’ve told it to use ‘Directory does contain ‘ch3’’ to define your DNA image, but you meant to set it to ‘File does contain ‘ch3’’.
  • You’ve used ‘Metadata’ for your Image set matching rather than ‘Order’, but you haven’t set it up correctly.

These last two errors are particularly sneaky: if you hover over a dropdown menu with a scroll-wheel mouse, you can accidentally scroll down to a different option, messing up a configuration that was previously correct.  We’re working to try to correct this problem in future versions of CellProfiler.

Table 1: A quick guide to the functions of Metadata, NamesAndTypes, and Groups (from Help->Creating A Project->Configuring Images for Analysis )

Did these tips help you?  Are you having trouble configuring a CellProfiler pipeline?  Did you have a tricky configuration issue that you finally solved?  Tell us below!

Notable Replies

  1. I am still having trouble getting around this no valid image sets error? I believe I have updated the metadata and namesandtypes to avoid the listed problems mentioned but I still have been running into the same error. I have the image and pipeline attached here. Could you please help with troubleshooting?CellID_FlowCyt - 6.9.15 -quant.cpproj (159.1 KB)

  2. This is the error that keeps coming up as well:

    Traceback (most recent call last):
    File “cellprofiler\gui\cornerbuttonmixin.pyc”, line 115, in on_corner_left_mouse_up
    File “wx_core.pyc”, line 10646, in ReleaseMouse
    PyAssertionError: C++ assertion “!wxMouseCapture::stack.empty()” failed at …\src\common\wincmn.cpp(3319) in wxWindowBase::ReleaseMouse(): Releasing mouse capture but capture stack empty?

  3. Hi,

    Your Metadata module is set to extract a bunch of information that as far as I can tell isn’t in your file names (the one file that was loaded appears is named CD68.png, but you have the long default extraction string turned on (looking for Plate,Well,Site, and several other things as well). If you don’t need Metadata extraction, you can simply turn that module off with setting Extract metadata? to “No”; if you do need it you should tailor the extraction parameters to your actual image names.

    What’s ACTUALLY causing the error though is that in NamesAndTypes you’ve told CP that for each field of view/image set it should expect 12 images, one with “DNA” somewhere in the file name, one with “Two” somewhere in the file name, one with “Three” somewhere in the file name, etc etc etc. Based on the fact that you’ve only loaded one image (which contains none of those words in the file name), CellProfiler is correct in saying it can’t find an image set, because it thinks an image set consists of 12 files that have all of those file names present.

    I recommend you read the help for the NamesAndTypes module as well as all the help topics in Help->Creating A Project if you need more help getting that step set up correctly.

    The wx error in your last post is a known bug in 2.2 but shouldn’t actually keep you from processing things once you fix the other issues.

    Good luck!

  4. Thank you very much @bcimini. Your explanation helped clarify a lot for me.

Continue the discussion