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

PropertyDescriptionTypeDefaultRequired
roi_labelsRegions of interest labels. Conditional on rois.hidden-Yes
roisRegions of interest. Conditional on roi_labels. Format: x1,y1,x2,y2,x3,y3; X1,Y1,X2,Y2,X3,Y3,X4,Y4.polygonnullYes
objects_to_trackComma separated list of Detected Object labels to track, as specified in Model Labels. Example: car, person. Accepted formats: object_label, object_label.class_type, object_label.*.model-labelnullNo
min_presence_timeMin. time an object should be present in the ROI in order to be considered present. Example: 10.0.float1.0Yes
max_presence_timeCreate an alarm and shows an orange bounding box around object if present more than specified seconds in the ROI. Example: 20.0.floatnullNo
max_occupancy_thresholdSet a trigger when number of objects in the ROI exceeds or drops below this threshold. Example: 10.numbernullNo
crossing_bufferInterval during which an object will not be repeatedly counted if it leaves and reenters the ROI. Example: 1.0.float1.0Yes
object_types_to_flagFlag specific objects so you can trigger downstream events using those. Options: current, entry, above_max_time, exit.enum-multinullNo
display_roiDisplay ROI?booltrueNo
display_roi_metaDisplay ROI Statistics? Options: none (Do not display), basic (Display Occupancy counts only), detailed (Display detailed statistics).enumdetailedNo
display_objectsDisplay objects? Options: none (Do not display), basic (Tracking point only), detailed (Tracking point and time).enumdetailedNo
tracking_modeTracking mode. Options: centroid, top-center, bottom-center, left-center, right-center.enumcentroidNo

Metadata

Metadata PropertyDescription
nodes.<node_id>Describes the ROIs monitored by this node, and their properties. Format : as defined in the table below. <node_id> for Presence monitor is of the form annotate_presenceX (ex. annotate_presence1)

Example

"nodes": {
    "annotate_presence1": {
        "type": "annotate_presence",
        "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_occupancy": 1,                  
                "objects_entered_delta": 0,
                "objects_exited_delta": 1,
                "objects_above_max_waiting_time_count": 1,
                "objects_above_max_waiting_time_delta": 0,
                "objects_above_max_occupancy_count": 0,
                "objects_below_max_occupancy_count": 0,
                "occupancy_above_max_threshold_delta": false,
                "occupancy_below_max_threshold_delta": false,
                "objects_flagged": ["12837198712897","1231293712897612"]                  
            }
        }
    }
}

Format

KeyTypeDescription
<roi_label>Array of dictionariesContains information about this specific ROI
<roi_label>.coordsDictionaryContains the bounding box coordinates that represent this ROI
<roi_label>.current_occupancyIntegerCurrent number objects in ROI
<roi_label>.objects_entered_deltaIntegerNumber of objects that entered the ROI between last frame and this frame
<roi_label>.objects_exited_deltaIntegerNumber of objects that left the ROI between last frame and this frame
<roi_label>.objects_above_max_waiting_time_countIntegerNumber of objects currently inside the ROI above the specified temporal threshold
<roi_label>.objects_above_max_waiting_time_deltaIntegerNumber of new objects that exceeded the threshold between the last frame and this frame
<roi_label>.objects_above_max_occupancy_countIntegerNumber of objects above the max occupancy threshold
<roi_label>.objects_below_max_occupancy_countIntegerNumber of objects needed to hit the max occupancy threshold
<roi_label>.occupancy_above_max_threshold_deltaBoolTrue when the total number of objects changes to above the max occupancy threshold
<roi_label>.occupancy_below_max_threshold_deltaBoolTrue when the total number of objects changes to below the max occupancy threshold
<roi_label>.objects_flaggedArray of stringsList of flagged object ids