{"name":"napari-bootstrapper","display_name":"Bootstrapper","visibility":"public","icon":"","categories":["Annotation","Segmentation","Dataset"],"schema_version":"0.2.1","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-bootstrapper.make_cremi_sample_data","title":"cremi_c","python_name":"napari_bootstrapper:make_cremi_sample_data","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-bootstrapper.make_fluo_c2dl_huh7_sample_data","title":"fluo_c2dl_huh7","python_name":"napari_bootstrapper:make_fluo_c2dl_huh7_sample_data","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-bootstrapper.proofreading","title":"Create Proofreading","python_name":"napari_bootstrapper.post._merge_split_widget:ProofreadingWidget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-bootstrapper.Widget","title":"Bootstrapper","python_name":"napari_bootstrapper.widget:Widget","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-bootstrapper.Widget","display_name":"Bootstrapper","autogenerate":false},{"command":"napari-bootstrapper.proofreading","display_name":"Proofreading","autogenerate":false}],"sample_data":[{"command":"napari-bootstrapper.make_cremi_sample_data","key":"napari-bootstrapper-cremi","display_name":"cremi_c"},{"command":"napari-bootstrapper.make_fluo_c2dl_huh7_sample_data","key":"napari-bootstrapper-fluo_c2dl_huh7","display_name":"fluo_c2dl_huh7"}],"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.4","name":"napari-bootstrapper","version":"0.3.0","dynamic":["license-file"],"platform":null,"supported_platform":null,"summary":"A plugin to quickly generate dense ground truth with sparse labels","description":"# napari-bootstrapper\n\n[![License BSD-3](https://img.shields.io/pypi/l/napari-bootstrapper.svg?color=green)](https://github.com/ucsdmanorlab/napari-bootstrapper/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-bootstrapper.svg?color=green)](https://pypi.org/project/napari-bootstrapper)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-bootstrapper.svg?color=green)](https://python.org)\n[![tests](https://github.com/ucsdmanorlab/napari-bootstrapper/workflows/tests/badge.svg)](https://github.com/ucsdmanorlab/napari-bootstrapper/actions)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-bootstrapper)](https://napari-hub.org/plugins/napari-bootstrapper)\n\nA napari plugin to quickly generate dense 3D segmentations from sparse 2D labels.\n\nSparse 2D annotations made in ~10 minutes on a single section can produce dense 3D segmentations that are good starting points for refinement. Based on the 2D→3D method described in [_Sparse Annotation is Sufficient for Bootstrapping Dense Segmentation_](https://www.biorxiv.org/content/10.1101/2024.06.14.599135v2).\n\n> For larger volumes, dedicated 3D models, and block-wise processing, see the [Bootstrapper CLI](https://github.com/ucsdmanorlab/bootstrapper).\n\n![cremi30](https://github.com/user-attachments/assets/db0e9ef7-0826-4184-9f00-8203e7bf48ec)\n\n| Dataset | Data Type | Video |\n|---------|-----------|-------|\n| CREMI C | 3D volumetric stack | [![CREMI C](https://img.youtube.com/vi/n0KkhZ-oBTs/0.jpg)](https://www.youtube.com/watch?v=n0KkhZ-oBTs) |\n| Fluo-C2DL-Huh7 | 2D + time series | [![Fluo-C2DL-Huh7](https://img.youtube.com/vi/vThjwJR_RNg/0.jpg)](https://www.youtube.com/watch?v=vThjwJR_RNg) |\n\n---\n\n## Getting Started\n\n### Install\n\n```bash\nconda create -n napari-bootstrapper -c conda-forge python==3.11 napari pyqt\nconda activate napari-bootstrapper\npip install napari-bootstrapper\n```\n\nOr install the latest development version:\n\n```bash\npip install git+https://github.com/ucsdmanorlab/napari-bootstrapper.git\n```\n\n### Launch\n\n```bash\nconda activate napari-bootstrapper\nnapari\n```\n\nOpen the Bootstrapper widget from **Plugins → napari-bootstrapper**.\n\n---\n\n## How It Works\n\nThe plugin has four sections that follow a simple workflow:\n\n### 1. Data\nLoad a 3D image (or 4D with a channels dimension) and create **sparse 2D labels** on one or a few slices. Click **\"Make mask\"** to generate a binary training mask.\n\nWe recommend using a foundation model to make sparse 2D labels, like [micro-sam](https://github.com/computational-cell-analytics/micro-sam). \n\n### 2. Train a 2D Model\nTrain a 2D model on your sparse labels. Three task types are available:\n- `2d_affs` — affinities\n- `2d_lsd` — local shape descriptors\n- `2d_mtlsd` — multi-task (both)\n\nOr load a pretrained checkpoint.\n\n### 3. Load a 3D Model\nThe 3D model lifts 2D predictions into 3D affinities. Pretrained weights are recommended — just click **\"Download\"**.\n\n### 4. Segment\nClick **\"Start\"** to run the full 2D→3D inference pipeline. The output is an instance segmentation produced via mutex watershed or connected components.\n\n### Proofreading\n\nWe provide a separate widget for refining segmentations quickly. Select labels by placing points on them or entering label IDs manually. Operations can be applied per-slice (2D) or on the full volume (3D).\n\n- **Morphology** — Dilate, erode, open, close, fill holes. Stenciled (3×3×3) or spherical (variable radius). Uses [fastmorph](https://github.com/seung-lab/fastmorph).\n- **Merge / Split** — Merge labels, split with watershed markers, or delete. Uses [fastremap](https://github.com/seung-lab/fastremap).\n- **Filter** — Remove by size (min/max voxels), keep K largest, remove outliers by sigma, filter by Z-slice count, relabel connected components. Uses [cc3d](https://github.com/seung-lab/connected-components-3d).\n\n---\n\n## Citation\n\nIf you find this useful, please cite our [preprint](https://www.biorxiv.org/content/10.1101/2024.06.14.599135v2):\n\n```bibtex\n@article {Thiyagarajan2024.06.14.599135,\n\tauthor = {Thiyagarajan, Vijay Venu and Sheridan, Arlo and Harris, Kristen M. and Manor, Uri},\n\ttitle = {Sparse Annotation is Sufficient for Bootstrapping Dense Segmentation},\n\tyear = {2024},\n\tdoi = {10.1101/2024.06.14.599135},\n\tURL = {https://www.biorxiv.org/content/10.1101/2024.06.14.599135v2},\n}\n```\n\n## Issues\n\nIf you encounter any problems, please [file an issue](https://github.com/ucsdmanorlab/napari-bootstrapper/issues) along with a detailed description.\n\n## Acknowledgements\n\n- [micro-sam](https://github.com/computational-cell-analytics/micro-sam) — Making foundation models like SAM accessible to the community.\n- [empanada-napari](https://github.com/volume-em/empanada-napari) — Proofreading widget inspiration.\n- [napari-cellulus](https://github.com/funkelab/napari-cellulus) — Development scaffolding.\n\n## Funding\n\nChan-Zuckerberg Imaging Scientist Award DOI https://doi.org/10.37921/694870itnyzk from the Chan Zuckerberg Initiative DAF, an advised fund of Silicon Valley Community Foundation (funder DOI 10.13039/100014989).\n\nNSF NeuroNex Technology Hub Award (1707356), NSF NeuroNex2 Award (2014862)\n\n![image](https://github.com/ucsdmanorlab/bootstrapper/assets/64760651/4b4a6029-e1ba-42bb-ab8b-d9357cc46239)\n\n[pip]: https://pypi.org/project/pip/\n[PyPI]: https://pypi.org/\n","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":"Vijay Venu Thiyagarajan","author_email":"vvenu@utexas.edu","maintainer":null,"maintainer_email":null,"license":"Copyright (c) 2025, Vijay Venu Thiyagarajan\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of copyright holder nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","classifier":["Development Status :: 2 - Pre-Alpha","Framework :: napari","Intended Audience :: Science/Research","License :: OSI Approved :: BSD License","Operating System :: OS Independent","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13","Topic :: Scientific/Engineering :: Image Processing"],"requires_dist":["numpy","scipy","scikit-image","torch","zarr<3","numba","gunpowder","magicgui","qtpy","pyqtgraph","matplotlib","napari","tqdm","lsds","mwatershed","fastmorph[spherical]","connected-components-3d","fastremap","tox; extra == \"testing\"","pytest; extra == \"testing\"","pytest-cov; extra == \"testing\"","pytest-qt; extra == \"testing\"","napari; extra == \"testing\"","pyqt5; extra == \"testing\""],"requires_python":">=3.11","requires_external":null,"project_url":null,"provides_extra":["testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}