Introduction to Cellpose#
In this section, we dive into Cellpose, a state-of-the-art deep learning tool for biological image segmentation. You’ll learn how it works, what makes it unique compared to other models like U-Net and StarDist, and how to use it via its easy-to-use web interface (GUI). We’ll conclude by setting the stage for using Cellpose in Google Colab for more flexible and scalable workflows.
What is Cellpose?#
Cellpose is a deep learning model for segmenting biological images. It was released in 2021 by Stringer et al. with a specific goal: to create a model that works well on many types of microscopy data without needing retraining.
Unlike tools like U-Net or StarDist that often require dataset-specific training, Cellpose was designed as a generalist model. It was trained on a large, diverse set of images—fluorescent images, phase contrast, cells with or without nuclei, cytoplasmic markers, and more.
The Core Innovation: Flow Fields#
Key Idea#
Cellpose predicts spatial flow fields instead of binary masks. Each pixel in the image is assigned a vector that “points” toward the center of its object. After these flows are computed, the pixels are grouped based on how they flow together—like tracking water to a drain.
How it Works (Conceptually)#
Input: An image of cells, nuclei, or tissue.
Model predicts:
A probability map: which pixels are likely to belong to any object.
A flow field: where each pixel would move if it were pulled toward its object’s center.
Pixels are grouped: Based on where they flow, pixels are grouped into instances (cells).
Cellpose Training Data and Generalization#
Cellpose was trained on over 70,000 manually annotated cells across various imaging modalities, including:
Fluorescence (cytoplasmic, nuclear, and membrane markers)
Brightfield
Phase contrast
Tissue sections
This diversity is what makes Cellpose a generalist—you often don’t need to retrain it on your own data.
Key strength, Cellpose allows custom training if needed, which is something we’ll briefly touch on later.
Cellpose Timeline#
Version |
Release Date |
Name / Paper |
Key Features & Innovations |
Use Cases / Impact |
|---|---|---|---|---|
Cellpose 1.0 |
December 2020 |
[Stringer et al., Nat. Methods (2020)] |
- Introduced flow-based segmentation |
- Ready-to-use for diverse cell types |
Cellpose 2.0 |
April 2022 |
[Pachitariu & Stringer, Nat. Methods (2022)] |
- Enabled human-in-the-loop training |
- Great for labs with specific cell types |
Cellpose 3.0 |
February 2024 |
[Stringer & Pachitariu, Nat. Methods (2025)] |
- Added image restoration before segmentation |
- Particularly effective for challenging or degraded images |
Cellpose-SAM |
May 2025 |
[Pachitariu, Rariden & Stringer, bioRxiv (2025)] |
- Achieves superhuman generalization |
- Broadest generalization across datasets |
Using Cellpose via the GUI#
Cellpose comes with a graphical user interface (GUI) that lets you segment images without any coding. It’s one of the easiest ways to get started.
Accessing the GUI#
You can access the Cellpose GUI in two main ways:
Option 1: Online Web Tool Cellpose developers provide a web-based GUI:
Go to https://www.cellpose.org
Click “Run Cellpose GUI”. This launches a web app via the browser.
Note: The web app uses limited resources and is best for trying out single images.
Option 2: Local Install (Desktop App) If you want better performance:
Install Cellpose on your local computer
Launch the GUI using cellpose from the command line
Instructions for installation are available on MouseLand/cellpose
Show code cell source
%%HTML
<iframe width="900" height="506" src="https://www.youtube.com/embed/2ANILvqca6Q?si=jAhAuVYPoyXGuo1M" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>