Skip to main content

PoseViz – 3D Human Pose and Mesh Visualizer

Multi-person, multi-camera 3D human pose and mesh visualization tool built using OpenGL (via ModernGL). As used in NLF and MeTRAbs visualizations.

This repo does not contain pose estimation code, only the visualization part.

Gist of Usage

import poseviz
import deltacamera

camera = deltacamera.Camera(...)

with poseviz.PoseViz(...) as viz:
    for frame in frames:
        bounding_boxes, poses3d = run_pose_estimation_model(frame)
        viz.update(frame=frame, boxes=bounding_boxes, poses=poses3d, camera=camera)

See also demo.py.

The main feature of this tool is that the graphical event loop is hidden from the library user. We want to write code in terms of the prediction loop of the human pose estimator, not from the point of view of the visualizer tool.

Behind the scenes, this is achieved through forking a dedicated visualization process and passing new scene information via multiprocessing queues.

Error Handling

When a requested output cannot be produced (the video writer fails, the camera trajectory cannot be saved, or the visualizer process dies), a poseviz.VisualizerError is raised in your prediction loop at the next API call, carrying the visualizer-side traceback. A requested video output to which zero frames were written also raises. Purely visual per-frame hiccups do not raise — they are logged, and only escalate to an error if they persist while an output is being written. If no output is requested (live demo use), the visualization stays best-effort and never interrupts your loop.

close() returns a list of poseviz.SequenceReport objects, one per output sequence, with the video path and the number of frames written.

Closing the Window

When the user closes the window (close button or ESC) inside a with poseviz.PoseViz(...) block, the next API call raises poseviz.WindowClosed, which ends the block without an error: the program continues after the block, and the buffered updates and the output video are finalized as usual. WindowClosed derives from BaseException, so except Exception in the loop does not catch it.

Without a with block, closing only hides the window; the visualizer keeps consuming updates (and writing the output video, if any), and viz.window_closed becomes true. Pass on_close="hide" or on_close="exit" to choose the behavior explicitly, e.g. on_close="hide" for a batch job that must finish even if nobody watches.

Headless and GPU Notes

  • headless=True (or auto-detection when DISPLAY/WAYLAND_DISPLAY are unset) uses a standalone EGL context: no display server is needed, and on hybrid-GPU machines (e.g., AMD display GPU + NVIDIA compute GPU) the NVIDIA card is targeted for NVENC. There is no need to unset DISPLAY manually; the egl_device_index parameter overrides the device selection if needed.
  • gpu_encode=True (default) requires the OpenGL context to be on an NVIDIA GPU. In windowed mode on hybrid-GPU machines, the window usually lands on the display GPU; starting a video output then raises an error immediately, listing the remedies: start the process with __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia, use headless mode, or pass gpu_encode=False for CPU encoding.
  • gpu_frames=True accepts PyTorch CUDA tensors or any DLPack-compatible frames (CuPy, JAX, ...), keeping the whole decode → inference → visualization → encode chain on the GPU.

Installation

pip install poseviz

Then run demo.py to test if installation was successful.

Metadata

Release files for poseviz 0.7.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 poseviz 0.7.0
File Size Uploaded Provenance Actions
poseviz-0.7.0.tar.gz 798.3 kB With provenance Details for poseviz-0.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.0 MB

Release files / poseviz-0.7.0.tar.gz

Download URL poseviz-0.7.0.tar.gz
Size 798.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b9a62d11a55daf9fd67a595cceafd9b80a84b0d5d669910a2483bca0bd31441e
BLAKE2b-256 checksum
How to use checksums
6de2505dc877b34f6973eee464563f858440625c5958fb56f93cd9139dc50426
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 3, 2026.

Transparency log

Release files / poseviz-0.7.0-py3-none-any.whl

Download URL poseviz-0.7.0-py3-none-any.whl
Size 203.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f3c780e9f9ec750b633bc35cb93820d5fd18cb604df686f22ebd79142d0794c
BLAKE2b-256 checksum
How to use checksums
811df79d87236b7b3a188d8909a9a3018c78d3013ad2ee6b219e52cb7fc45593
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 3, 2026.

Transparency log

Security for poseviz 0.7.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 poseviz-0.7.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 3, 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.

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