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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cubic-0.7.0a2.tar.gz.
File metadata
- Download URL: cubic-0.7.0a2.tar.gz
- Upload date:
- Size: 99.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5240ff307d0adb5a52237862365af216046d546aee68676ba81562d656842c76
|
|
| MD5 |
c75c277adbf9ae2d7193ed27d7ed90cf
|
|
| BLAKE2b-256 |
346a0ffae8f7361a3f8032c61a32593a7b0bab0a129ad63d87dc0bc31bca2a01
|
Provenance
The following attestation bundles were made for cubic-0.7.0a2.tar.gz:
Publisher:
release.yml on alxndrkalinin/cubic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cubic-0.7.0a2.tar.gz -
Subject digest:
5240ff307d0adb5a52237862365af216046d546aee68676ba81562d656842c76 - Sigstore transparency entry: 1220069312
- Sigstore integration time:
-
Permalink:
alxndrkalinin/cubic@2c071ba00fe43d9af0af417cfb6824b16f926e64 -
Branch / Tag:
refs/tags/v0.7.0a2 - Owner: https://github.com/alxndrkalinin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2c071ba00fe43d9af0af417cfb6824b16f926e64 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cubic-0.7.0a2-py3-none-any.whl.
File metadata
- Download URL: cubic-0.7.0a2-py3-none-any.whl
- Upload date:
- Size: 115.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7502af10050d114a3898534e329d104a9e68159b10e024b4f2e9f4e80a32a228
|
|
| MD5 |
7d0e0cbc4742560637109e2b30faef57
|
|
| BLAKE2b-256 |
22d332babe6b70c1770e7f7e061eb279d3d6b0ce4cf36396b47dded67ecf81bf
|
Provenance
The following attestation bundles were made for cubic-0.7.0a2-py3-none-any.whl:
Publisher:
release.yml on alxndrkalinin/cubic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cubic-0.7.0a2-py3-none-any.whl -
Subject digest:
7502af10050d114a3898534e329d104a9e68159b10e024b4f2e9f4e80a32a228 - Sigstore transparency entry: 1220069326
- Sigstore integration time:
-
Permalink:
alxndrkalinin/cubic@2c071ba00fe43d9af0af417cfb6824b16f926e64 -
Branch / Tag:
refs/tags/v0.7.0a2 - Owner: https://github.com/alxndrkalinin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2c071ba00fe43d9af0af417cfb6824b16f926e64 -
Trigger Event:
release
-
Statement type: