Dwell Counter Node

Tracks how long detected objects have been present in a specified region in the video

Overview

The Dwell 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 adds the presence metadata to the frame metadata. This node makes it easy to build common use cases such as Overtime parking enforcement, Loitering alerts, etc.

This node has been deprecated in favor of Occupancy Monitor

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 : Presence Information

Properties

PropertyValue
objects_to_trackComma 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)
presence_thresholdNumber of seconds the object must be present to flag them on the video stream

Ex. 60
display_roiBoolean. If true, ROI info will be drawn on video

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

Ex. true / false
roisSemicolon separated list of areas in the video within which the Presence Detector tracks these objects.

If none is specified, the Presence Detector tracks objects within the entire frame.

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

Ex: 10,10,100,100; 200,200,300,300
roi_labelsComma separated list of labels for each ROI in the rois list above.

Format: label1, label2

Ex: door, window
persistent_storageBoolean. If true, the following analytics will be stored in disk and restored when the pipeline restarts:

[roi_label]['total_objects']

Ex. true / false

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 Dwell Counter Nodes is of the form annotate_presenceX (ex. annotate_presence1)

Example

"nodes": {
    "annotate_presence1": {
        "type": "annotate_presence",
        "rois": {
            "<roi_label>": {
                "coords": [[<point1_x>, <point1_y>], 
                           [<point2_x>, <point2_y>], 
                           [<point3_x>, <point3_y>]],
                "total_objects": <int>,
                "objects_entered_delta": <int>,
                "objects_exited_delta": <int>,
                "objects_above_max_time_threshold_count": <int>,
                "objects_above_max_time_threshold_delta": <int>,
                "current_objects_count": <int>,
                "current_objects": {
                    "<object_tracking_id>": {
                        "first_seen": <seconds in ROI>,
                        "time_present": <seconds in ROI>
                    }
                }
            }
        }
    }
}

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>.total_objectsIntegerNumber of objects seen in this ROI since the start of the pipeline
<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_time_threshold_countIntegerNumber of objects inside the ROI above the specified temporal threshold
<roi_label>.objects_above_max_time_threshold_deltaIntegerNumber of new objects that exceeded the threshold between the last frame and this frame
<roi_label>.current_objects_countIntegerNumber of objects inside the ROI currently
<roi_label>.current_objectsArray of dictionariesInformation 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