Metadata-Version: 2.4
Name: interactive_pipe
Version: 0.9.1
Summary: Library to create flexible interactive image processing pipelines and automatically add a graphical user interface without knowing anything about GUI coding!
Author-email: Balthazar Neveu <balthazarneveu@gmail.com>
Project-URL: Homepage, https://github.com/balthazarneveu/interactive_pipe
Project-URL: Documentation, https://balthazarneveu.github.io/interactive_pipe/
Project-URL: Source, https://github.com/balthazarneveu/interactive_pipe
Project-URL: Changelog, https://github.com/balthazarneveu/interactive_pipe/blob/master/CHANGELOG.md
Project-URL: Bug Tracker, https://github.com/balthazarneveu/interactive_pipe/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: User Interfaces
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib>=3.5.3
Requires-Dist: numpy>=1.21.6
Requires-Dist: Pillow>=9.0.1
Requires-Dist: PyYAML>=5.4.1
Provides-Extra: qt6
Requires-Dist: PyQt6>=6.5.2; extra == "qt6"
Requires-Dist: PyQt6_sip>=13.5.2; extra == "qt6"
Provides-Extra: qt5
Requires-Dist: PyQt5>=5.15.9; extra == "qt5"
Requires-Dist: PyQt5_sip>=12.12.1; extra == "qt5"
Provides-Extra: notebook
Requires-Dist: ipywidgets>=7.7.1; extra == "notebook"
Provides-Extra: pytest
Requires-Dist: opencv_python_headless>=4.8.1.78; extra == "pytest"
Requires-Dist: pytest>=6.2.5; extra == "pytest"
Provides-Extra: full
Requires-Dist: PyQt6>=6.5.2; extra == "full"
Requires-Dist: PyQt6_sip>=13.5.2; extra == "full"
Requires-Dist: opencv_python_headless>=4.8.1.78; extra == "full"
Requires-Dist: pytest>=6.2.5; extra == "full"
Requires-Dist: ipywidgets>=7.7.1; extra == "full"
Requires-Dist: pandas; extra == "full"
Requires-Dist: gradio; extra == "full"
Provides-Extra: dev
Requires-Dist: ruff>=0.9.0; extra == "dev"
Requires-Dist: pyright>=1.1.390; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.27; extra == "docs"
Requires-Dist: mkdocs-llmstxt>=0.2; extra == "docs"
Dynamic: license-file

<div align="center">

![Interactive pipe](static/interact-pipe-logo-horizontal-rgb.svg)

[![PyPI](https://img.shields.io/pypi/v/interactive-pipe)](https://pypi.org/project/interactive-pipe/)
[![Python versions](https://img.shields.io/pypi/pyversions/interactive-pipe)](https://pypi.org/project/interactive-pipe/)
[![License](https://img.shields.io/github/license/balthazarneveu/interactive_pipe)](https://github.com/balthazarneveu/interactive_pipe/blob/master/LICENSE)
[![Docs](https://img.shields.io/badge/docs-mkdocs%20material-blue)](https://balthazarneveu.github.io/interactive_pipe/)
[![Interactive pipe python package](https://github.com/balthazarneveu/interactive_pipe/actions/workflows/pytest.yaml/badge.svg)](https://github.com/balthazarneveu/interactive_pipe/actions/workflows/pytest.yaml)

**📖 [Documentation](https://balthazarneveu.github.io/interactive_pipe/)**

</div>

# interactive_pipe

**Turn plain python processing functions into an interactive GUI app — without writing a single line of GUI code.**

```bash
pip install interactive-pipe
```

- Develop an algorithm while debugging visually with plots, checking robustness and continuity to parameter changes.
- Magically create a graphical interface to demonstrate a concept or tune your algorithm.
- Keep your algorithm library untouched: interactivity is added by decoration, not by rewriting.
- The same pipeline runs headless for batch processing and tests.

![Interactive pipe demo](docs/images/demo_multi_image.gif)

## Quick taste

```python
from interactive_pipe import interactive, interactive_pipeline
import numpy as np

@interactive(coeff=(1.0, [0.5, 2.0], "exposure"), bias=(0.0, [-0.2, 0.2]))
def exposure(img, coeff=1.0, bias=0.0):
    return img * coeff + bias

@interactive(blend_coeff=(0.5, [0.0, 1.0]))
def blend(img0, img1, blend_coeff=0.5):
    return (1 - blend_coeff) * img0 + blend_coeff * img1

@interactive_pipeline(gui="qt")  # or "mpl", "nb" (Jupyter/Colab), "gradio"
def pipe(img):
    exposed = exposure(img)
    blended = blend(img, exposed)
    return exposed, blended

pipe(np.array([0.0, 0.5, 0.8]) * np.ones((256, 512, 3)))
```

Calling `pipe(...)` opens a window with sliders for every declared parameter. 🎉

## Backends

| *PyQt / PySide* | *Matplotlib* | *Jupyter / Colab* | *Gradio* |
|:-----:|:------:|:----:|:----:|
| `gui="qt"` | `gui="mpl"` | `gui="nb"` | `gui="gradio"` |
| ![qt](docs/images/qt_backend.jpg) | ![mpl](docs/images/mpl_backend.jpg) | ![nb](docs/images/notebook_backend.jpg) | ![gradio](docs/images/gradio_backend.jpg) |

Plus headless mode (`gui=None`) for batch processing. Full feature matrix in the [backends docs](https://balthazarneveu.github.io/interactive_pipe/getting-started/backends/).

## Learn more

- 📖 [Documentation](https://balthazarneveu.github.io/interactive_pipe/) — quickstart, guides, API reference
- 🤖 Agent-friendly docs: [llms.txt](https://balthazarneveu.github.io/interactive_pipe/llms.txt) / [llms-full.txt](https://balthazarneveu.github.io/interactive_pipe/llms-full.txt)
- 🎓 [Interactive tutorial on Hugging Face](https://huggingface.co/spaces/balthou/interactive-pipe-tutorial)
- 🗒️ [Examples gallery](https://balthazarneveu.github.io/interactive_pipe/guide/examples/) — 17 demo scripts, Colab notebooks, a Raspberry Pi jukebox
- 📋 [Changelog](https://github.com/balthazarneveu/interactive_pipe/blob/master/CHANGELOG.md)
- 🤝 [Contributing](https://github.com/balthazarneveu/interactive_pipe/blob/master/CONTRIBUTING.md)
