Skip to main content

sphero-vem

PyPI Python CI codecov Ruff

Python library for quantitative analysis of volumetric electron microscopy (vEM) data.

sphero-vem was developed for the end-to-end analysis pipeline described in:

Bottone et al., 3D Reconstruction of Nanoparticle Distribution in Tumor Spheroids with Volume Electron Microscopy, Preprint: https://doi.org/10.64898/2026.04.17.719153

While the library was originally developed for SBF-SEM data of nanoparticle-loaded tumor spheroids, the individual components are designed to be reusable for other vEM datasets and workflows.

Capabilities

  • Denoising: self-supervised Noise2Void via CAREamics on large zarr volumes
  • Registration: intensity-based pairwise slice alignment with multi-resolution PyTorch optimization
  • Segmentation: fine-tuning and inference with Cellpose-SAM for cells and nuclei; empirical Bayes approach for nanoparticles
  • Shape analysis: 3D morphological descriptors via signed distance functions and mesh-based curvature (mean curvature, curvedness, shape index, fractal dimension)
  • Spatial analysis: nanoparticle-to-nucleus distance quantification per cell
  • Data management: zarr-native I/O with OME-NGFF multiscale support and processing metadata tracking

Installation

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]"

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.

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)

Documentation

Full documentation is available on the official website.

Requirements

Dataset and model weights

The annotated SBF-SEM dataset used to develop this pipeline is available at BioImage Archive (https://doi.org/10.6019/S-BIAD3263). Fine-tuned Cellpose-SAM model weights are available on Zenodo (https://doi.org/10.5281/zenodo.19616546).

Citation

If you use this library, please cite the accompanying paper:

@article {Bottone2026,
	author = {Bottone, Davide and Gerken, Lukas RH and Habermann, Sebastian and Mateos, Jose Maria and Lucas, Miriam S and Riemann, Johannes and Fachet, Melanie and Resch-Genger, Ute and Kissling, Vera M and Roesslein, Matthias and Gogos, Alexander and Herrmann, Inge K},
	title = {3D Reconstruction of Nanoparticle Distribution in Tumor Spheroids with Volume Electron Microscopy},
	year = {2026},
	doi = {10.64898/2026.04.17.719153},
	eprint = {https://www.biorxiv.org/content/early/2026/04/21/2026.04.17.719153},
}

License

See LICENSE for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphero_vem-0.2.0.tar.gz (78.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphero_vem-0.2.0-py3-none-any.whl (93.4 kB view details)

Uploaded Python 3

File details

Details for the file sphero_vem-0.2.0.tar.gz.

File metadata

  • Download URL: sphero_vem-0.2.0.tar.gz
  • Upload date:
  • Size: 78.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for sphero_vem-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c042ddc7dd5a92678b6f1d7d1253ad4abfef355dc093d2e1d5e1fe985d977d99
MD5 7dd2156ac2cbb15b9a408ccf40b106ba
BLAKE2b-256 cf03114b6e0fdb46a1f2cd69564ea056c59b5042e7a277b53a4b3b2a93f4fe18

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphero_vem-0.2.0.tar.gz:

Publisher: release.yml on dv-bt/sphero-vem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sphero_vem-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sphero_vem-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 93.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for sphero_vem-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79143c135379d8c9329162d11068d396872643c41a69d35b93dd23bea881c153
MD5 4aab601fa7bcaada0f80d77ee3ee8029
BLAKE2b-256 9f0b245da1aa47704e99df0eefe4f5543ce832740e41174294faf374fcc8acce

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphero_vem-0.2.0-py3-none-any.whl:

Publisher: release.yml on dv-bt/sphero-vem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.1

2 files

0.1.0

2 files

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