interactive-pipe 0.7.1__tar.gz → 0.7.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {interactive_pipe-0.7.1/src/interactive_pipe.egg-info → interactive_pipe-0.7.3}/PKG-INFO +18 -7
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/pyproject.toml +1 -1
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/readme.md +17 -6
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/__init__.py +2 -1
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/core/cache.py +0 -2
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/core/engine.py +2 -3
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/data_objects/audio.py +5 -2
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/gradio_gui.py +4 -2
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/qt_control.py +24 -11
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/headless/control.py +14 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3/src/interactive_pipe.egg-info}/PKG-INFO +18 -7
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/LICENSE +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/setup.cfg +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/core/__init__.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/core/filter.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/core/graph.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/core/pipeline.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/core/signature.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/data_objects/__init__.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/data_objects/curves.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/data_objects/data.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/data_objects/image.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/data_objects/parameters.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/__init__.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/gradio_control.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/gui.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/mpl_control.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/mpl_gui.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/mpl_window.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/nb_control.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/nb_gui.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/qt_gui.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/window.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/headless/__init__.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/headless/keyboard.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/headless/pipeline.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/helper/__init__.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/helper/_private.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/helper/choose_backend.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/helper/control_abbreviation.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/helper/filter_decorator.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/helper/keyword_args_analyzer.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/helper/pipeline_decorator.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/thirdparty/images_openai_api.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/thirdparty/music_spotify.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe.egg-info/SOURCES.txt +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe.egg-info/dependency_links.txt +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe.egg-info/requires.txt +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe.egg-info/top_level.txt +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/test/test_cache.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/test/test_control_abbreviations.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/test/test_controller.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/test/test_core.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/test/test_curves.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/test/test_decorator.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/test/test_engine.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/test/test_filter.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/test/test_headless.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/test/test_image.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/test/test_parameters.py +0 -0
- {interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/test/test_recorder.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: interactive_pipe
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.3
|
|
4
4
|
Summary: Library to create flexible interactive image processing pipelines and automatically add a graphical user interface without knowing anything about GUI coding!
|
|
5
5
|
Author-email: Balthazar Neveu <balthazarneveu@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/balthazarneveu/interactive_pipe
|
|
@@ -42,12 +42,20 @@ Requires-Dist: ipywidgets>=8.0.7; extra == "full"
|
|
|
42
42
|
Requires-Dist: pandas; extra == "full"
|
|
43
43
|
Requires-Dist: gradio; extra == "full"
|
|
44
44
|
|
|
45
|
-
# `interactive_pipe`
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
`pip install interactive-pipe`
|
|
46
|
+
<center>
|
|
49
47
|
|
|
48
|
+
|  |
|
|
49
|
+
|:--:|
|
|
50
|
+
|Quick setup `pip install interactive-pipe` |
|
|
51
|
+
| [Project website](https://balthazarneveu.github.io/interactive_pipe/) |
|
|
52
|
+
|
|
53
|
+
</center>
|
|
54
|
+
|
|
55
|
+
# Interactive-pipe code
|
|
50
56
|
### Concept
|
|
57
|
+
|
|
58
|
+
|
|
51
59
|
- Develop an algorithm while debugging visually with plots, while checking robustness & continuity to parameters change.
|
|
52
60
|
- Magically create a graphical interface to easily demonstrate a concept or simply tune your algorithm.
|
|
53
61
|
|
|
@@ -95,7 +103,7 @@ pip install -e ".[full]"
|
|
|
95
103
|
|
|
96
104
|
## :scroll: Features
|
|
97
105
|
|
|
98
|
-
**Version 0.7.
|
|
106
|
+
**Version 0.7.3**
|
|
99
107
|
- Modular multi-image processing filters
|
|
100
108
|
- Declarative: Easily make graphical user interface without having to learn anything about pyQt or matplotlib
|
|
101
109
|
- Support in jupyter notebooks
|
|
@@ -103,7 +111,9 @@ pip install -e ".[full]"
|
|
|
103
111
|
- Cache intermediate results in RAM for much faster processing
|
|
104
112
|
- `KeyboardControl` : no slider on UI but exactly the same internal mechanism, update on key press.
|
|
105
113
|
- Support Curve plots (2D signals)
|
|
106
|
-
- :new: gradio backend (+allows sharing with others)
|
|
114
|
+
- :new: gradio backend (+allows sharing with others).
|
|
115
|
+
- :new: Audio support in Gradio
|
|
116
|
+
- :new: Circular sliders for Qt Backend
|
|
107
117
|
|
|
108
118
|
|
|
109
119
|
|
|
@@ -141,8 +151,9 @@ Shortcuts while using the GUI (QT & matplotlib backends)
|
|
|
141
151
|
| Plot curves | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark:|
|
|
142
152
|
| Auto refreshed layout | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: |
|
|
143
153
|
| Keyboard shortcuts / fullscreen| :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |
|
|
144
|
-
| Audio support | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :
|
|
154
|
+
| Audio support | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_check_mark: |
|
|
145
155
|
| Image buttons| :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign:|
|
|
156
|
+
| Circular slider| :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign:|
|
|
146
157
|
|
|
147
158
|
|
|
148
159
|
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
# `interactive_pipe`
|
|
2
1
|
|
|
3
|
-
|
|
4
|
-
`pip install interactive-pipe`
|
|
2
|
+
<center>
|
|
5
3
|
|
|
4
|
+
|  |
|
|
5
|
+
|:--:|
|
|
6
|
+
|Quick setup `pip install interactive-pipe` |
|
|
7
|
+
| [Project website](https://balthazarneveu.github.io/interactive_pipe/) |
|
|
8
|
+
|
|
9
|
+
</center>
|
|
10
|
+
|
|
11
|
+
# Interactive-pipe code
|
|
6
12
|
### Concept
|
|
13
|
+
|
|
14
|
+
|
|
7
15
|
- Develop an algorithm while debugging visually with plots, while checking robustness & continuity to parameters change.
|
|
8
16
|
- Magically create a graphical interface to easily demonstrate a concept or simply tune your algorithm.
|
|
9
17
|
|
|
@@ -51,7 +59,7 @@ pip install -e ".[full]"
|
|
|
51
59
|
|
|
52
60
|
## :scroll: Features
|
|
53
61
|
|
|
54
|
-
**Version 0.7.
|
|
62
|
+
**Version 0.7.3**
|
|
55
63
|
- Modular multi-image processing filters
|
|
56
64
|
- Declarative: Easily make graphical user interface without having to learn anything about pyQt or matplotlib
|
|
57
65
|
- Support in jupyter notebooks
|
|
@@ -59,7 +67,9 @@ pip install -e ".[full]"
|
|
|
59
67
|
- Cache intermediate results in RAM for much faster processing
|
|
60
68
|
- `KeyboardControl` : no slider on UI but exactly the same internal mechanism, update on key press.
|
|
61
69
|
- Support Curve plots (2D signals)
|
|
62
|
-
- :new: gradio backend (+allows sharing with others)
|
|
70
|
+
- :new: gradio backend (+allows sharing with others).
|
|
71
|
+
- :new: Audio support in Gradio
|
|
72
|
+
- :new: Circular sliders for Qt Backend
|
|
63
73
|
|
|
64
74
|
|
|
65
75
|
|
|
@@ -97,8 +107,9 @@ Shortcuts while using the GUI (QT & matplotlib backends)
|
|
|
97
107
|
| Plot curves | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark:|
|
|
98
108
|
| Auto refreshed layout | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: |
|
|
99
109
|
| Keyboard shortcuts / fullscreen| :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |
|
|
100
|
-
| Audio support | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :
|
|
110
|
+
| Audio support | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_check_mark: |
|
|
101
111
|
| Image buttons| :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign:|
|
|
112
|
+
| Circular slider| :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign:|
|
|
102
113
|
|
|
103
114
|
|
|
104
115
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from interactive_pipe.helper.pipeline_decorator import pipeline, interactive_pipeline
|
|
2
|
-
from interactive_pipe.headless.control import Control
|
|
2
|
+
from interactive_pipe.headless.control import Control, CircularControl
|
|
3
|
+
from interactive_pipe.data_objects.curves import Curve, SingleCurve
|
|
3
4
|
from interactive_pipe.headless.keyboard import KeyboardControl
|
|
4
5
|
from interactive_pipe.helper.filter_decorator import interactive, interact
|
|
@@ -48,8 +48,6 @@ class CachedResults:
|
|
|
48
48
|
:param new_params: The new parameters to check.
|
|
49
49
|
:return: True if an update is needed or False otherwise.
|
|
50
50
|
"""
|
|
51
|
-
if self.result is None: # if no result force initialization
|
|
52
|
-
self.force_change = True
|
|
53
51
|
change_state_from_params_check = self.state_change.has_changed(
|
|
54
52
|
new_params)
|
|
55
53
|
if self.force_change:
|
|
@@ -58,11 +58,10 @@ class PipelineEngine:
|
|
|
58
58
|
if prc.inputs:
|
|
59
59
|
routing_in = [
|
|
60
60
|
result[idi] if idi is not None else None for idi in prc.inputs]
|
|
61
|
-
logging.debug("in types->
|
|
62
|
-
for inp in routing_in])
|
|
61
|
+
logging.debug(f"in types-> {[type(inp) for inp in routing_in]}")
|
|
63
62
|
out = prc.run(*routing_in)
|
|
64
63
|
if out is not None:
|
|
65
|
-
logging.debug("out types->
|
|
64
|
+
logging.debug(f"out types-> {[type(ou) for ou in out]}")
|
|
66
65
|
except Exception as e:
|
|
67
66
|
logging.error(f'Error in {prc.name} filter:')
|
|
68
67
|
logging.error(e)
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/data_objects/audio.py
RENAMED
|
@@ -12,7 +12,7 @@ except ImportError:
|
|
|
12
12
|
logging.info("Cannot import wavio")
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
def audio_to_html(audio: Union[None, str, Path, Tuple[int, np.ndarray]]) -> str:
|
|
15
|
+
def audio_to_html(audio: Union[None, str, Path, Tuple[int, np.ndarray]], controls=True) -> str:
|
|
16
16
|
if audio is None:
|
|
17
17
|
logging.debug("No audio to display")
|
|
18
18
|
return ""
|
|
@@ -27,6 +27,9 @@ def audio_to_html(audio: Union[None, str, Path, Tuple[int, np.ndarray]]) -> str:
|
|
|
27
27
|
wavio.write(audio_bytes, audio[1].astype(np.float32), audio[0], sampwidth=4)
|
|
28
28
|
audio_bytes.seek(0)
|
|
29
29
|
audio_base64 = base64.b64encode(audio_bytes.read()).decode("utf-8")
|
|
30
|
-
audio_player = f'<audio src="data:audio/mpeg;base64,{audio_base64}"
|
|
30
|
+
audio_player = f'<audio src="data:audio/mpeg;base64,{audio_base64}"'
|
|
31
|
+
if controls:
|
|
32
|
+
audio_player += ' controls'
|
|
33
|
+
audio_player += ' autoplay></audio>'
|
|
31
34
|
|
|
32
35
|
return audio_player
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/gradio_gui.py
RENAMED
|
@@ -150,13 +150,15 @@ class MainWindow(InteractivePipeWindow):
|
|
|
150
150
|
# Gradio Blocks mode
|
|
151
151
|
# https://www.gradio.app/guides/blocks-and-event-listeners
|
|
152
152
|
with gr.Blocks() as io:
|
|
153
|
-
if self.audio:
|
|
154
|
-
outputs.append(self.audio)
|
|
155
153
|
with gr.Row(variant="compact"):
|
|
156
154
|
gr.Markdown("### " + self.name.replace("_", " "))
|
|
157
155
|
with gr.Row():
|
|
158
156
|
for elem in outputs:
|
|
159
157
|
elem.render()
|
|
158
|
+
if self.audio:
|
|
159
|
+
outputs.append(self.audio)
|
|
160
|
+
with gr.Row():
|
|
161
|
+
self.audio.render()
|
|
160
162
|
|
|
161
163
|
if self.sliders_layout is None:
|
|
162
164
|
self.sliders_layout = "collapsible"
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/qt_control.py
RENAMED
|
@@ -8,14 +8,14 @@ PYQTVERSION = None
|
|
|
8
8
|
|
|
9
9
|
if not PYQTVERSION:
|
|
10
10
|
try:
|
|
11
|
-
from PyQt6.QtWidgets import QWidget, QLabel, QSlider, QHBoxLayout, QLineEdit, QComboBox, QCheckBox, QPushButton, QHBoxLayout
|
|
11
|
+
from PyQt6.QtWidgets import QWidget, QLabel, QSlider, QHBoxLayout, QLineEdit, QComboBox, QCheckBox, QPushButton, QHBoxLayout, QDial
|
|
12
12
|
from PyQt6.QtCore import Qt, QSize
|
|
13
13
|
from PyQt6.QtGui import QIcon
|
|
14
14
|
PYQTVERSION = 6
|
|
15
15
|
except ImportError:
|
|
16
16
|
logging.warning("Cannot import PyQt")
|
|
17
17
|
try:
|
|
18
|
-
from PyQt5.QtWidgets import QWidget, QLabel, QSlider, QHBoxLayout, QLineEdit, QComboBox, QCheckBox, QPushButton, QHBoxLayout
|
|
18
|
+
from PyQt5.QtWidgets import QWidget, QLabel, QSlider, QHBoxLayout, QLineEdit, QComboBox, QCheckBox, QPushButton, QHBoxLayout, QDial
|
|
19
19
|
from PyQt5.QtCore import Qt, QSize
|
|
20
20
|
from PyQt5.QtGui import QIcon
|
|
21
21
|
PYQTVERSION = 5
|
|
@@ -23,7 +23,7 @@ if not PYQTVERSION:
|
|
|
23
23
|
raise ModuleNotFoundError("No PyQt")
|
|
24
24
|
if not PYQTVERSION:
|
|
25
25
|
try:
|
|
26
|
-
from PySide6.QtWidgets import QWidget, QLabel, QSlider, QHBoxLayout, QLineEdit, QComboBox, QCheckBox, QPushButton, QHBoxLayout
|
|
26
|
+
from PySide6.QtWidgets import QWidget, QLabel, QSlider, QHBoxLayout, QLineEdit, QComboBox, QCheckBox, QPushButton, QHBoxLayout, QDial
|
|
27
27
|
from PySide6.QtCore import Qt, QSize
|
|
28
28
|
from PySide6.QtGui import QIcon
|
|
29
29
|
PYQTVERSION = 6
|
|
@@ -86,8 +86,17 @@ class IntSliderControl(BaseControl):
|
|
|
86
86
|
assert self.ctrl._type == int
|
|
87
87
|
|
|
88
88
|
def create(self):
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
if self.silent:
|
|
90
|
+
slider_class = SilentSlider
|
|
91
|
+
slider = slider_class(Qt.Orientation.Horizontal, self)
|
|
92
|
+
else:
|
|
93
|
+
if hasattr(self.ctrl, 'modulo') and self.ctrl.modulo:
|
|
94
|
+
slider_class = QDial
|
|
95
|
+
slider = slider_class(self)
|
|
96
|
+
else:
|
|
97
|
+
slider_class = QSlider
|
|
98
|
+
slider = slider_class(Qt.Orientation.Horizontal, self)
|
|
99
|
+
|
|
91
100
|
slider.setRange(self.ctrl.value_range[0], self.ctrl.value_range[1])
|
|
92
101
|
slider.setValue(self.ctrl.value_default)
|
|
93
102
|
slider.setSingleStep(1)
|
|
@@ -112,12 +121,16 @@ class FloatSliderControl(BaseControl):
|
|
|
112
121
|
return self.ctrl.value_range[0] + (self.ctrl.value_range[1]-self.ctrl.value_range[0])*val/1000
|
|
113
122
|
|
|
114
123
|
def create(self):
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
124
|
+
if self.silent:
|
|
125
|
+
slider_class = SilentSlider
|
|
126
|
+
slider = slider_class(Qt.Orientation.Horizontal, self)
|
|
127
|
+
else:
|
|
128
|
+
if hasattr(self.ctrl, 'modulo') and self.ctrl.modulo:
|
|
129
|
+
slider_class = QDial
|
|
130
|
+
slider = slider_class(self)
|
|
131
|
+
else:
|
|
132
|
+
slider_class = QSlider
|
|
133
|
+
slider = slider_class(Qt.Orientation.Horizontal, self)
|
|
121
134
|
self.ctrl.convert_int_to_value = self.convert_int_to_value
|
|
122
135
|
slider.setRange(self.convert_value_to_int(
|
|
123
136
|
self.ctrl.value_range[0]), self.convert_value_to_int(self.ctrl.value_range[1]))
|
|
@@ -143,3 +143,17 @@ class Control():
|
|
|
143
143
|
self.update_param_func = update_param_func
|
|
144
144
|
self.parameter_name_to_connect = parameter_name
|
|
145
145
|
self.filter_to_connect = filter
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class CircularControl(Control):
|
|
149
|
+
"""
|
|
150
|
+
Replace a slider by a circular slider
|
|
151
|
+
"""
|
|
152
|
+
|
|
153
|
+
def __init__(self, value_default: Union[int, float, bool, str], value_range: List[Union[int, float, str]] = None, modulo=True, name=None, step=None, filter_to_connect: Optional[FilterCore] = None, parameter_name_to_connect: Optional[str] = None) -> None:
|
|
154
|
+
super().__init__(value_default=value_default, value_range=value_range, name=name, step=step,
|
|
155
|
+
filter_to_connect=filter_to_connect, parameter_name_to_connect=parameter_name_to_connect, icons=None)
|
|
156
|
+
self.modulo = modulo
|
|
157
|
+
|
|
158
|
+
def __repr__(self) -> str:
|
|
159
|
+
return super().__repr__() + f"| modulo:{self.modulo}"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: interactive_pipe
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.3
|
|
4
4
|
Summary: Library to create flexible interactive image processing pipelines and automatically add a graphical user interface without knowing anything about GUI coding!
|
|
5
5
|
Author-email: Balthazar Neveu <balthazarneveu@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/balthazarneveu/interactive_pipe
|
|
@@ -42,12 +42,20 @@ Requires-Dist: ipywidgets>=8.0.7; extra == "full"
|
|
|
42
42
|
Requires-Dist: pandas; extra == "full"
|
|
43
43
|
Requires-Dist: gradio; extra == "full"
|
|
44
44
|
|
|
45
|
-
# `interactive_pipe`
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
`pip install interactive-pipe`
|
|
46
|
+
<center>
|
|
49
47
|
|
|
48
|
+
|  |
|
|
49
|
+
|:--:|
|
|
50
|
+
|Quick setup `pip install interactive-pipe` |
|
|
51
|
+
| [Project website](https://balthazarneveu.github.io/interactive_pipe/) |
|
|
52
|
+
|
|
53
|
+
</center>
|
|
54
|
+
|
|
55
|
+
# Interactive-pipe code
|
|
50
56
|
### Concept
|
|
57
|
+
|
|
58
|
+
|
|
51
59
|
- Develop an algorithm while debugging visually with plots, while checking robustness & continuity to parameters change.
|
|
52
60
|
- Magically create a graphical interface to easily demonstrate a concept or simply tune your algorithm.
|
|
53
61
|
|
|
@@ -95,7 +103,7 @@ pip install -e ".[full]"
|
|
|
95
103
|
|
|
96
104
|
## :scroll: Features
|
|
97
105
|
|
|
98
|
-
**Version 0.7.
|
|
106
|
+
**Version 0.7.3**
|
|
99
107
|
- Modular multi-image processing filters
|
|
100
108
|
- Declarative: Easily make graphical user interface without having to learn anything about pyQt or matplotlib
|
|
101
109
|
- Support in jupyter notebooks
|
|
@@ -103,7 +111,9 @@ pip install -e ".[full]"
|
|
|
103
111
|
- Cache intermediate results in RAM for much faster processing
|
|
104
112
|
- `KeyboardControl` : no slider on UI but exactly the same internal mechanism, update on key press.
|
|
105
113
|
- Support Curve plots (2D signals)
|
|
106
|
-
- :new: gradio backend (+allows sharing with others)
|
|
114
|
+
- :new: gradio backend (+allows sharing with others).
|
|
115
|
+
- :new: Audio support in Gradio
|
|
116
|
+
- :new: Circular sliders for Qt Backend
|
|
107
117
|
|
|
108
118
|
|
|
109
119
|
|
|
@@ -141,8 +151,9 @@ Shortcuts while using the GUI (QT & matplotlib backends)
|
|
|
141
151
|
| Plot curves | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark:|
|
|
142
152
|
| Auto refreshed layout | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: |
|
|
143
153
|
| Keyboard shortcuts / fullscreen| :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: |
|
|
144
|
-
| Audio support | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :
|
|
154
|
+
| Audio support | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_check_mark: |
|
|
145
155
|
| Image buttons| :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign:|
|
|
156
|
+
| Circular slider| :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign:|
|
|
146
157
|
|
|
147
158
|
|
|
148
159
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/data_objects/__init__.py
RENAMED
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/data_objects/curves.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/data_objects/image.py
RENAMED
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/data_objects/parameters.py
RENAMED
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/__init__.py
RENAMED
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/gradio_control.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/mpl_control.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/mpl_window.py
RENAMED
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/graphical/nb_control.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/helper/choose_backend.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/helper/filter_decorator.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/helper/pipeline_decorator.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe/thirdparty/music_spotify.py
RENAMED
|
File without changes
|
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe.egg-info/requires.txt
RENAMED
|
File without changes
|
{interactive_pipe-0.7.1 → interactive_pipe-0.7.3}/src/interactive_pipe.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|