Object Flow Counter

Provides a breakdown of object types that cross a line or a sequence of lines from the Line Crossing Counter.

Overview

The Object Flow Counter node provides a breakdown of specific object types that cross a line or a sequence of lines defined by a Line Crossing Counter node prior to it. This node makes it easy to build common use cases such as People flow mapping in retail environments, Traffic intersection analysis, etc.

This node requires a Line Crossing Counter before it in order to function properly.

Inputs & Outputs

  • Inputs : 1, Media Format : Raw Video
  • Outputs : 1, Media Format: Raw Video
  • Output Metadata : Line Counter Information

Properties

PropertyDescriptionTypeDefaultRequired
object_typesex. car,person,face.mask. Comma-separated list of object types to consider.model-labelsnullYes
object_flow_rulesComma-separated list of labels of lines (ex line_entrance), line pairs (ex lineA+lineB), lines with direction labels (ex lineA:dir1) or direction labels (ex dir1) from previous Line Crossing Counter nodes that an object must cross through to be counted. If empty, counts across all lines.stringnullNo
line_distanceOptional physical distance between two lines used to calculate object speeds for multi-line rules.numbernullNo
line_distance_unitUnit for line distance conversion when calculating speed. Options: Meters (kmph) (meters); Feet (mph) (feet).enumfeetNo
reset_triggerAccumulate crossed object counts until this condition evaluates to true.trigger-conditionnullNo
displayDisplay. Options: None (none); Basic (basic).enumbasicNo

Notes:

  • Use the reset_trigger to reset object counts when this condition evaluates to true. ex. nodes.time_trigger1.triggered. Use it in combination with a Time Trigger to accumulate statistics over a regular interval like 5 minutes.

Output Metadata

The fields below are declared by this node's metadata schema; the JSON values are representative examples.

PathTypeDescription
nodes.<node_id>.total_objects_crossed_deltaintegerNumber of objects seen crossing all monitored rules between last frame and this frame
nodes.<node_id>.total_objects_crossed_countintegerNumber of objects seen crossing all monitored rules since last time stats were reset
nodes.<node_id>.lines.<object_flow_rule>.total_objects_crossed_deltaintegerNumber of objects seen crossing all monitored rules between last frame and this frame
nodes.<node_id>.lines.<object_flow_rule>.total_objects_crossed_countintegerNumber of objects seen crossing all monitored rules since last time stats were reset
nodes.<node_id>.lines.<object_flow_rule>.object_crossed_deltas.<object_label>stringWhen one or more objects of this label cross the specified rule
nodes.<node_id>.lines.<object_flow_rule>.object_crossed_counts.<object_label>stringCumulative crossing count for this object label.
nodes.<node_id>.lines.<object_flow_rule>.object_speeds_min.<object_label>stringMinimum measured speed for this object label.
nodes.<node_id>.lines.<object_flow_rule>.object_speeds_max.<object_label>stringMaximum measured speed for this object label.
nodes.<node_id>.lines.<object_flow_rule>.object_speeds_avg.<object_label>stringAverage measured speed for this object label.
nodes.<node_id>.lines.<object_flow_rule>.crossed_objectsarrayArray of tracking IDs for objects that crossed this flow rule.
nodes.<node_id>.lines.<object_flow_rule>.speed_unitstringUnit used for reported object speeds.
nodes.<node_id>.typestringIdentifies the node type that produced this metadata.

JSON example

{
  "nodes": {
    "object_flow1": {
      "lines": {
        "object_flow_rule": {
          "crossed_objects": [ <object_tracking_id>,<object_tracking_id> ],
          "object_crossed_counts": {
            "object_label": "example"
          },
          "object_crossed_deltas": {
            "object_label": "example"
          },
          "object_speeds_avg": {
            "object_label": "example"
          },
          "object_speeds_max": {
            "object_label": "example"
          },
          "object_speeds_min": {
            "object_label": "example"
          },
          "speed_unit": "mph",
          "total_objects_crossed_count": 0,
          "total_objects_crossed_delta": 0
        }
      },
      "total_objects_crossed_count": 0,
      "total_objects_crossed_delta": 0,
      "type": "object_flow"
    }
  }
}

Object labels and attributes

  • Object labels/classes added: None.
  • Object attribute labels/classes added: Line-crossing labels use class 12000; calculated speed values use class 12001.

Did this page help you?