Skip to main content
ETSAM membrane icon

ETSAM Plugin for napari

The napari-etsam plugin runs ETSAM inside napari, a free image viewer for multi-dimensional data. You open a tomogram, install and activate plugin, click Segment membranes. The membrane mask appears as an new label layer that you can refine, inspect and save.

Note On first start, if ETSAM is missing, click Install ETSAM to set it up in its own environment (or install it beforehand using the ETSAM installer).

ETSAM membrane segmentation overlaid on a tomogram in napari

ETSAM membrane mask (yellow) on EMD-4949 in napari, with the ETSAM panel on the right.

Requirements

Minimum Recommended
GPU NVIDIA GPU with 2 GB VRAM NVIDIA GPU with 4 GB+ VRAM
RAM 4 GB 8 GB
Operating system Linux or Windows, with an NVIDIA GPU

Installation

1. Install the plugin

From napari (recommended):

  1. Install napari if you don't have it yet. The napari bundle is the easiest option.
  2. In napari, open Plugins ▸ Install/Uninstall Plugins….
  3. Search for ETSAM, click Install next to napari-etsam, and restart napari.

With pip, in napari's Python environment:

pip install napari-etsam

Tip To install the plugin from a checkout of the ETSAM repository instead, use the Python of napari's environment:

/path/to/napari/python -m pip install ./ETSAM/external_plugins/napari-etsam

2. First start: click Install ETSAM

ETSAM itself runs in its own environment, separate from napari. When you open the ETSAM panel, the plugin checks whether ETSAM is installed. If it is missing on a supported computer, the panel shows an Install ETSAM button. Click it to start the ETSAM installer. Opening the panel does not start an installation.

Installation downloads about 5 GB and may take 10–15 minutes. Keep napari open until it finishes; the panel shows progress. The installer puts ETSAM into ~/etsam_env (on Windows, %USERPROFILE%\etsam_env). Subsequent use starts immediately.

ETSAM requires Linux or Windows and an NVIDIA GPU. macOS is not supported. Contributions are welcome to extend hardware/software support.

Segmenting a Tomogram

  1. Open the panel: Plugins ▸ ETSAM Membrane Segmentation (napari-etsam).
  2. Open a tomogram: drag and drop an .mrc file onto napari, or click Open… in the panel. The new layer is selected as the Tomogram automatically.
  3. Optionally, tick Clean up mask or Closely spaced membranes (see Options).
  4. Click Segment membranes. The progress bar follows ETSAM through Stage 1 and Stage 2 slice by slice, then through clean-up. Click Cancel to stop at any time.

ETSAM progress in napari

Progress is reported per slice for each stage, with an estimate of the time remaining.

  1. When finished, a <tomogram> membranes label layer is added on top of the tomogram, and the panel shows the run time and the fraction of voxels classified as membrane.
  2. Refine: move the Threshold slider. The mask updates instantly, and clean-up is re-applied in the background if enabled. Lower values find more (and fainter) membrane; higher values give fewer false positives. Reset returns to the default -0.25. You can also correct the mask by hand with napari's label tools (paint, erase, fill).
  3. Save: click Save mask… (the mask at the current threshold, including manual edits) or Save logits… (raw membrane scores). Files are written as .mrc with the tomogram's voxel size, so they overlay directly in ChimeraX, IMOD or other tools. File ▸ Save Selected Layers… with a .mrc file name works too.

Options

The main options are in the panel. The rest are under Advanced settings.

ETSAM advanced settings in napari
Option Command-line equivalent Description
Threshold --logit-threshold Binarization threshold of the Stage 2 logits (default -0.25). Adjustable live after a run.
Closely spaced membranes --split-processing Segments the four Y/X quadrants separately with a denser prompt grid; separates closely apposed membranes. About 4× slower.
Clean up mask --post-process Removes thin noise blobs and cuts short bridges between parallel membranes, with the default post-processing settings. Compare with the raw result, because it can remove small real membranes.
Normalization --normalize-method Try Softplus if membranes are missed with the default.
Stage 1 / Stage 2 prompt --stage1-prompt, --stage2-prompt Prompting strategies; see Advanced Usage.

