Installation
Requirements
- Linux with an NVIDIA GPU for training and prediction. The tests ran on one NVIDIA GeForce RTX 4090 with 24 GB of memory.
- An NVIDIA driver for CUDA 13.0, such as driver 580. The locked PyTorch 2.13.0 includes its own CUDA libraries, so you do not need the CUDA toolkit.
- uv, which also installs Python 3.12 or newer.
- A C/C++ compiler, such as gcc from
sudo apt install build-essentialon Ubuntu. Some dependencies build from source. - About 6 GB of disk for the environment.
Install
Clone Bootstrapper from GitHub, and install the locked versions of its dependencies:
git clone --branch v1.0.0 https://github.com/ucsdmanorlab/bootstrapper.git
cd bootstrapper
uv sync --locked
source .venv/bin/activate
Check the install:
$ bs --version
bs, version 1.0.0
Activate the environment again in each new shell.
As an alternative, put uv run --project <bootstrapper folder> before each command, where <bootstrapper folder> is the path of your clone.
Install Bootstrapper from GitHub only.
The package named bootstrapper on PyPI is a different project.
Extras
The main commands need no extra.
uv sync installs only the extras that you name, so name every extra that you want to keep.
The waterz extra adds watershed segmentation (method = "ws") and bs utils merge.
It builds funlib.segment against the Boost headers.
Install Boost first, then the extra:
sudo apt install libboost-dev
uv sync --locked --extra waterz
On macOS, run brew install boost and export CPATH=$(brew --prefix)/include before uv sync.
The sam extra adds the dependencies of the interactive SAM tool (ng_interactive_sam.py in the Bootstrapper folder).
uv sync --locked --extra sam --extra waterz
python -i ng_interactive_sam.py <zarr image array>
Leave out --extra waterz if you do not use it.
The first start of the SAM tool downloads 1.25 GB of model weights into ~/.cache/active_learning.
Add --anon to read a public S3 bucket without AWS credentials.
Next
In the CREMI A tutorial, you run a first segmentation. Your data shows how to give Bootstrapper your own image and labels.