Two hundred cells, one afternoon

You have twelve fluorescence images from yesterday's experiment. Your supervisor wants the number of cells per field by Friday. Counting by hand, clicking once on every cell with Fiji's multi-point tool, takes you twenty minutes per image, and by image eight you're no longer sure you counted the same way as in image one.

A colleague says there's a free model that outlines every cell in seconds. You try it, and it gives a number. But is it the right number? Did it count the cell cut in half by the image edge? The two cells that touch? The bright speck of debris in the corner?

In an imaging lab this is a cell count for a proliferation or spreading assay. In a molecular-biology lab it's a nuclei count to normalise a transfection or a knock-down. Either way, a ready-made model can save you hours, but only if you know where it goes wrong. This book shows you how to run one on your own laptop, check it against your own count of one region, and spot the images where you shouldn't trust it. You are at Level 1 User: the count is for your own notebook, so a wrong number costs you a recount, not a paper.

After this you can

  • Install Cellpose on an ordinary laptop and segment a public sample image with its default pretrained model.
  • Check the masks by eye and name what the model got wrong: merges, splits, fragments and missed cells.
  • Compare the model's count with your own manual count of one region, using a counting rule you wrote down first.
  • Say for a new image whether you would trust the count, and why.

Before you start

  • Books: T01-L01 · From Idea to Working Result: The Four-Quadrant Method for the four-quadrant method. T01-L02 · Check AI Output Before Your Team Relies on It for the checking habit.
  • Cellpose, a free pretrained model (already trained, so you use it as it comes) that outlines each cell, a job called segmentation. Each outline is called a mask. You use it through its graphical interface: a normal window with buttons, so you don't write any code. It runs offline once installed, and your images never leave your laptop. That matters for unpublished data.
  • Fiji, optional: a free image-analysis program, needed only if you have to split an image's colour channels. Download it from the Fiji download page, unzip it and start it; there's no installer.