napari-bootstrapper
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 Sparse Annotation is Sufficient for Bootstrapping Dense Segmentation.
The full video is on the project page.
Install
conda create -n bootstrapper python=3.12 -y
conda activate bootstrapper
pip install napari-bootstrapper pyqt5
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
- Data: choose the image and the labels, then click Make mask. Draw labels with the napari brush or with micro-sam.
- 2D model: choose a task and click Train. The tasks predict affinities (
2d_affs), local shape descriptors (2d_lsd), or both (2d_mtlsd). - 3D model: click Download to get the pretrained model for that task.
- 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 = {Sparse Annotation is Sufficient for Bootstrapping Dense Segmentation},
year = {2024},
doi = {10.1101/2024.06.14.599135},
URL = {https://www.biorxiv.org/content/10.1101/2024.06.14.599135v2},
}
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).
Metadata
Release files for napari-bootstrapper 1.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 | Actions |
|---|---|---|---|---|
| napari_bootstrapper-1.0.1.tar.gz | 11.6 MB | Without provenance | Details for napari_bootstrapper-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| napari_bootstrapper-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for napari_bootstrapper-1.0.1-py3-none-any.whl |
Total release size: 23.1 MB
Release files / napari_bootstrapper-1.0.1.tar.gz
| Download URL | napari_bootstrapper-1.0.1.tar.gz |
|---|---|
| Size | 11.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72698a4504bb388052627cf138fba79decd94aae734bbcb9d9b411e91b44dc42
|
|
BLAKE2b-256 checksum How to use checksums |
aef6a49ef8108c3ac6a76c7fdd0e30343a4029459cdfdfd980b1b38bfa951028
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / napari_bootstrapper-1.0.1-py3-none-any.whl
| Download URL | napari_bootstrapper-1.0.1-py3-none-any.whl |
|---|---|
| Size | 11.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb9adb2618210931a75bb1f3d7fdb4c9c95a440ebbba8795b3e8a103687358d4
|
|
BLAKE2b-256 checksum How to use checksums |
23799b67022fb0672c6fbdc0ac9ab28dd0c7b8325966fd2a6b5f493524f0c548
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for napari-bootstrapper 1.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.
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.