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 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):
- Install napari if you don't have it yet. The napari bundle is the easiest option.
- In napari, open Plugins ▸ Install/Uninstall Plugins….
- 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
- Open the panel: Plugins ▸ ETSAM Membrane Segmentation (napari-etsam).
- Open a tomogram: drag and drop an
.mrcfile onto napari, or click Open… in the panel. The new layer is selected as the Tomogram automatically. - Optionally, tick Clean up mask or Closely spaced membranes (see Options).
- 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.
Progress is reported per slice for each stage, with an estimate of the time remaining.
- When finished, a
<tomogram> membraneslabel layer is added on top of the tomogram, and the panel shows the run time and the fraction of voxels classified as membrane. - 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). - Save: click Save mask… (the mask at the current threshold, including manual edits) or Save logits… (raw membrane scores). Files are written as
.mrcwith the tomogram's voxel size, so they overlay directly in ChimeraX, IMOD or other tools. File ▸ Save Selected Layers… with a.mrcfile name works too.
Options
The main options are in the panel. The rest are under Advanced settings.
| 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.
| 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). |
| ETSAM … is older than this plugin | The plugin needs an ETSAM at least as new as itself. Click Update ETSAM: it installs the latest ETSAM release again (about 3 GB download, 10–15 minutes). An ETSAM you installed from source must be updated the same way (git pull, then pip install --no-deps -e .). |
| 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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| napari_etsam-2.0.1.tar.gz | 34.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| napari_etsam-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 66.8 kB
Release files / napari_etsam-2.0.1.tar.gz
| Download URL | napari_etsam-2.0.1.tar.gz |
|---|---|
| Size | 34.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc65ea5465659e458f1cfaf6a30c03a27aa6fae10ac6573bd97ab96a6cbf786f
|
|
BLAKE2b-256 checksum How to use checksums |
9820ea5a3bf5aa0db5d3e921f659d4245a2bec40d417f0fcdcbd9564c873080d
|
| 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 23, 2026.
Transparency logRelease files / napari_etsam-2.0.1-py3-none-any.whl
| Download URL | napari_etsam-2.0.1-py3-none-any.whl |
|---|---|
| Size | 32.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2017cd10b51ff87cdfde781d2409dcb4f76146af7aa1d8967ba29b88b0fbdbac
|
|
BLAKE2b-256 checksum How to use checksums |
d121704d7a6c7b29e54df7a68dcc204795c173de9128cea3d5c20832c0d973ca
|
| 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 23, 2026.
Transparency logSecurity for napari-etsam 2.0.1
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.
Attestation for napari_etsam-2.0.1.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 23, 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.