py-clesperanto
pyclesperanto is the python package of 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.
Installation
Get a conda/python environment, e.b. via mini-conda. If you never used python/conda environments before, please follow the instructions here first.
conda create --name my_env python=3.10
conda activate my_env
Install pyclesperanto package using conda:
conda install -c conda-forge pyclesperanto
OR using pip:
pip install pyclesperanto
Code Example
Note: This project is under heavy development. General API, functions, and parameters are subject to change.
from pyclesperanto import cle
from skimage.io import imread, imsave
# initialize GPU
device = cle.select_device("GTX")
print("Used GPU: ", device)
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)
# process the image
inverted = cle.subtract_image_from_scalar(image, scalar=255)
blurred = cle.gaussian_blur(inverted, sigma_x=1, sigma_y=1)
binary = cle.threshold_otsu(blurred)
labeled = cle.connected_components_labeling_box(binary)
# The maxmium intensity in a label image corresponds to the number of objects
num_labels = cle.maximum_of_all_pixels(labeled)
# print out result
print("Num objects in the image: " + str(num_labels))
# save image to disc
imsave("result.tif", labeled)
Example gallery
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
More usage and example can be found as notebooks in the user documentation folder
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.
Feedback welcome!
clesperanto is developed in the open because we believe in the open source community. See our community guidelines. Feel free to drop feedback as github issue or via image.sc.
Release files for pyclesperanto 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyclesperanto-0.6.2.tar.gz | 4.2 MB | Details |
Built distributions (wheels)
Total release size: 28.0 MB
Release files / pyclesperanto-0.6.2.tar.gz
| Download URL | pyclesperanto-0.6.2.tar.gz |
|---|---|
| Size | 4.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e0df0011e1b24f13f57c9612b948b90e82b9609280409062e019bc06e09ae5e
|
|
BLAKE2b-256 checksum How to use checksums |
d5c88b9d38cc54cffc833cd5070e6ee5cd6ca39658da45e6b1e7c865b96c9d0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp310-cp310-win_amd64.whl
| Download URL | pyclesperanto-0.6.2-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b62d4d9d9cd9f435fe27057b43dc52df69c99f051eb0440a2acc3e9681e51e7d
|
|
BLAKE2b-256 checksum How to use checksums |
4e744bc9e1eac9506e443813e408755d3d0554642f71ab26f98f580ee68c96c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyclesperanto-0.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
da366bfaaa2f48651ea19bd7c13c652a10799bb6bc3642052425b50adee89834
|
|
BLAKE2b-256 checksum How to use checksums |
cdb13bd4d8d68a83ece458d01a37f001118c5be2aae402c231764e5b9a29ffe8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | pyclesperanto-0.6.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-32 |
|
SHA-256 checksum How to use checksums |
4530b13fbde788267ce2394f8b8db4b91db1fc431f40bdaf142cdf4e6edb1e74
|
|
BLAKE2b-256 checksum How to use checksums |
97af82871f2a9edb862a04592420a75207e6441252788c799a06aca45cb9cf8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | pyclesperanto-0.6.2-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 686.0 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
30a6ca376d8892758da7cd6c606d38cf435e1a0e3ccb69399e59a926e6ead491
|
|
BLAKE2b-256 checksum How to use checksums |
dfd7ecc3aa46adfcda248e60ba12d65a9326d5b0eaa3bd9555caf92e41f73103
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | pyclesperanto-0.6.2-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 670.3 kB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
b7d7530c8e1757af288c8bae48bfc625312b782eb626b26a2fb7983b85559caa
|
|
BLAKE2b-256 checksum How to use checksums |
68e03cd8f3b9b44ad69ec928a36d26e4e9907a695c4f97fe230c2f967b064cce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp39-cp39-win_amd64.whl
| Download URL | pyclesperanto-0.6.2-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5a4202578f59067c10384b5c1327f09811096e06c59dd1f6b6b867b9d8f49bd5
|
|
BLAKE2b-256 checksum How to use checksums |
473c7ca81ef77e4d0e90d61f0b847aa8b813381836dbd9f684cf2b10cc1847a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyclesperanto-0.6.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
07cac1d0e63816706e352f66281ca14ee199714e9813037da4b449c306c19d6b
|
|
BLAKE2b-256 checksum How to use checksums |
973d791d430e85ab79853e84f09c50c850926b7ad9ef4ba5a592d42711bd593f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | pyclesperanto-0.6.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-32 |
|
SHA-256 checksum How to use checksums |
dcacb63513c5f85dcb0e475d3a3752e46a0bf0304fb4b9a68ac97dfc22362baf
|
|
BLAKE2b-256 checksum How to use checksums |
3d83c232bc8330f285e5defaf7ed1d4744e969789acabde8909683047352d355
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | pyclesperanto-0.6.2-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 686.1 kB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4e49fe721d5f8a11282cbd7f956bd0a68ebe498951a7075b3eb4e42a2a5a454b
|
|
BLAKE2b-256 checksum How to use checksums |
48a5a94e54ee3666757eeb967084d4656f48f6407dd65c2e19cf6fb32accea86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp39-cp39-macosx_10_9_x86_64.whl
| Download URL | pyclesperanto-0.6.2-cp39-cp39-macosx_10_9_x86_64.whl |
|---|---|
| Size | 670.5 kB |
| Tags | CPython 3.9 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
91411392b5d781e5adff1b0723cb99e0da8e4730aa7c2a6622ef2ee1a5bad79d
|
|
BLAKE2b-256 checksum How to use checksums |
f02f504e9825156de20fe64321048ccfbe40bd53d00cf0eedef02d5636911769
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp38-cp38-win_amd64.whl
| Download URL | pyclesperanto-0.6.2-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b248f24605d94ca44a7f3cd52e0b07e3940c8835bb74786a6c6fa8c799245e32
|
|
BLAKE2b-256 checksum How to use checksums |
e6d61ded46bdc8ffaaf133d8c4c35a0c32011230a492cf3dba8bde1c0e5bd237
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyclesperanto-0.6.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
e92761fb803e83de0e3afc90f3602a4f1d038fab066d87e0667dd558d3090c5b
|
|
BLAKE2b-256 checksum How to use checksums |
0d5492d8bc279d6cbceda50c465c12398828df227ebbbd6dd813a2811afcebc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | pyclesperanto-0.6.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-32 |
|
SHA-256 checksum How to use checksums |
643f2cc66de9be8393758ca0578a3b7725879a5d0ebbff93e6354da4122912de
|
|
BLAKE2b-256 checksum How to use checksums |
f4230975fcb25304815fcdb52a714a9faeca1b275c507c2ef59358e91308f568
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp38-cp38-macosx_11_0_arm64.whl
| Download URL | pyclesperanto-0.6.2-cp38-cp38-macosx_11_0_arm64.whl |
|---|---|
| Size | 686.1 kB |
| Tags | CPython 3.8 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ce4a4df4ae236e191dbaa81e3e3071852dea0a8e2a58512ca1c410bde5219c10
|
|
BLAKE2b-256 checksum How to use checksums |
f65f45e2758c2f7218139dfeec4aebc6fd0c21baa797da23f484b9fd3ea114bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp38-cp38-macosx_10_9_x86_64.whl
| Download URL | pyclesperanto-0.6.2-cp38-cp38-macosx_10_9_x86_64.whl |
|---|---|
| Size | 670.4 kB |
| Tags | CPython 3.8 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
9e413174c8db0dcc4639d9a2b0524a92ec2d27e2ba5c2354be7a24855175ba8e
|
|
BLAKE2b-256 checksum How to use checksums |
ca94417a8a8340b8cf9ea3d56943adeb86d4331ee81a46d542daa4fe84f20223
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp37-cp37m-win_amd64.whl
| Download URL | pyclesperanto-0.6.2-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 2.6 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1fb4ce724caccb89e3f69af69c1253595436094efafb9959c262a0287b91cb15
|
|
BLAKE2b-256 checksum How to use checksums |
03eed4d2e4d9cc498a2396d25a707facd13639686caf58c037d7f22caf2db969
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pyclesperanto-0.6.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
d0725501c70ab8c8db0fd3777566be9b05c166767328a77538d8712724977ea5
|
|
BLAKE2b-256 checksum How to use checksums |
138701138fb03ef4205efb05856ae58458349f36a23c6e0c350a24313856725c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | pyclesperanto-0.6.2-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-32 |
|
SHA-256 checksum How to use checksums |
d7d9b6c3d429602a2babbe93cd82bf4ed6a027eae8436b47b95b3efe03186da6
|
|
BLAKE2b-256 checksum How to use checksums |
cb86ea2eec71767f0c9270762a92570ed5c0726ebf2d66cc4ad6fcc14baa29e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyclesperanto-0.6.2-cp37-cp37m-macosx_10_9_x86_64.whl
| Download URL | pyclesperanto-0.6.2-cp37-cp37m-macosx_10_9_x86_64.whl |
|---|---|
| Size | 668.3 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
f60b2212db77b4b2c49e522699c9dba8acac58040bd9103d0c96c14596a5572f
|
|
BLAKE2b-256 checksum How to use checksums |
3981b2c9819aad68c84bf32c2a5e064cca36ac00afec5603c93a16748d328a87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|