Presence Monitor
Extracts occupancy information for objects present in a specified region of interest.
Overview
The Presence Monitor node tracks how long each detected, tracked object has been present in the specified region in the video, can highlight objects and generate max time/occupancy level alarms, and adds the presence metadata to the frame metadata. It is designed for monitoring use cases.
This node generates presence metrics: current occupancy, objects above max time threshold, occupancy above/below max thresholds.
This node requires a AI Model Node and a Track Objects Node before it in order to function properly.
This node is a simplified version of the Occupancy Monitor. Use the Occupancy monitor if you need to collect statistics such as wait times, people flow, etc. for dashboards, reporting and business intelligence.
Inputs & Outputs
- Inputs : 1, Media Format : Raw Video
- Outputs : 1, Media Format: Raw Video
- Output Metadata : Presence Information
Properties
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
roi_labels | Regions of interest labels | string | — | No |
rois | Regions of interest. Conditional on roi_labels. Format: comma-separated normalized x,y coordinate pairs; separate multiple polygons with semicolons (for example, 0.1,0.1,0.9,0.1,0.9,0.9). | string | null | No |
objects_to_track | ex. car,person,car.red. Object types and classes to include. Leave blank to include all. | model-labels | null | No |
min_presence_time | Min. time an object should be present in the ROI in order to be considered present. Unit: seconds. | float | 1.0 | Yes |
max_presence_time | Create an alarm and shows an orange bounding box around object if present more than specified seconds in the ROI. Unit: seconds. | float | null | No |
max_occupancy_threshold | Set a trigger when number of objects in the ROI exceeds or drops below this threshold. | number | null | No |
crossing_buffer | Interval during which an object will not be repeatedly counted if it leaves and reenters the ROI. Unit: seconds. | float | 1.0 | Yes |
object_types_to_flag | Flag specific objects so you can trigger downstream events using those. Options: Currently in ROI (current); Newly entered into ROI (entry); Above max presence time in ROI (above_max_time); Upon exit from ROI (exit). Format: array of selected option values. | string[] | null | No |
trigger_events | Triggers these events. Leave blank to not trigger any events. Options: Object enters ROI (enter); Object exits ROI (exit); Object above max time in ROI (max_wait); ROI below max occupancy threshold (below_max_occupancy); ROI above max occupancy threshold (above_max_occupancy); ROI contains all specified objects (all_objects_present). Format: array of selected option values. | string[] | null | No |
event_template | Template for enter/exit/max_wait events. Leave blank to use defaults. Available variables: {object_type}, {object_attributes}, {state}, {roi}. | string | null | No |
add_object_attributes | Add specified labels as attributes to objects that interact with the ROI. ROI States include enter/exit/max wait. Options: None (none); State (enter/exit/max_wait) (state); ROI Name (roi); | enum | none | No |
display_roi | Display ROI? | bool | true | No |
display_roi_meta | Display ROI Statistics? Options: None (none): Do not display; Basic (basic): Display Occupancy counts only. | enum | detailed | No |
display_objects | Display objects? Options: None (none): Do not display; Basic (basic): Tracking point only; Detailed (detailed): Tracking point and time. | enum | detailed | No |
tracking_mode | Tracking mode. Options: Centroid (centroid); Top center (top-center); Bottom center (bottom-center); Left center (left-center); Right center (right-center). | enum | centroid | No |
Events
Triggering specific events using trigger_events and event_template fields allows you to add Events to metadata. These Events can then be processed by downstream nodes to publish metrics to a Dashboard, or send notifications or trigger alarms / bookmarks.
Output Metadata
The fields below are declared by this node's metadata schema; the JSON values are representative examples.
| Path | Type | Description |
|---|---|---|
nodes.<node_id>.rois.<roi_label>.current_occupancy | integer | Number of objects currently occupying the ROI. |
nodes.<node_id>.rois.<roi_label>.objects_entered_delta | integer | When one or more new objects enter the ROI |
nodes.<node_id>.rois.<roi_label>.objects_exited_delta | integer | When one or more objects leave the ROI |
nodes.<node_id>.rois.<roi_label>.objects_above_max_waiting_time_count | integer | Number of objects whose waiting time exceeds the configured maximum. |
nodes.<node_id>.rois.<roi_label>.objects_above_max_waiting_time_delta | integer | When one or more objects exceeds the maximum waiting time |
nodes.<node_id>.rois.<roi_label>.objects_above_max_occupancy_count | integer | Number of objects above the configured occupancy limit. |
nodes.<node_id>.rois.<roi_label>.objects_below_max_occupancy_count | integer | Number of objects within the configured occupancy limit. |
nodes.<node_id>.rois.<roi_label>.occupancy_above_max_threshold_delta | integer | When occupancy equals or exceeds Max Threshold |
nodes.<node_id>.rois.<roi_label>.occupancy_below_max_threshold_delta | integer | When occupancy falls below Max Threshold |
nodes.<node_id>.rois.<roi_label>.objects_flagged_count | integer | Number of objects currently matching this node’s alert criteria. |
nodes.<node_id>.rois.<roi_label>.objects_flagged_delta | integer | When one or more objects is newly flagged |
nodes.<node_id>.rois.<roi_label>.all_objects_present | boolean | Boolean indicating whether all configured object classes are currently present. |
nodes.<node_id>.rois.<roi_label>.all_objects_present_delta | boolean | When all specified object types are present in the ROI |
nodes.<node_id>.rois.<roi_label>.all_objects_not_present_delta | boolean | When all specified object types are not present in the ROI |
nodes.<node_id>.rois.<roi_label>.coords | array | Array of pixel coordinates defining the configured ROI or line. |
nodes.<node_id>.rois.<roi_label>.objects_of_interest_keys | array | Array of metadata keys that contain object IDs relevant to downstream integrations. |
nodes.<node_id>.rois.<roi_label>.objects_flagged | array | Array of tracking IDs of objects currently matching this node’s alert criteria. |
nodes.<node_id>.rois.<roi_label>.description | string | Human-readable summary of the node’s current result. |
nodes.<node_id>.events_delta | integer | When one or more Presence events are triggered |
nodes.<node_id>.events | array | Array of event names generated by this node for the current frame. |
nodes.<node_id>.type | string | Identifies the node type that produced this metadata. |
JSON example
{
"nodes": {
"annotate_presence1": {
"events": [],
"events_delta": 0,
"rois": {
"roi1": {
"all_objects_not_present_delta": false,
"all_objects_present": true,
"all_objects_present_delta": false,
"coords": [
[
468,
172
],
[
597,
307
]
],
"current_occupancy": 1,
"description": "value",
"objects_above_max_occupancy_count": 0,
"objects_above_max_waiting_time_count": 1,
"objects_above_max_waiting_time_delta": 0,
"objects_below_max_occupancy_count": 0,
"objects_entered_delta": 0,
"objects_exited_delta": 1,
"objects_flagged": [
"12837198712897",
"1231293712897612"
],
"objects_flagged_count": 0,
"objects_flagged_delta": 0,
"objects_of_interest_keys": [],
"occupancy_above_max_threshold_delta": 0,
"occupancy_below_max_threshold_delta": 0
}
},
"type": "annotate_presence"
}
}
}Object labels and attributes
- Object labels/classes added: No new class is created. The node can reinsert a tracked upstream object, preserving its original label and class.
- Object attribute labels/classes added: Depending on
add_object_attributes, the presence state (enter,exit, ormax_wait) uses class35101, the ROI label uses class35102, and<ROI>_<state>uses class35103.
Updated 7 days ago
