Zero-copy buffer sharing
Frame memory allocated in Rust is exposed directly to NumPy and PyTorch through the buffer protocol and __array_interface__ without copying bytes across FFI.
Zero-copy video buffers, multi-worker inference, and deterministic temporal fusion backed by Rust.
pip install vigilo-streamuv add vigilo-streampoetry add vigilo-streamimport vigilo_stream
import numpy as np
# Initialize pipeline with automatic model download on first run
with vigilo_stream.Pipeline(models_dir="models", auto_download=True) as pipe:
pipe.start("camera:0") # Accepts camera index, video file, or frame folder
while pipe.is_running():
# Zero-copy frame access: raw Rust memory exposed to NumPy
frame = pipe.poll_frame()
if frame:
img = np.asarray(frame)
# Instantaneous model output
snapshot = pipe.snapshot()
if snapshot:
print(f"Faces: {snapshot.face_count}, Pose: {snapshot.head_pose}")
# Temporal violation events from fusion engine
for event in pipe.events():
print(f"Event: {event.event_type} -> {event.violation}")