Skip to main content
Bootstrapper

napari-bootstrapper

License BSD-3 PyPI Python Version tests napari hub

Dense 3D segmentation from sparse 2D labels, in napari. You label a few objects on a few sections and train a 2D model on them, and a pretrained 3D model turns its predictions into a 3D segmentation. The method is from A general method for bootstrapping dense 3D segmentations from sparse 2D annotations.

napari-bootstrapper on CREMI C: labels on one section, a 2D model, the pretrained 3D model, proofreading, and the 3D segmentation

Install

conda create -n bootstrapper python=3.12 -y
conda activate bootstrapper
pip install napari-bootstrapper pyqt6

Run

napari -w napari-bootstrapper Bootstrapper

To try it on example data, open File > Open Sample and pick cremi_c (EM) or fluo_c2dl_huh7 (2D + time). Video walkthroughs of both are on YouTube: CREMI C and Fluo-C2DL-Huh7.

Use

  1. Data: choose the image and the labels, then click Make mask. Draw labels with the napari brush or with micro-sam.
  2. 2D model: choose a task and click Train. The tasks predict affinities (2d_affs), local shape descriptors (2d_lsd), or both (2d_mtlsd).
  3. 3D model: click Download to get the pretrained model for that task.
  4. Segmentation: click Start.

Each Advanced Config button opens the settings for its step. Models and checkpoints are saved in ~/.napari_bootstrapper.

To fix the result, open the Proofreading widget (napari -w napari-bootstrapper Proofreading). It can merge, split, delete, dilate, erode, open, close and fill holes, on one section or in 3D, and it can filter objects by size. Undo reverts the last edit.

For large volumes, 3D models and block-wise processing, use the Bootstrapper CLI.

Develop

pip install -e ".[testing]"
QT_QPA_PLATFORM=offscreen pytest -m "not network"

Leave out -m "not network" to also download and test the published checkpoints. Report bugs on the issue tracker.

Cite

@article {Thiyagarajan2024.06.14.599135,
	author = {Thiyagarajan, Vijay Venu and Sheridan, Arlo and Harris, Kristen M. and Manor, Uri},
	title = {A general method for bootstrapping dense 3D segmentations from sparse 2D annotations},
	year = {2026},
	doi = {10.1101/2024.06.14.599135},
	URL = {https://www.biorxiv.org/content/10.1101/2024.06.14.599135v4},
}

Acknowledgements

The plugin structure comes from napari-cellulus, and the Proofreading widget is modeled on empanada-napari. The edits use fastmorph, fastremap and cc3d.

Funded by the Chan Zuckerberg Initiative Imaging Scientist Award (10.37921/694870itnyzk) from the Chan Zuckerberg Initiative DAF, an advised fund of Silicon Valley Community Foundation (funder DOI 10.13039/100014989), and by the NSF NeuroNex Technology Hub Award (1707356) and NeuroNex2 Award (2014862).

image

Metadata

Release files for napari-bootstrapper 1.0.2

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-bootstrapper 1.0.2
File Size Uploaded Provenance Actions
napari_bootstrapper-1.0.2.tar.gz 11.6 MB Without provenance Details for napari_bootstrapper-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for napari-bootstrapper 1.0.2
File Interpreter ABI Platform Actions
napari_bootstrapper-1.0.2-py3-none-any.whl Python 3 none any Details for napari_bootstrapper-1.0.2-py3-none-any.whl

Total release size: 23.2 MB

Release files / napari_bootstrapper-1.0.2.tar.gz

Download URL napari_bootstrapper-1.0.2.tar.gz
Size 11.6 MB
Tags Source
SHA-256 checksum
How to use checksums
6d1c51063c7decccac3fb240cd652666c5f95d353e672ae8a586f8f7f2b6e551
BLAKE2b-256 checksum
How to use checksums
8c7b6bf74208d4b3519f2c3108905e44cd732f2b5b8195ae911a313d697949b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / napari_bootstrapper-1.0.2-py3-none-any.whl

Download URL napari_bootstrapper-1.0.2-py3-none-any.whl
Size 11.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
54b8bdac68f64019eaa05789e9a0772ac357aabb0267a6fc009ae4574837c63b
BLAKE2b-256 checksum
How to use checksums
fccffa4ac8b3ec87d6dde6238a2ca72a01d83e9fe393bf997d7c99d4a26f8666
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for napari-bootstrapper 1.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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