Occupancy Monitor
Extracts queue, dwell and occupancy information based in how long detected objects have been present in a specified region in the video
Overview
The Occupancy Monitor (previously known as Queue Length Counter) node keeps track of the number and how long each detected, tracked object has been present in the specified region in the video, can highlight objects and generate max time alarms, and adds the queue analytics metadata to the frame metadata.
This node generates diverse queue metrics: the total number of objects served, the minimum and maximum queue size, the number of objects that waited on queue more than a pre-specified time (so-called alarms), the minimum, maximum and mean waiting time, etc.
This node requires a AI Model Node and a Track Objects Node before it in order to function properly.
Inputs & Outputs
- Inputs : 1, Media Format : Raw Video
- Outputs : 1, Media Format: Raw Video
- Output Metadata : Queue Information
Properties
Property | Description | Type | Default | Required |
---|---|---|---|---|
roi_labels | Comma separated list of labels for each ROI. Ex queue_entrance, pos | list | null | Yes |
rois | Semicolon separated Regions of interest in the video within which objects will be tracked. Must correspond to labels defined in roi_labels . Format: R1x1,R1y1,R1x2,R1y2,R1x3,R1y3; R2x1,R2y1,R2x2,R2y2,R2x3,R2y3 \n \nEx: 10,10,100,100,100,100; 200,200,300,300,300,300 | polygon | null | Yes |
objects_to_track | Object types and classes to include. Accepts object labels defined in the AI model (e.g. 'car', 'person') and classifier attributes (e.g. 'car.red'). Leave blank to include all. | model-label | null | No |
min_queue_activation_time | Min. time (seconds) an object should be present in the ROI in order to be considered on queue analytics. | float | 1.0 | Yes |
presence_threshold | Create an alarm and shows an orange bounding box around object if present more than specified seconds in the ROI. | 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. | float | 1.0 | Yes |
display_roi | Controls whether ROI information will be displayed on the video stream. | bool | true | No |
display_roi_meta | Controls display of ROI statistics. Options: none (Do not display), basic (Display Occupancy counts only), detailed (Display all ROI statistics). | enum | "detailed" | No |
display_objects | Controls object display. Options: none (Do not display), basic (Tracking point only), detailed (Tracking point and time). | enum | "detailed" | No |
tracking_mode | Point on object used to determine presence in ROI. Options: centroid , top-center , bottom-center , left-center , right-center . | enum | "centroid" | No |
average_wait_mode | Method for calculating average wait time. Options: moving (Average of last N exited objects), cumulative (Average of all exited objects), current (Average of current objects). | enum | "moving" | No |
average_wait_last_n | Number of last exited objects to average over in moving average mode. Min value: 1. | number | 10 | No |
add_object_attributes | Add specified labels as attributes to objects that interact with the ROI. Options: none , state (enter/exit/maxwait), roi (adds ROI label), roi_state (Format: `<roi_label>`). | enum | "none" | No |
persistent_storage | If true, analytics will be persisted to disk and restored when pipeline restarts. | bool | false | No |
Metadata
Metadata Property | Description |
---|---|
nodes.<node_id> | Describes the Queue ROIs monitored by this node, and their properties. \nFormat : as defined in the table below. \n \n<node_id> for Queue Length Nodes is of the form annotate_queueX (ex. annotate_queue1 ) |
Example
"nodes": {
"annotate_queue1": {
"type": "annotate_queue",
"rois": {
"<roi_label>": {
"coords": [
[468, 172],
[597, 307],
[912, 206],
[1227, 277],
[1247, 135],
[1054, 91],
[946, 121],
[797, 87],
[645, 104],
[468, 172]
],
"current_queue_size": 1,
"max_queue_size": 2,
"max_wait_time": 15,
"mean_wait_time": 12,
"min_queue_size": 0,
"min_wait_time": 5,
"objects_above_max_occupancy_count": 0,
"objects_above_max_waiting_time_count": 1,
"objects_above_max_waiting_time_delta": 0,
"objects_entered_delta": 0,
"objects_exited_delta": 1,
"occupancy_above_max_threshold_delta": false,
"occupancy_below_max_threshold_delta": false,
"total_served": 0,
"wait_alarms": 2,
"current_objects": {
"<object_tracking_id>": {
"first_seen": 19.0,
"first_seen_utc": "2022-10-21T16:16:06.363395Z",
"time_present": 10.0
}
},
"exited_objects": {
"<object_tracking_id>": {
"first_seen": 13.0,
"first_seen_utc": "2022-10-21T16:16:05.072938Z",
"time_present": 15.933
}
}
}
}
}
}
Format
Key | Type | Description |
---|---|---|
<roi_label> | Array of dictionaries | Contains information about this specific ROI |
<roi_label>.coords | Dictionary | Contains the bounding box coordinates that represent this ROI |
<roi_label>.total_served | Integer | Number of objects seen in this ROI since the start of the pipeline |
<roi_label>.wait_alarms | Integer | Total number of wait alarms generated. This counter is incremented every time an object reaches the maximum waiting time defined in the node properties. |
<roi_label>.current_queue_size | Integer | Current number objects in queue |
<roi_label>.objects_entered_delta | Integer | Number of objects that entered the ROI between last frame and this frame |
<roi_label>.objects_exited_delta | Integer | Number of objects that left the ROI between last frame and this frame |
<roi_label>.objects_above_max_waiting_time_count | Integer | Number of objects currently inside the ROI above the specified temporal threshold |
<roi_label>.objects_above_max_waiting_time_delta | Integer | Number of new objects that exceeded the threshold between the last frame and this frame |
<roi_label>.objects_above_max_occupancy_count | Integer | Number of new objects that exceeded the max occupancy threshold |
<roi_label>.occupancy_above_max_threshold_delta | Bool | True when the total number of objects is above the max occupancy threshold |
<roi_label>.occupancy_below_max_threshold_delta | Bool | True when the total number of objects is below the max occupancy threshold |
<roi_label>.min_queue_size | Integer | Minimum number of objects in queue |
<roi_label>.max_queue_size | Integer | Maximum number of objects in queue |
<roi_label>.min_wait_time | Integer | The minimum queue waiting time in seconds |
<roi_label>.max_wait_time | Integer | The maximum queue waiting time in seconds |
<roi_label>.mean_wait_time | Integer | The mean queue waiting time in seconds |
<roi_label>.current_objects | Array of dictionaries | Information about the objects currently in the ROI \n \nobject_tracking_id : Unique identifier for a specific object, as specified by object.id property (see AI Model Node ) \n \nfirst_seen : Time in seconds (since start of deployment) when the object was first seen in the ROI \n \nfirst_seen_utc : UTC time in ISO 8601 format when the object was first seen in the ROI \n \ntime_present : Time in seconds that the object has been present in the ROI |
<roi_label>.exited_objects | Array of dictionaries | Information about the objects that left the ROI in the previous frame \n \nobject_tracking_id : Unique identifier for a specific object, as specified by object.id property (see AI Model Node ) \n \nfirst_seen : Time in seconds (since start of deployment) when the object was first seen in the ROI \n \nfirst_seen_utc : UTC time in ISO 8601 format when the object was first seen in the ROI \n \ntime_present : Time in seconds that the object was present in the ROI |
Updated 9 days ago