skillfed

cellpose

anatomical segmentation algorithm

cellpose v4.2.1.1 115.7K downloads/30d#12,241 on PyPI2,310
Permissive license BSD Active released

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 cellpose

uv

uv add cellpose

poetry

poetry add cellpose

Installing 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

License :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

cell segmentation microscopynucleus detection deep learningimage segmentation biological3D cell segmentationmicroscopy image analysisautomated cell detectioncustom model training segmentation
microscopy-image-analysiscell-segmentationdeep-learning

More Artificial Intelligence packages