Visiongraph UI
User interface library for visiongraph projects. The idea behind this project is to create a structure for computer vision applications. The idea is to have a configuration, app and graph. And if needed a window.
Example
Configuration
class DemoConfig:
def __init__(self):
container = ContainerHelper(self)
# non-ui bound settings
with container.section("Test"):
self.enable_input = DataField(False) | ui.Boolean("Enable") | Argument(help="Enable input.")
Application
class DemoApp(VisiongraphApp[vg.VisionGraph, DemoConfig]):
def __init__(self, config: DemoConfig):
super().__init__(config)
def create_graph(self) -> vg.Visiongraph:
graph = DemoGraph().create_graph(vg.VideoCaptureInput())
graph.multi_threaded = True
return graph
Graph
class DemoGraph:
def __init__(self):
self.on_frame_ready: Event[np.ndarray] = Event()
self.graph: Optional[vg.VisionGraph] = None
def _on_frame_ready(self, frame: np.ndarray) -> np.ndarray:
self.on_frame_ready(frame)
return frame
def create_graph(self, input_device: vg.BaseInput) -> vg.VisionGraph:
self.graph = (
vg.create_graph(name="Demo Graph", input_node=input_device, multi_threaded=True)
.then(vg.custom(self._on_frame_ready))
.build()
)
return self.graph
Window
class DemoWindow(VisiongraphUserInterface[DemoApp, DemoConfig]):
def __init__(self, app: DemoApp):
super().__init__(app)
Usage
def main():
config = DemoConfig()
app = DemoApp(config)
with UIContext():
window = DemoWindow(app)
About
This is a first draft of the library and the api will change in future release.
Metadata
Release files for visiongraph-ui 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| visiongraph_ui-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for visiongraph_ui-0.3.0-py3-none-any.whl |
Release files / visiongraph_ui-0.3.0-py3-none-any.whl
| Download URL | visiongraph_ui-0.3.0-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a410ef39a0a72e3401e9c3c5fda2efa0a1f9ceca5476d51e3798dd86630cd69c
|
|
BLAKE2b-256 checksum How to use checksums |
297cb67117d5182123ed6cb252d290586384c898799e672cae2bd3b9b74af876
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Security for visiongraph-ui 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.