The repository or configuration that created this release differ from a previous release. View details.
napari-cellposesam 
A napari plugin for cell segmentation with cellpose, including Cellpose-SAM (cellpose 4).
This is a fork of MouseLand/cellpose-napari, the original plugin by Carsen Stringer. It adds:
- support for Cellpose-SAM (
cpsam) and Cellpose3 models in the same environment and UI - 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, the Cellpose3 paper if you use the Cellpose3 models, and the Cellpose-SAM paper if you use the cpsam models (see the cellpose repo for the references):
@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}
}
Installation
Installer
The installer sets up napari and napari-cellposesam with the PyTorch build for your computer, and adds a desktop shortcut that opens napari with the plugin. You do not need Python or conda.
-
Windows: download
napari-cellposesam-setup.exefrom the newest release and run it. -
macOS and Linux: open a terminal and run:
curl -LsSf https://raw.githubusercontent.com/DBI-INFRA/napari-cellposesam/main/installer/install.sh | sh
The installer offers to download the Cellpose-SAM model (about 1.2 GB) while it installs. The model goes to ~/.cellpose/models, where any cellpose install finds it, so uninstalling keeps it.
installer/README.md has the other ways to install, and how to update and uninstall.
pip
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/DBI-INFRA/napari-cellposesam
If you have issues installing cellpose, see the cellpose installation docs.
Cellpose3 models
The plugin installs cellpose 4, which provides the Cellpose-SAM and CPDINO models. The Cellpose3 models (cyto3, nuclei, etc.) are in the same model list. They need cellpose 3, which the plugin offers to download the first time you run one. It downloads cellpose 3.1.1.3 into a private folder without touching the installed cellpose, and installs numba if it is missing. The plugin then picks the right cellpose version for each model, including custom models.
The private copy is in ~/.cellpose/napari-cellposesam/cellpose-3.1.1.3-format1/_cellpose3 (~ is your user folder, also on Windows). To keep it elsewhere, set the environment variable NAPARI_CELLPOSESAM_CACHE to a folder that then takes the place of ~/.cellpose/napari-cellposesam. To reset it, delete ~/.cellpose/napari-cellposesam (or the folder NAPARI_CELLPOSESAM_CACHE names): the plugin offers to download cellpose 3 again the next time you run a Cellpose3 model.
To run the same download ahead of time, so that napari never prompts:
python -m napari_cellposesam fetch-cellpose3
The download goes to the home folder of whoever runs the command. For an environment shared by several users, set NAPARI_CELLPOSESAM_CACHE to a shared folder, both when running the command and for everyone who uses the environment. Users only need read access to it.
Both need internet access and pip in the environment. If the environment has no pip, as in some uv-created ones, the plugin asks you to install it first.
Don't install cellpose-napari next to this plugin. It lists the Cellpose3
models, but with cellpose 4 installed it ignores the selected model and runs
Cellpose-SAM, thus breaking it.
GPU
cellpose runs on CPU, NVIDIA GPUs (CUDA) and Apple silicon (MPS). The plugin uses a GPU automatically if torch can see one, for both the cellpose 4 and the Cellpose3 models.
-
Apple silicon: nothing to do, the torch from PyPI supports MPS.
-
NVIDIA on Linux: the torch from PyPI is a CUDA build, so it usually works as installed.
-
NVIDIA on Windows: the torch from PyPI is CPU-only. In a fresh environment, install torch and torchvision from the PyTorch index first, with the CUDA version the PyTorch selector gives for your driver, then napari and the plugin, e.g.:
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126 pip install "napari[all]" napari-cellposesamIf the plugin is already installed, reinstall torch and torchvision together instead:
pip install --force-reinstall --no-deps torch torchvision --index-url https://download.pytorch.org/whl/cu126
Check that torch sees the GPU:
python -c "import torch; print('cuda', torch.cuda.is_available(), 'mps', torch.backends.mps.is_available())"
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
If you installed a CUDA build of torch, upgrade torch the same way you installed it, or pip may replace it with the CPU-only build.
Coming from 0.1.x with a separate cellpose 3 environment (cellpose<4): from 0.2.0 that environment is no longer needed, since one environment runs both the Cellpose3 and the cellpose 4 models. Upgrading it with the command above moves it to cellpose 4, and the plugin downloads cellpose 3 the first time you run a Cellpose3 model.
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.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Change of provenance
The repository or configuration that created these release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| napari_cellposesam-0.3.0.tar.gz | 431.4 kB | With provenance | Details for napari_cellposesam-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| napari_cellposesam-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for napari_cellposesam-0.3.0-py3-none-any.whl |
Total release size: 456.2 kB
Release files / napari_cellposesam-0.3.0.tar.gz
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | napari_cellposesam-0.3.0.tar.gz |
|---|---|
| Size | 431.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a88b89b1a4ece2b1cbcede4e1439f37ccd25bb94ad988bac6752598fd086fe27
|
|
BLAKE2b-256 checksum How to use checksums |
02942696ae3521bb85a8d435cc38ef57ad9e0653838aa46af5c6cb5a63983c63
|
| 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 30, 2026.
Transparency logRelease files / napari_cellposesam-0.3.0-py3-none-any.whl
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | napari_cellposesam-0.3.0-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4421e6f2a12c45cedd6a5fa64dd599256bfc9cbe0b590bfa44e667c8babc5ed9
|
|
BLAKE2b-256 checksum How to use checksums |
0a3194e46c858303af801f6ce89a2c204fccad63f093a7a4e29fabbf758cbe29
|
| 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 30, 2026.
Transparency logSecurity for napari-cellposesam 0.3.0
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.
Change of provenance
The repository and configuration that created this release differ from a previous release.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Repository
- Removed 0.2.3 github.com/jeskowagner/napari-cellposesam
- Added 0.3.0 github.com/DBI-INFRA/napari-cellposesam
Attestation for napari_cellposesam-0.3.0.tar.gz
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 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.