Counting Multinucleated RPE Cells

I have been trying to design a pipeline to count RPE cells and measure their area. Some problems we have been having are that they are multinucleated, there are nuclei on the cell borders, and that they have vastly different cells size and shape (on the knockouts). I originally tried to use the identifyprimary and then identifysecondary with propagation, but could not get an accurate number.

So the pipeline I am currently using works like this:

  1. Take the nuclear staining (blue) and use identifyprimary on the nuclei
  2. Make an image of the nuclei
  3. Delete nuclei from the inverted image of the cells+nuclei (green)
  4. IdentifyPrimary function looking for the cells (cytoplasm)

It works well for the wild type images, usually with about 3-5% error, but is very inaccurate with the knockouts. It often counts the large cells as multiple cells or has problems separating elongated cells.

I have attached some images of the wild type and KO, as well as my current pipeline. Any help or suggestions would be greatly appreciated.

Thank you

RPE Pipeline.cppipe (12.1 KB)

Edit: Here is a link to the images, because they didn’t seem to upload correctly:
Google Drive Link

Hi @moxer42,

Your images are a good candidate for ilastik pixel based segmentation. Ilastik will consolidate and classify pixels even if the signal in your images are contained across several channels or if you’re interested in fine structures, such as membrane junctions. Please refer to this blog post to read more about how to use ilastik with CellProfiler. Would you be able to share what stains you used in the preparation of your images?

I went ahead and trained an ilastik model to label nuclei, membrane, and background. I trained pixels from each of the images you provided; note that this kind of machine learning approach has a tendency to over-fit, so you may need to update the model with pixel data from additional images you wish to analyze. Here is a look at the crops of probability maps from each of the classes for knockout-2:





In the crops above you can see how the structures we defined have been separated out of the original color image. Furthermore, I chose this crop, because this was from the most challenging of the three images and I wonder if the nuclei in the left portion of the crop are missing altogether. Could this be a biological result or a result of the sample preparation or staining?

I updated the pipeline you shared to segment and measure the RPE cells. In short, the probability maps are used to segment cells and nuclei independently of each other since not all cells have a single nuclei. Thankfully, the membrane stain is very good and for the most part clear separation between cells was attainable. The wild-type cells are so pretty and uniform! Here is a look at the results:




Finally, the nuclei that were found were related to the cells where they were overlapping. We can count the nuclei per cell and see how they change between the images. Wild-type cells typically have 1 or 2.


The pipelines and ilastik model are in this zip file: (8.6 MB) The probability maps will have to be recreated and couldn’t be included due to their size.


1 Like

Thank you for the help. I am working on setting up ilastik today and hopefully can get good results with it. The stains we are using are ZO-1 (488) and Phalloidin.

Good luck! Please note that you will need to change the names of the 3 image files from your original post in order for the ilastik project to recognize the images. I used the filenames “wt1.tif”, “ko1.tif”, and “ko2.tif”. Furthermore, to process additional images, use the Batch Processing module in ilastik.

Hello Kyle and others,
Excellent JOB for this analysis!
I am new to this community and am writing for great help in my project.
We want to compare the structural change of the retinal pigmented epithelial cells (RPE) after drug treatment. We try to analyze the difference in some parameters, e.g., form factor, solidity, roundness, eccentricity, neighbors, nuclear number within the cells. Hence we stained RPE cells with ZO1 antibody for the tight junction protein and DAPI for nucleus. Because the staining is very dirty, there are a lot of staining debris within the cells. I have to remove the dirt within the cells using Photoshop before I can run in Cellprofiler, which is very time-consuming and frustrated. After I ran the files into Cellprofiler, most of the cells can be counted correctly, but there are about 1-2% cells were recognized as two cells as indicated in my files. You can access my original confocal images, edited files and pipeline file in my Dropbox ( The cells which were recognized as two cells were labeled with blue or black dots in the .png files. I have the following questions for help from experts working in Cellprofiler.

  1. How can use the documents directly without editing within Photoshop.
  2. How can I avoid cells being split.
  3. Is there any other parameters can be used for distinguishing the structural difference amount these cells? A recent paper ( indicated that the method in the paper maybe better than the parameters (e.g., form factor, eccentricity, solidity and roundness) listed in Cellprofiler. But I have no idea on how to use the method in Cellprofiler.
    Any help and recommendation from the forum would be greatly appreciated!