Streaming results
Stream inference outputs in real time to displays, message buses, or remote services using PySDK result objects.
Display a live overlay loop
Example
from degirum_tools import ModelSpec, Display, predict_stream, remote_assets
model_spec = ModelSpec(
model_name="yolov8n_coco--640x640_quant_hailort_multidevice_1",
zoo_url="degirum/hailo",
inference_host_address="@local",
model_properties={"device_type": ["HAILORT/HAILO8L", "HAILORT/HAILO8"]},
)
model = model_spec.load_model()
video_source = remote_assets.traffic # swap in a webcam index or RTSP URL
max_frames = 120 # stop after this many frames for demos
with Display("AI Camera — Live stream") as output_display:
for index, result in enumerate(predict_stream(model, video_source), start=1):
output_display.show(result.image_overlay)
print(f"Rendered frame {index}")
if index >= max_frames:
breakPublish lightweight payloads
Example
Monitor latency and throughput
Example
Last updated
Was this helpful?

