Skip to main content
Visiongraph Logo Bright

Visiongraph

Ruff PyPI Pepy Total Downloads Documentation DOI

Visiongraph is a computer-vision pipeline library designed to simplify the prototyping of image-based algorithms with ready-to-use modules and composable graph nodes. Built on top of OpenCV, it also integrates popular frameworks such as Intel OpenVINO, Google MediaPipe, and DepthAI. The library is designed with a focus on real-time applications and edge deployment.

Readme Example

Object detection, segmentation and pose estimation example.

Here is a minimal example that opens a live webcam capture, runs SSD object detection, and displays the annotated result.

import cv2
from visiongraph import vg

with vg.VideoCaptureInput() as cam, vg.SSDDetector.create(vg.SSDConfig.SSDLiteMobileNetV2_FP32) as ssd:
    while True:
        _, frame = cam.read()
        if frame is None:
            break

        results = ssd.process(frame)
        results.annotate(frame)

        cv2.imshow("Frame", frame)
        cv2.waitKey(1)

Get started with visiongraph by reading the documentation.

Research Origins

Visiongraph originated as a research codebase for rapid prototyping in computer vision. It has since supported a range of academic, artistic, and applied projects. Selected examples include:

Installation

Visiongraph supports CPython 3.11 through 3.13. Python 3.14 and newer can be used where the selected dependencies provide compatible builds. The base installation uses NumPy 2 and OpenCV contrib (cv2).

To add Visiongraph with all available optional dependencies to a project managed by uv, run:

uv add "visiongraph[all]"

Alternatively, install it into the active Python environment with pip:

pip install "visiongraph[all]"

It is also possible, and usually preferable, to install only the extras you actually need:

# example: install RealSense and OpenVINO support only
uv add "visiongraph[realsense,openvino]"

The equivalent pip command is:

pip install "visiongraph[realsense,openvino]"

Please read more about the extra packages in the documentation.

Model Assets

Most estimators download their model files on demand and store them in ~/.visiongraph/assets/ by default. Set VISIONGRAPH_ASSET_DIR to use a different location. Visiongraph itself is released under the MIT License, but individual downloadable models can use different licenses, including copyleft terms such as AGPL or GPL. Check MODEL_ATTRIBUTIONS.md for the license of the specific model you plan to ship, redistribute, or use in a commercial product.

Images and project artwork stored in the repository's assets directory are documented in assets/ATTRIBUTIONS.md.

Examples

Run an example with uv run examples/<ExampleFile>.py, for example uv run examples/SimpleVisionGraph.py.

To demonstrate the possibilities of visiongraph, the repository already contains a number of ready-to-run examples. Here is a selection of the current examples:

There are also additional projects that use visiongraph in practice:

Development

To develop Visiongraph itself, clone this repository and install the dependencies with uv:

# from the repository root
make sync

uv uses Python 3.13 from the repository's .python-version by default.

Build

Build the source distribution and wheel from the repository root. The build regenerates the required repository artifacts first and writes the packages to ./dist:

make build

Run make generate-artifacts to regenerate the public imports and model attributions outside a build. If attribution generation reports missing dependencies, run make sync and try again.

To download local copies of all model license texts referenced by repository-backed assets into ./build/licenses, run:

make download-model-licenses

Docs

Generate the deployable documentation in ./docs with:

make docs

The docs builder uses stubs for optional backends so API pages can be built with the base and docs dependencies.

To preview the documentation locally with pdoc's development server, run:

make docs-serve

Code Quality and Tests

Format the repository and apply auto-fixable Ruff rules:

make autoformat

Run the non-mutating lint and formatting checks individually, or run the full validation suite:

make lint          # run Ruff lint checks
make fmt-check     # check formatting without changing files
make test-routine  # run unit tests and backend import checks
make test          # run the full test suite, including model inference
make check         # run lint, formatting, and tests

The Visiongraph Test workflow offers three suites:

  • routine is the default and runs unit tests and optional backend import checks on Windows, macOS, and Linux with Python 3.11–3.13.
  • inference runs the full suite on Ubuntu with Python 3.13.
  • full runs the full suite across the OS and Python matrix.

The inference suites fetch model assets on demand and cache them by model mirror revision.

Dependencies

Parts of these libraries are directly included and adapted to work with visiongraph. For more information, please see the third party notices.

Below is a list of visiongraph dependencies and their licenses, provided without guarantee of correctness:

depthai               MIT License
faiss-cpu             MIT License & BSD-3-Clause
filterpy              MIT License
mediapipe             Apache License 2.0
numba                 BSD License
numpy                 MIT License
onnxruntime           MIT License
onnxruntime-directml  MIT License
onnxruntime-gpu       MIT License
opencv-contrib-python Apache License 2.0
openvino              Apache License 2.0
pdoc                  MIT License
pyk4a                 MIT License
pyopengl              BSD License
pyrealsense2          Apache License 2.0
pyrealsense2-macosx   Apache License 2.0
pytest                MIT License
requests              Apache License 2.0
ruff                  MIT License
scipy                 MIT License
hatchling             MIT License
SpoutGL               BSD License
syphon-python         MIT License
tqdm                  MIT License
ty                    MIT License
vector                BSD License
vidgear               Apache License 2.0
wheel                 MIT License

For more information about the dependencies, see pyproject.toml.

Please note that the library code is MIT-licensed, but some downloadable models, such as Ultralytics YOLOv8 and YOLOv11, use their own licenses (for example AGPLv3). Model provenance and license information is listed in MODEL_ATTRIBUTIONS.md.

Credits

Developed at the Immersive Arts Space, Zurich University of the Arts (ZHdK).
Maintained by Florian Bruggisser.

Released under the MIT License. See LICENSE for details.

Metadata

Release files for visiongraph 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for visiongraph 1.3.0
File Size Uploaded Provenance Actions
visiongraph-1.3.0.tar.gz 2.8 MB With provenance Details for visiongraph-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for visiongraph 1.3.0
File Interpreter ABI Platform Actions
visiongraph-1.3.0-py3-none-any.whl Python 3 none any Details for visiongraph-1.3.0-py3-none-any.whl

Total release size: 3.2 MB

Release files / visiongraph-1.3.0.tar.gz

Download URL visiongraph-1.3.0.tar.gz
Size 2.8 MB
Tags Source
SHA-256 checksum
How to use checksums
48224db15819c33fa4d7bed99de0a26a500531d7fbbeb17b75bc90064072a949
BLAKE2b-256 checksum
How to use checksums
8f2bad20d3d00e634480835688be32200b38f1177e86418dcce707984f89e336
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / visiongraph-1.3.0-py3-none-any.whl

Download URL visiongraph-1.3.0-py3-none-any.whl
Size 398.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a924b47bf9cb87ee4fc54769c383a934c9eea7e7bfacb4ac92d5532abb6826ad
BLAKE2b-256 checksum
How to use checksums
c728c92a3df7d46f7882b741fedfb38374d96c1723a65833d118125718ae3b8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for visiongraph 1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for visiongraph-1.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page