cellpose
anatomical segmentation algorithm
What it is and what it does
Cellpose is a deep-learning-based segmentation tool designed for identifying cells and nuclei in microscopy images. It combines a generalist neural network backbone with support for custom model training, allowing users to adapt it to their own data without extensive ML expertise. The package handles challenging real-world imaging conditions—shot noise, blur, undersampling, contrast inversions, variable channel order, and mixed object sizes—and works in both 2D and 3D.
The latest version integrates segment_anything for improved generalization and includes image restoration capabilities to clean up noisy or degraded input before segmentation. You can use pre-trained models out of the box, fine-tune them on labeled data via human-in-the-loop training, or run batch processing through the web interface. The package ships with a GUI, command-line tools, and a Python API, making it accessible for both interactive exploration and automated pipelines.
Use it for:
- Segment cell nuclei and cytoplasm in fluorescence microscopy images for quantitative analysis.
- Process 3D volumetric data from confocal or light-sheet microscopy with orthogonal refinement.
- Fine-tune a pre-trained model on your own labeled dataset to improve accuracy for specific cell types or imaging modalities.
- Restore degraded microscopy images before segmentation to improve mask quality.
- Batch-process large image collections via the Hugging Face web interface without local GPU setup.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Cellpose segments cells and nuclei in microscopy images using deep learning, with support for 2D/3D data, custom model training, and image restoration.
Yes, if you work with microscopy image segmentation. Cellpose is actively maintained, well-documented, and handles real-world imaging challenges. Install friction is low for standard ML environments. Note that pre-trained models are CC-BY-NC licensed; if commercial use of those models is required, verify licensing implications. No known security vulnerabilities.
Install
cellpose on PyPI
pip
pip install cellposeuv
uv add cellposepoetry
poetry add cellposeInstalling cellpose
Before you install
Low friction wheel distribution. Active maintenance with recent release. Requires torch and torchvision, which are substantial dependencies but standard for ML workflows. 13 runtime dependencies including image I/O and computer vision libraries.
License in practice
BSD permissive license. Training data and models are CC-BY-NC licensed, which restricts commercial use of those artifacts—relevant if you plan to use or redistribute the pre-trained models commercially.
Quickstart
pip install cellpose
import cellpose
from cellpose import models
model = models.Cellpose(model_type='cyto3')
masks, flows, styles = model.eval(images, channels=[0,0])
Requires torch and torchvision; GPU drivers and CUDA libraries recommended for performance. At least 8GB RAM; 16GB-32GB may be required for larger images and 3D volumes.
Verify before relying
- Whether pre-trained model download happens automatically or requires manual setup on first use.
- Memory and compute requirements for typical 3D segmentation workflows.
- Compatibility with Apple Silicon (MPS) for mask creation in 2D/3D.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 13 — numpy, scipy, natsort, tifffile, tqdm, torch, torchvision, opencv-python-headless, fastremap, imagecodecs, roifile, fill-voids, segment_anything |
| Maintenance | actively maintained — 61 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 115,659/month — #12,241 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cellpose-4.2.1.1-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
TotalSegmentatorAutomated segmentation of anatomical structures…
permissive · top 15,000 on PyPI
segmentation-models-pytorchProvides PyTorch-based neural network models…
permissive · top 15,000 on PyPI
pycat-napariPyCAT-Napari is a napari-based desktop…
permissive · top 15,000 on PyPI
nnunetv2nnU-Net is a semantic segmentation framework…
permissive · top 15,000 on PyPI
batchgeneratorsbatchgenerators provides data augmentation…
permissive · top 15,000 on PyPI
face-alignmentDetects 2D and 3D facial landmarks from images…
permissive · top 15,000 on PyPI
albumentationsAlbumentations applies image transformations to…
permissive · top 5,000 on PyPI
connected-components-3dLabels connected components in 2D and 3D images…
copyleft · top 15,000 on PyPI
lightlyLightly provides self-supervised learning…
permissive · top 15,000 on PyPI
roifileRead, write, create, and plot ImageJ ROI format…
permissive · top 15,000 on PyPI