Registry / ai-ml / cellpose

cellpose

JSON →
library4.2.1.1pypypiunverified

Cellpose is a deep learning-based anatomical segmentation algorithm for cells and nuclei, developed by Carsen Stringer and Marius Pachitariu. The current version is 4.1.1 (as of early 2025). Release cadence is active with several minor versions per year.

pip install cellpose
INSTALL
IMPORT
SIG · CELLPOSE
C
cellpose
ai-mlpythonv4.2.1.1
Install
74.8s avg
Import
—
Disk
5325MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v4.2.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 84s
py 3.11
✕ build_error
✓ 78.3s
py 3.12
✕ build_error
✓ 69.2s
py 3.13
✕ build_error
✓ 67.7s
py 3.9
✕ build_error
✕ timeout
5325MB installed
● package 5325MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CellposeModel
✓ from cellpose import models
✗ from cellpose.models import CellposeModel

Loads a pretrained cyto model and segments a random image.

import numpy as np from cellpose.models import CellposeModel model = CellposeModel(gpu=True, model_type='cyto') img = np.random.rand(256, 256).astype(np.float32) mask, flow, style = model.eval(img, channels=[0,0], diameter=30.0) print(mask.shape)
cellpose --version
Debug
Known issues
breakingCellpose v4 drops the `Cellpose` class and `SizeModel`. Users must use `CellposeModel` for all segmentation.
fix
Replace `from cellpose.models import Cellpose` with `from cellpose.models import CellposeModel`.
affects: >=4.0.0
breakingCellpose v4 does not include the denoise module (`cellpose.denoise`).
fix
For denoising, use Cellpose 3.x or alternative methods.
affects: >=4.0.0
deprecated`channels` parameter now expects a list of two integers (channel index, second channel). Passing `None` or single int is deprecated.
fix
Use `channels=[0,0]` for single-channel grayscale images.
affects: >=4.0.0
gotchaMPS (Apple Silicon) backend may produce incorrect results with certain operations (e.g., bfloat16).
fix
Set `torch.backends.mps.is_available()` carefully and consider using CPU or CUDA if artifacts appear.
affects: all
gotchaCellpose models trained in v3.x are not fully compatible with v4.x without retraining.
fix
Retrain your model using the `CellposeModel` API in v4, or stick to v3 for existing models.
affects: >=4.0.0
Upgrade
Version history
4.2.1.1latest on PyPI · released Jun 14, 2026
Audit
Dependencies
torchrequiredDeep learning backend
numpyrequiredArray operations
numbarequiredPerformance for dynamics
PillowrequiredImage handling
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
cellpose — pip install cellpose · libregistry