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 to add GPU acceleration to existing codebases by simply replacing import statement and and transferring input arrays to the target device. It also provides custom GPU-accelerated implementations of additional features, including Forier Ring and Shell Correlation for image resolution, faster Richardson-Lucy deconvolution, average precision (AP) for segmentation quality assesement, and other.

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

See the example notebooks in examples/notebooks/.

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.6.0.tar.gz (47.7 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.6.0-py3-none-any.whl (58.8 kB view details)

Uploaded Python 3

File details

Details for the file cubic-0.6.0.tar.gz.

File metadata

  • Download URL: cubic-0.6.0.tar.gz
  • Upload date:
  • Size: 47.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cubic-0.6.0.tar.gz
Algorithm Hash digest
SHA256 f598a1b465ab2f4a4620e7e7ad23f37167398f087b783a3140fcdd84cfcc734f
MD5 9d1a4bd7ba068dca6d2ca85e24f99297
BLAKE2b-256 f72bb27866f910f3e251ec2b992b94a5b8c015a3c72090d023f859144ae2e781

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubic-0.6.0.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.6.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for cubic-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 849ecce373383f0140d195f3e25645f4bbc9909df22ddeb2e6dccdd7f6ad6b18
MD5 a12f12b508d6f2b195750fcd02845514
BLAKE2b-256 d07188d2735d4763610d6856b5f15fc7d1af29d09a03294f87eef30936630459

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubic-0.6.0-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