Skip to main content

Quantitative 3D analysis of volume electron microscopy data with ML and classical image processing

Project description

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.

Project 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.1.1.tar.gz (77.1 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.1.1-py3-none-any.whl (91.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphero_vem-0.1.1.tar.gz
  • Upload date:
  • Size: 77.1 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.1.1.tar.gz
Algorithm Hash digest
SHA256 d477e73087546884accc7bde15495f5ab573b1fc6507d0b63a228af4c1618cf6
MD5 82da9a9d836bdba63981e3afa24c1315
BLAKE2b-256 7684085338bcd598d390dd1762213e03b5f5e8bb7432239b11e403a1656369b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphero_vem-0.1.1.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.1.1-py3-none-any.whl.

File metadata

  • Download URL: sphero_vem-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 91.9 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd108ef8a33acea073e16e1b203a0b918a97315aa91f8091dcce628aa28fb8a8
MD5 124196bb25308dd6f40bd47c8f666fb5
BLAKE2b-256 32d80123ae98f00239d167d5b05ef7fe2538332ca29fa57b28d91b26cfb33f6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphero_vem-0.1.1-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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page