Skip to main content

GPU-accelerated image processing in python using OpenCL

Project description

pyclesperanto

Build License Website Python Version Development Status GitHub stars GitHub forks

pyclesperanto is a python package for clEsperanto - a multi-language framework for GPU-accelerated image processing. clEsperanto uses OpenCL kernels from CLIJ. This package relies on the CLIc back-end for processing.

Usage

Note: This project is under heavy development. Functions and parameters are subject to change.

from skimage.io import imread
from pyclesperanto import cle

image = imread("https://imagej.nih.gov/ij/images/blobs.gif")

# push and create buffer
gpu_output = cle.create(image.shape)
gpu_input = cle.push(image)

# apply kernel
cle.add_image_and_scalar(input_image=gpu_input, output_image=gpu_output, scalar=100)

# visualize result
cle.imshow(gpu_output)

# get result as numpy array
result = cle.pull(gpu_output)

Example gallery

Segment + analyze blobs

Cell segmentation + Voronoi labeling

3D image filtering

Find local maxima

3D Tribolium nuclei segmentation

Explore application programming interface (API)

More usage and example can be found as notebooks in the user documentation folder

Installation

Download the repository and update the associated submodules:

git clone https://github.com/clEsperanto/pyclesperanto.git
cd pyclesperanto && git submodule update --init --recursive

Here, we assume that your system has an OpenCL valid device and that all its drivers are correctly installed. Using anaconda (or miniconda), create a virtual environment and activate it:

conda create --name pycle python=3.9
conda activate pycle

Finally, install pyclesperanto and all its dependencies by running the command:

pip install -e .

For MacOS users, Please install the following package:

conda install -c conda-forge -y ocl_icd_wrapper_apple

For Linux users, Please install the following package:

conda install -c conda-forge -y ocl-icd-system

Contributing

Contributions are very welcome. Before spending effort on coding and filing a pull-request, please get in touch, file an issue, and let's discuss your potential contribution.

License

Distributed under the terms of the BSD-3 license, "py-clesperanto" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

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

pyclesperanto-0.6.1.tar.gz (1.9 MB view hashes)

Uploaded Source

Built Distributions

pyclesperanto-0.6.1-cp310-cp310-win_amd64.whl (2.6 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

pyclesperanto-0.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyclesperanto-0.6.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (1.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686

pyclesperanto-0.6.1-cp310-cp310-macosx_11_0_arm64.whl (685.8 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

pyclesperanto-0.6.1-cp310-cp310-macosx_10_9_x86_64.whl (670.0 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pyclesperanto-0.6.1-cp39-cp39-win_amd64.whl (2.6 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

pyclesperanto-0.6.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pyclesperanto-0.6.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (1.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

pyclesperanto-0.6.1-cp39-cp39-macosx_11_0_arm64.whl (685.9 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

pyclesperanto-0.6.1-cp39-cp39-macosx_10_9_x86_64.whl (670.2 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pyclesperanto-0.6.1-cp38-cp38-win_amd64.whl (2.6 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

pyclesperanto-0.6.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pyclesperanto-0.6.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (1.1 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686

pyclesperanto-0.6.1-cp38-cp38-macosx_11_0_arm64.whl (685.8 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

pyclesperanto-0.6.1-cp38-cp38-macosx_10_9_x86_64.whl (670.1 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pyclesperanto-0.6.1-cp37-cp37m-win_amd64.whl (2.6 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

pyclesperanto-0.6.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

pyclesperanto-0.6.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl (1.1 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ i686

pyclesperanto-0.6.1-cp37-cp37m-macosx_10_9_x86_64.whl (668.0 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

Supported by

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