Skip to main content

CUDA-accelerated 3D BioImage Computing

Project description

cubic

cubic is a Python library that accelerates processing and analysis of multidimensional (2D/3D+) bioimages using CUDA. By leveraging GPU-enabled operations where possible, it offers substantial speed ups over purely CPU-based approaches. cubic's device-agnostic API wraps scipy/scikit-image and cupy/cuCIM, allowing users to add GPU acceleration to existing codebases by simply replacing import statements and transferring input arrays to the target device. It also provides custom GPU-accelerated implementations of additional features, including Fourier Ring and Shell Correlation for image resolution, faster Richardson-Lucy deconvolution, average precision (AP) for segmentation quality assessment, and other features.

Getting started

Dependencies

  • Python >=3.10
  • numpy/scipy/scikit-image
  • [optional] CUDA>=11.x, CuPy, cuCIM
  • [optional] Cellpose for segmentation

Installation

Install optional CUDA dependencies if GPU support is needed.

Install from PyPI:

pip install cubic

Or install from source:

git clone https://github.com/alxndrkalinin/cubic.git
cd cubic
pip install .

Optional extras from pyproject.toml enable additional functionality:

# mesh feature extraction
pip install '.[mesh]'
# segmentation via Cellpose
pip install '.[cellpose]'
# developer tools (pre-commit, pytest)
pip install -e '.[dev]'
# install everything
pip install -e '.[all]'

Testing

Run style checks and tests using pre-commit and pytest:

pre-commit run --all-files
pytest

Contributing

Contributions and bug reports are welcome. Install development dependencies and set up pre-commit hooks:

pip install -e '.[dev]'
pre-commit install

Pre-commit will then run style checks automatically. Please open an issue or pull request on GitHub.

Usage

Example Notebooks

Notebook Description
Resolution Estimation (2D) FRC and DCR on STED microscopy data
Resolution Estimation (3D) FSC and DCR on 3D confocal pollen data
Split Comparison (FRC/FSC) Checkerboard vs binomial splitting for single-image FRC/FSC
Deconvolution Iterations (3D) RL deconvolution stopping criteria via PSNR, SSIM, FSC, DCR
3D Monolayer Segmentation 3D nuclei and cell segmentation of hiPSC monolayer
3D Feature Extraction GPU-accelerated regionprops on 3D fluorescence data

Citation

If you use cubic in your research, please cite it:

@inproceedings{kalinin2025cubic,
  title={cubic: CUDA-accelerated 3D BioImage Computing},
  author={Kalinin, Alexandr A and Carpenter, Anne E and Singh, Shantanu and O’Meara, Matthew J},
  booktitle={International Conference on Computer Vision Workshops (ICCVW)},
  year={2025},
  organization={IEEE}
}

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

cubic-0.7.0a9.tar.gz (160.8 kB view details)

Uploaded Source

Built Distribution

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

cubic-0.7.0a9-py3-none-any.whl (191.6 kB view details)

Uploaded Python 3

File details

Details for the file cubic-0.7.0a9.tar.gz.

File metadata

  • Download URL: cubic-0.7.0a9.tar.gz
  • Upload date:
  • Size: 160.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cubic-0.7.0a9.tar.gz
Algorithm Hash digest
SHA256 89ccf8e43213a24e5a75f19f38ac18881a137ad0a95da955fc30ff3619a8c01e
MD5 948d5bad2cba25a0d7e779545fc1c5c1
BLAKE2b-256 ef5cc882169472e3832a101530cdb5a6dc701eaa166f75a61fa943b6903cb21e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubic-0.7.0a9.tar.gz:

Publisher: release.yml on alxndrkalinin/cubic

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

File details

Details for the file cubic-0.7.0a9-py3-none-any.whl.

File metadata

  • Download URL: cubic-0.7.0a9-py3-none-any.whl
  • Upload date:
  • Size: 191.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cubic-0.7.0a9-py3-none-any.whl
Algorithm Hash digest
SHA256 b3799e78e13d47ef5b08c9f14774486581998060f4020b1ebd799c248f51f3ab
MD5 5291d716216ab7304fe19f17914bf0f6
BLAKE2b-256 6a55aeccc5e5a72d8e78878e032a1c33c046a88945d22d9b7841ac20d8d20b89

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubic-0.7.0a9-py3-none-any.whl:

Publisher: release.yml on alxndrkalinin/cubic

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