End-to-end recipe for a zone-based intrusion detection pipeline that runs entirely on the edge: raw video stays on-device, anonymised frames feed the WebRTC stream, and the cloud only ever sees alert events.Documentation Index
Fetch the complete documentation index at: https://docs.cyberwave.com/llms.txt
Use this file to discover all available pages before exploring further.
Stack: Workflows, YOLO, Spatial Filter, Timed Condition, Edge
Workers
Pipeline
Theanonymize node publishes the pixelated frame to the camera
driver’s filtered frame channel so the
WebRTC stream the operator sees is privacy-preserving by construction
— no raw video ever leaves the edge.
Prerequisites
- A twin bound to a camera with the
generic camera driver and
CYBERWAVE_METADATA_FRAME_FILTER_ENABLED=true. - Edge Core running with at least one healthy edge runtime.
- The
yolov8nmodel in the workspace catalog (auto-downloaded on first reference).
Authoring the workflow
- Create a workflow scoped to the camera’s environment, with
Run on edgeenabled. - Add the trigger: drag a
Camera Framenode from the Sources & Triggers group, settwin_uuidto the camera twin. - Add detection: drag a
Call Modelnode, pickyolov8n, settarget_classesto["person"]. Wirecamera_frame → call_model. - Add privacy: drag an
Anonymizenode, setmodetopixelate. In the inspector’s Target Classes chip editor, leave it empty to default toperson, or add chips (e.g.face,vehicle) if your model emits other class labels you want obscured. Wirecall_model → anonymize. The downstream WebRTC stream now shows pixelated people automatically. - Add the zone: drag a
Spatial Filternode from the Decision & Control group. In the inspector, click Capture frame to fetch a still from the camera and trace the zone polygon over it. Setpoint_modetobbox_bottom_centerfor floor-anchored subjects. Wireanonymize → spatial_filter. - Add the dwell gate: drag a
Timed Conditionnode. Mode stays on the defaultsustained. Setmin_duration_sto the loitering threshold you care about (5s for a tight intrusion alert, 30s for a “left unattended” scenario). Setcooldown_sto your alert review cadence (30–120s is typical). Wirespatial_filter → timed_condition. - Configure the alert on the
Call Modelnode’semit_eventparameters: setevent_type(e.g.intrusion),severity(warning), and leaveenabled=true. The edge worker emits the alert directly on the dwell-fired frame using these settings — wiring an explicitSend Alertnode downstream oftimed_conditionin the samecamera_frameworkflow is harmless but ignored by the edge codegen (the edge worker bypasses the cloud runner for per-frame triggers). - Activate the workflow. The edge runtime will pull the
generated worker (
wf_<uuid8>.py) on its next sync, and the polygon will appear as a read-only overlay on the twin’s WebRTC stream so operators can see which zones are armed.
Optional: email on alert
The edge worker writes alerts viacw.publish_alert(...) and they
land in the Alerts panel. To also receive an email, add a second
workflow with an alert trigger:
timed_condition
for the full two-workflow shape.
Operator experience
- Frontend overlay: the twin’s video panel shows the zone polygon outlined in blue. Multiple zones (e.g. authorised vs forbidden) appear as separate polygons.
- Alerts: when the dwell threshold is crossed, a
send_alert-created alert appears in the Alerts panel with the polygon and dwell duration embedded inmetadata.
Privacy boundary
The Zenoh→MQTT bridge does not forward raw frames. Only the alert payload (with optional anonymised snapshot) crosses the WAN. See the Security Pipeline page for the deeper privacy contract.See also
spatial_filter— the polygon zone primitive.timed_condition— the dwell-then-cooldown gate.anonymize— the pixelation node and its mode reference.- Security Pipeline — multi-camera privacy-preserving WebRTC playbook.