Skip to main content

napari-cellposesam cellpose

Documentation Status tests PyPI version Python version License website

A napari plugin for cell segmentation with cellpose, including Cellpose-SAM (cellpose v4).

This is a fork of MouseLand/cellpose-napari, the original plugin by Carsen Stringer. It adds:

  • support for cellpose v4 and the Cellpose-SAM (cpsam) models, while still working with cellpose v3
  • z/channel axis selection for 3D and 4D images
  • compatibility with new napari versions

The cellpose code was written by Carsen Stringer and Marius Pachitariu. To learn about Cellpose, read the paper or watch this talk.

For problems with this plugin, open an issue. For problems with cellpose itself, open an issue on the cellpose repo.

If you use this plugin, please cite the cellpose paper, and the Cellpose-SAM paper if you use the cpsam models (see the cellpose repo for the reference):

@article{stringer2021cellpose,
  title={Cellpose: a generalist algorithm for cellular segmentation},
  author={Stringer, Carsen and Wang, Tim and Michaelos, Michalis and Pachitariu, Marius},
  journal={Nature Methods},
  volume={18},
  number={1},
  pages={100--106},
  year={2021},
  publisher={Nature Publishing Group}
}

napari-cellposesam segmenting the 2D sample image

Installation

Requires Python 3.11 or newer. We recommend a fresh environment, e.g. with conda:

conda create -n napari-cellposesam python=3.12
conda activate napari-cellposesam

Install napari and the plugin with pip:

pip install "napari[all]" napari-cellposesam

Or install the plugin from the napari plugin manager (Plugins > Install/Uninstall Plugins).

To install the latest development version from GitHub:

pip install git+https://github.com/jeskowagner/napari-cellposesam

If you have issues installing cellpose, see the cellpose installation docs.

GPU

cellpose runs on CPU, NVIDIA GPUs (CUDA) and Apple silicon (MPS). For CUDA, install a CUDA build of torch following the PyTorch instructions before or after installing the plugin. The plugin uses the GPU automatically if torch can see one.

Optional: CPDINO models

The CPDINO models need DINOv3, which is not on PyPI and so is not installed automatically. The plugin offers to install it when you run segmentation with a CPDINO model, or install it yourself:

pip install git+https://github.com/facebookresearch/dinov3

Without it, cellpose logs a Could not import CPDINO warning on startup. This is harmless if you don't use those models.

Upgrading

pip install --upgrade napari-cellposesam cellpose

Usage

Open napari with the plugin docked:

napari -w napari-cellposesam

Sample data is available under File > Open Sample > napari-cellposesam.

Detailed usage is described in the documentation.

Contributing

Contributions are welcome. For development, clone the repo and install it in editable mode with the test dependencies:

pip install -e ".[testing]"
pytest

License

Distributed under the terms of the BSD-3 license, "napari-cellposesam" is free and open source software.

Dependencies

napari-cellposesam relies on:

Metadata

Release files for napari-cellposesam 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for napari-cellposesam 0.1.1
File Size Uploaded
napari_cellposesam-0.1.1.tar.gz 329.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for napari-cellposesam 0.1.1
File Interpreter ABI Platform
napari_cellposesam-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 342.5 kB

Release files / napari_cellposesam-0.1.1.tar.gz

Download URL napari_cellposesam-0.1.1.tar.gz
Size 329.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e4e1842454d4589732146918d3b68e3e89d7ddf8957b18005584fb28ea4aa324
BLAKE2b-256 checksum
How to use checksums
61cd52343537a9e42373c0e40fdb86a66c1eb20b60e6841b5f1d3ed8c7bb89cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / napari_cellposesam-0.1.1-py3-none-any.whl

Download URL napari_cellposesam-0.1.1-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f1d5c3ec59c763a1f897a53686d749595d087e6f9c0d774a34240db81dc584c
BLAKE2b-256 checksum
How to use checksums
5539593e00a8ec7dcbc872d6bfadf321fd4d9627527483135a73806cace04eb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page