Skip to content

Commit

Permalink
Merge pull request #296 from clEsperanto/update-demos
Browse files Browse the repository at this point in the history
Update demos and examples
  • Loading branch information
StRigaud authored Nov 28, 2024
2 parents 4e1826c + f65b269 commit b0a739f
Show file tree
Hide file tree
Showing 55 changed files with 6,833 additions and 6,327 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,34 @@ jobs:
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true
verbose: true

update_citation:
name: update CITATION
needs: [upload_all]
runs-on: ubuntu-latest
if: github.event_name == 'release' && success()
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download Zenodo CFF
run: |
curl -L https://zenodo.org/records/14199059/export/cff -o CITATION.cff
sed -i '/^abstract:/,/^authors:/d' CITATION.cff
sed -i '1iauthors:' CITATION.cff
- name: Update CITATION.cff
run: |
python -m pip install --upgrade pip
pip install cffconvert
cffconvert --output-format=cff-citation-file --output-path=CITATION.cff setup.py
- name: Commit CITATION.cff
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add CITATION.cff
git diff-index --quiet HEAD || git commit -m "Update citation" --allow-empty
git push
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ repos:
- id: check-yaml
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
Expand Down
21 changes: 21 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
authors:
- affiliation: Institut Pasteur, Paris
family-names: Stephane Rigaud
- affiliation: Data Science Center ScaDS.AI, Uni Leipzig
family-names: Robert Haase
- affiliation: DFG cluster of excellence, Physics of Life, TU Dresden
family-names: Johannes Soltwedel
- family-names: grahamross123
- affiliation: Institut Pasteur
family-names: Marvin Albert
- affiliation: Walter and Eliza Hall Institute of Medical Research
family-names: Pradeep Rajasekhar
cff-version: 1.2.0
date-released: '2024-11-21'
doi: 10.5281/zenodo.14199059
license:
- cc-by-4.0
repository-code: https://github.com/clEsperanto/pyclesperanto/tree/0.16.0
title: 'clEsperanto/pyclesperanto: 0.16.0'
type: software
version: 0.16.0
69 changes: 33 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# py-clesperanto
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/pyclesperanto.svg)](https://anaconda.org/conda-forge/pyclesperanto)
[![PyPI](https://img.shields.io/pypi/v/pyclesperanto.svg?color=green)](https://pypi.org/project/pyclesperanto)
[![License](https://img.shields.io/pypi/l/pyclesperanto.svg?color=green)](https://github.com/clEsperanto/pyclesperanto/raw/main/LICENSE)
[![License](https://img.shields.io/pypi/l/pyclesperanto.svg?color=green)](https://github.com/clEsperanto/pyclesperanto/blob/main/LICENSE)
[![Development Status](https://img.shields.io/pypi/status/pyclesperanto.svg)](https://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha)
[![Build](https://github.com/clEsperanto/pyclesperanto/actions/workflows/build.yml/badge.svg)](https://github.com/clEsperanto/pyclesperanto/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/clesperanto/pyclesperanto/branch/main/graph/badge.svg)](https://codecov.io/gh/clesperanto/pyclesperanto)
Expand Down Expand Up @@ -37,10 +37,12 @@ mamba activate cle
mamba install -c conda-forge pyclesperanto
```

__MacOS__ users may need to install the following package: `mamba install -c conda-forge ocl_icd_wrapper_apple`
__Linux__ users may need to install the following package: `mamba install -c conda-forge ocl-icd-system`
> [!WARNING]
> __MacOS__ users may need to install the following package: `mamba install -c conda-forge ocl_icd_wrapper_apple`
> __Linux__ users may need to install the following package: `mamba install -c conda-forge ocl-icd-system`
**NOTE:** It is also possible to install pyclesperanto with `pip`
> [!NOTE]
> pyclesperanto package is also available on `PyPI` and can be install with the command `pip install pyclesperanto`
## Troubleshooting: Graphics cards drivers

Expand Down Expand Up @@ -69,7 +71,7 @@ from skimage.io import imread, imsave
device = cle.select_device()
print("Used GPU: ", device)

image = imread("https://samples.fiji.sc/blobs.png")
image = imread("https://samples.fiji.sc/blobs.png?raw=true")

# push image to device memory
input_image = cle.push(image)
Expand All @@ -91,73 +93,68 @@ output_image = cle.pull(labeled)
imsave("result.tif", output_image)
```

## __Examples & Demos gallery__
## __Examples & Demos__

<table border="0">

<tr><td>
<img src="https://github.com/clEsperanto/pyclesperanto/raw/main/demos/images/labeled_blobs.png" width="300"/>
<img src="https://github.com/clEsperanto/pyclesperanto/blob/main/demos/images/select_device.png?raw=true" width="300"/>
</td><td>

[Segment + analyze blobs](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/basics/count_blobs.ipynb)
* [Select and Manage devices](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/api/select_devices.ipynb)
* [Host-Device memory management](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/api/push_pull_create.ipynb)
* [Process an image](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/api/process_image.ipynb)

</td></tr>

<tr><td>
<img src="https://github.com/clEsperanto/pyclesperanto/raw/main/demos/images/cell_segmentation.png" width="300"/>
<img src="https://github.com/clEsperanto/pyclesperanto/blob/main/demos/images/crop_and_paste_images.png?raw=true" width="300"/>
</td><td>

[Cell segmentation + Voronoi labeling](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/cell_segmentation.ipynb)
* [Crop, Flip, Paste arrays](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/basics/crop_flip_paste.ipynb)
* [Math operations](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/basics/arithmetic_operators.ipynb)
* [Matrix operations](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/basics/matrices_operations.ipynb)
* [Vector and Matrix operations](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/basics/vector_and_matrices_operations.ipynb)
* [Inspecting 3D image](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/basics/inspecting_3d_images.ipynb)

</td></tr>


<tr><td>
<img src="https://github.com/clEsperanto/pyclesperanto/raw/main/demos/images/image_filtering.png" width="300"/>
<img src="https://github.com/clEsperanto/pyclesperanto/blob/main/demos/images/segmentation_3d.png?raw=true" width="300"/>
</td><td>

[3D image filtering](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/image_filtering.ipynb)
* [Segment and analyse blosb](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/example/analyse_blobs.ipynb)
* [Segment cell based on membrane](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/example/membrane_segmentation_2d.ipynb)
* [Cell segmentation in 3D](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/example/Segmentation_3D.ipynb)
* [Voronoi_Otsu_labeling](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/example/voronoi_otsu_labeling.ipynb)

</td></tr>


<tr><td>
<img src="https://github.com/clEsperanto/pyclesperanto/raw/main/demos/images/find_local_maxima.png" width="300"/>
<img src="https://github.com/clEsperanto/pyclesperanto/blob/main/demos/images/affine_transforms.png?raw=true" width="300"/>
</td><td>

[Find local maxima](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/find_local_maxima.ipynb)
* [Edge detection](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/example/edge_detection_and_enhancement.ipynb)
* [Parametric maps](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/example/parametric_maps.ipynb)
* [Rotation, scaling, translation, and affine transform](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/example/affine_transforms.ipynb)
<!-- * [Morphomathic operations](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/example/morphomath_operation.ipynb) -->

</td></tr>

<tr><td>
<img src="https://github.com/clEsperanto/pyclesperanto/raw/main/demos/images/tribolium3d_segmentation.png" width="300"/>
</td><td>

[3D Tribolium nuclei segmentation](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/process_tribolium.ipynb)

</td></tr>

<tr><td>
<img src="https://github.com/clEsperanto/pyclesperanto/raw/main/demos/images/explore_API.png" width="300"/>
<img src="https://github.com/clEsperanto/pyclesperanto/blob/main/demos/images/multi-device-tiling.png?raw=true" width="300"/>
</td><td>

[Explore application programming interface (API)](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/explore_API.ipynb)
* [Multi-device tile processing](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/example/multi-gpu_tile_processing_with_dask.ipynb)
* [Bia-Bob](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/interoperability/multi-biabob-example.ipynb)

</td></tr>

<!--
<tr><td>
<img src="https://raw.githubusercontent.com/clEsperanto/pyclesperanto/main/demos/images/multi-gpu.png" width="300"/>
</td><td>
[Multi-GPU developer_docs](https://github.com/clEsperanto/pyclesperanto/tree/main/demos/multi_gpu_demo.ipynb)
</td></tr>
-->
</table>

More usage and example can be found as notebooks in the [demos](./user_docs) folder
More usage and example can be found as notebooks in the [demos](https://github.com/clEsperanto/pyclesperanto/tree/main/demos) folder. As well as in the [documentation](https://clesperanto.github.io/pyclesperanto/).

# __Contributing and Feedback__

Expand Down
Loading

0 comments on commit b0a739f

Please sign in to comment.