Skip to main content

sphero-vem

PyPI Python CI codecov Ruff DOI

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.

Metadata

Release files for sphero-vem 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphero-vem 0.3.0
File Size Uploaded Provenance
sphero_vem-0.3.0.tar.gz 78.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sphero-vem 0.3.0
File Interpreter ABI Platform
sphero_vem-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 171.8 kB

Release files / sphero_vem-0.3.0.tar.gz

Download URL sphero_vem-0.3.0.tar.gz
Size 78.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b358cf8de3685a51f1366721c4121cf4ec3d4707144a91ab909bdc499379efcd
BLAKE2b-256 checksum
How to use checksums
2fcc9eccb5cf536117bf3184b326733175037c6cc04d11648b20bc062bd8fb0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / sphero_vem-0.3.0-py3-none-any.whl

Download URL sphero_vem-0.3.0-py3-none-any.whl
Size 93.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d921b1cf1e817794d87ad628a955efa485f0c5a9e8fac717e84f83349a87cb0
BLAKE2b-256 checksum
How to use checksums
3669e5cb638c00c01f5c3111e881e03fff787ce994680c0872c3182d9d5c4b5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for sphero-vem 0.3.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sphero_vem-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

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.

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