Occupancy Monitor

Tracks how long detected objects have been present in a specified region in the video and extracts queue, dwell, occupancy information

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

Value

roi_labels

Comma separated list of labels for each ROI in the rois list above.

Format: label1, label2

Ex: queue_entrance, queue_store

rois

Semicolon separated list of areas in the video within which the node tracks these objects.

If none is specified, the Queue Length Counter tracks objects within the entire frame.

Format: left1,top1,right1,bottom1; left2,top2,right2,bottom2

Ex: 10,10,100,100; 200,200,300,300

objects_to_track

Comma separated list of Detected Object labels to track, as specified in Model Labels

ex. car, person

Accepted formats:
object_label: any object of this type, with or without a classifier attribute. Example: car

object_label.class_type: any object of this type that has a specific classifier attribute. Example: car.red

object_label.*: any object of this type that has at least one classifier attribute. Example: car.* (this will match car.red, car.yellow, etc)

min_queue_activation_time

The minimal time in seconds a object should be present in the queue in order be considered on the analytics.

Ex: 10

presence_threshold

Creates an alarm and shows an orange bounding box around object if present more than these seconds in the ROI

Ex. 60

max_occupancy_threshold

Set a trigger when number of objects in the ROI exceeds, or drops below this threshold

Ex. 10

Output metadata fields:
objects_above_max_occupancy_count
occupancy_above_max_threshold_delta
occupancy_below_max_threshold_delta

crossing_buffer

The interval (in seconds) during which an object will not be repeat counted if it leaves and reenters the ROI

Ex. 0.5

display_roi

Boolean. If true, ROI info will be drawn on video

Ex. true / false

display_objects

Boolean. If true, Object info (presence duration, as well as highlight when it crosses presence threshold) will be drawn on video

Ex. true / false

persistent_storage

Boolean. If true, the following analytics will be stored in disk and restored when the pipeline restarts:

[roi_label]['queue_total_objects_served']
[roi_label]['queue_total_max_wait_alarms']
[roi_label]['queue_size_min']
[roi_label]['queue_size_max']
[roi_label]['queue_min_wait_time']
[roi_label]['queue_max_wait_time']
[roi_label]['queue_mean_wait_time']

Ex. true / false

Metadata

Metadata Property

Description

nodes.<node_id>

Describes the Queue ROIs monitored by this node, and their properties.
Format : as defined in the table below.

<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": [
                    [<point1_x>, <point1_y>],
                    [<point2_x>, <point2_y>],
                    [<point3_x>, <point3_y>]
                ],
                "total_served": <int>,
                "wait_alarms": <int>,
                "current_queue_size": <int>,
                "objects_entered_delta": <int>,
                "objects_exited_delta": <int>,
                "objects_above_max_waiting_time_count": <int>,
                "objects_above_max_waiting_time_delta": <int>,
                "objects_above_max_occupancy_count": <int>,
                "occupancy_above_max_threshold_delta": <bool>,
                "occupancy_below_max_threshold_delta": <bool>,
                "min_queue_size": <int>,
                "max_queue_size": <int>,
                "min_wait_time": <int>,
                "max_wait_time": <int>,
                "mean_wait_time": <int>,
                "current_objects": {
                    "<object_tracking_id>": {
                        "first_seen": <seconds in ROI>,
                        "time_present": <seconds in ROI>
                    }
                }
            }
        }
    }
}

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

object_tracking_id : Unique identifier for a specific object, as specified by object.id property (see Model Inference Node )

first_seen : Time in seconds when the object was first seen in the ROI

time_present : Time in seconds that the object has been present in the ROI


Did this page help you?