Skip to main content
Visiongraph Logo Bright

Visiongraph

Ruff PyPI Pepy Total Downloads Documentation

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 Python 3.10, 3.11 and 3.12. Other versions may also work, but are not officially supported. In practice, version compatibility is usually limited by third-party dependencies rather than by Visiongraph itself.

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.

Optional Mediapipe Support

Visiongraph can integrate Google’s MediaPipe for advanced hand, face, pose and tracking pipelines. Unfortunately, the official PyPI MediaPipe wheels declare a strict dependency on numpy<2.0, which prevents installation alongside NumPy 2.x, even though most functionality works fine with NumPy 2.0 and above. To work around this limitation, we maintain a custom mediapipe-numpy2 build that removes the <2.0 pin.

When you install the mediapipe extra with uv or pip, the package manager automatically fetches the matching patched wheel for your operating system and Python version.

Official MediaPipe Compatibility

The official mediapipe package currently declares numpy<2.0, while Visiongraph requires NumPy 2.x. Consequently, standard uv and pip dependency resolution cannot install the two packages together. Use the mediapipe extra shown above unless you deliberately manage and override dependency metadata in your own environment.

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

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

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

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       # run the full unit test suite
make check      # run lint, formatting, and tests

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-numpy2      Apache License 2.0
moviepy               MIT License
numba                 BSD License
numpy                 MIT License
onnxruntime           MIT License
onnxruntime-directml  MIT License
onnxruntime-gpu       MIT License
opencv-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.

Release files for visiongraph 1.2.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.2.0
File Size Uploaded
visiongraph-1.2.0.tar.gz 2.8 MB Details

Built distribution (wheel)

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

Total release size: 3.2 MB

Release files / visiongraph-1.2.0.tar.gz

Download URL visiongraph-1.2.0.tar.gz
Size 2.8 MB
Tags Source
SHA-256 checksum
How to use checksums
42162ff04b04808841a3189ab09f3c10ed05ef2d909ec64dded0165691fc1d95
BLAKE2b-256 checksum
How to use checksums
b80361039690bceff9b155b91fd79c47f2e1e07471dabbbe9385ea711a05f783
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 4, 2026.

Transparency log

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

Download URL visiongraph-1.2.0-py3-none-any.whl
Size 395.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
297faac1f8486a95d5215fccb677aa49b0cca383149e8317fbec7ae1af9826a3
BLAKE2b-256 checksum
How to use checksums
debdd9185b46773f4c26570f0c4fff23e7fde59febdb83ea1deb4b49a3c5aaa8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.0.1.2

1 release file

1.0.1.1

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.1.60

1 release file

0.1.59

1 release file

0.1.58

1 release file

0.1.57

1 release file

0.1.56

1 release file

0.1.53

1 release file

0.1.52

1 release file

0.1.50

1 release file

0.1.49

1 release file

0.1.48

1 release file

0.1.45

1 release file

0.1.44

1 release file

0.1.43

1 release file

0.1.42

1 release file

0.1.41

1 release file

0.1.40

1 release file

0.1.35

1 release file

0.1.34

1 release file

0.1.33

1 release file

0.1.32

1 release file

0.1.27

1 release file

0.1.26

1 release file

0.1.25

1 release file

0.1.24

1 release file

0.1.23

1 release file

0.1.22

1 release file

0.1.21

1 release file

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