The plugin and the etsam command produce the same results for the same settings.

Troubleshooting

When something goes wrong, the panel shows a red box with the problem and a suggested fix. Show details displays the full error, and Copy error report copies it with your system information (versions, GPU) for a GitHub issue.

ETSAM error panel in napari
Message What to do
No tomogram selected Open an .mrc file first (drag and drop, File ▸ Open or Open…).
This layer cannot be segmented ETSAM needs a single 3D grayscale volume (Z, Y, X). Select the tomogram layer rather than a 2D image, RGB image or a time series.
Installing ETSAM failed: … requires an NVIDIA GPU The installer supports NVIDIA GPUs only. Install ETSAM yourself as described in Installation.
Installing ETSAM failed: … the folder already exists An earlier installation was interrupted. Delete the etsam folder in your home folder and reopen the panel.
ETSAM is not installed This computer is not supported by the installer. Install ETSAM yourself (see Installation), or set ETSAM_PYTHON.
ETSAM is not installed in the environment … That environment lacks ETSAM. Run step 3 of the conda installation (pip install --no-deps -e . in the ETSAM folder).
Running on CPU (no GPU: this will be slow) although the computer has an NVIDIA GPU Update the NVIDIA driver, and check that PyTorch in the etsam environment can use the GPU (see Verify the Installation).
The GPU is busy Another program keeps ETSAM from using the GPU. Close other programs that use the GPU, or restart napari.
Out of memory Close other programs (especially ones using the GPU) and try again, or bin the tomogram (fewer slices need less RAM).
Could not download the ETSAM model weights Check your internet connection or proxy and retry. Offline machines: copy etsam_stage1_v1.pt and etsam_stage2_v1.pt into the weights folder (see Model Weights).
Empty or incomplete mask Lower the threshold, try Softplus normalization, a grid Stage 1 prompt, or Closely spaced membranes. See Troubleshooting.
ETSAM stopped unexpectedly Report it with Copy error report.

Uninstalling

Remove the plugin with Plugins ▸ Install/Uninstall Plugins ▸ napari-etsam ▸ Uninstall, or pip uninstall napari-etsam. To remove ETSAM completely, refer uninstall section in Installation guide.

Cite:

Selvaraj, J., Cheng, J. ETSAM: effectively segmenting cell membranes in cryo-electron tomograms. Nat Commun (2026). https://doi.org/10.1038/s41467-026-77962-7

Metadata

Release files for napari-etsam 2.0.0

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-etsam 2.0.0
File Size Uploaded Provenance
napari_etsam-2.0.0.tar.gz 32.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for napari-etsam 2.0.0
File Interpreter ABI Platform
napari_etsam-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 62.9 kB

Release files / napari_etsam-2.0.0.tar.gz

Download URL napari_etsam-2.0.0.tar.gz
Size 32.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8bc6a31a335c308b0f91bec31fc4fbbf1e3fb916a1494ac19f9c39c469e4af68
BLAKE2b-256 checksum
How to use checksums
1c31273c834417bfc502385a2c5966d4bf8aef7d52ffa86f0ccb6c6d735b289e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

Release files / napari_etsam-2.0.0-py3-none-any.whl

Download URL napari_etsam-2.0.0-py3-none-any.whl
Size 30.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84120c2c9944e91913b2f4eee0ee069106ad42fb7abbd52e4fdae22b6c1b2c21
BLAKE2b-256 checksum
How to use checksums
c81aa91223d979995f79eec24206c8469f63b53b555209b570f2413efe3c5f40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

Security for napari-etsam 2.0.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for napari_etsam-2.0.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 22, 2026.

Transparency log

A 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.

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