Installation#

Requirements#

PyPI install#

The library is available on PyPI. We recommend installing it in a dedicated virtual environment:

pip install sphero-vem

For full CUDA 12.x GPU acceleration (Linux only; Windows untested):

pip install "sphero-vem[cuda]"

Development install#

Clone the repository and install with Poetry:

git clone https://github.com/dv-bt/sphero-vem.git
cd sphero-vem
poetry install           # base install
poetry install -E cuda   # with CUDA 12.x GPU acceleration (Linux only; Windows untested)

GPU acceleration#

PyTorch-based stages (denoising, registration, Cellpose-based segmentation) support GPU execution via PyTorch’s native device management, including CUDA and MPS (Apple Silicon), with no additional dependencies.

Array operation stages (nanoparticle segmentation, shape analysis, spatial analysis) additionally support CUDA acceleration via CuPy and CuCIM, available with the cuda extra above. Automatic backend switching (NumPy ↔ CuPy, scikit-image ↔ CuCIM) is handled at import time by utils.accelerator.

Dataset and model weights#

The annotated SBF-SEM dataset used to develop and benchmark this pipeline is available at BioImage Archive. Fine-tuned Cellpose-SAM model weights are available on Zenodo.