Speed Estimation

Estimates speeds of objects in a ROI and sets triggers based on low/high thresholds.

Overview

The Speed Estimation node estimates speeds of objects in a ROI and sets triggers based on low/high thresholds. This node makes it easy to build common use cases such as No running zones, traffic jams, 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 : Speed Information

Properties

PropertyDescriptionTypeDefaultRequired
roi_labelsRegion of interest labelstringNo
roisRegion of interest. Conditional on roi_labels. Format: comma-separated normalized x,y coordinate pairs; separate multiple polygons with semicolons (for example, 0.1,0.1,0.9,0.1,0.9,0.9).stringnullNo
object_typesex. car,person,car.red. Comma-separated list of object types to measure speed.model-labelsnullYes
speed_unitSpeed Unit. Options: Miles per hour (mph): Requires using the Camera Calibration node before this node; Kilometers per hour (kmph): Requires using the Camera Calibration node before this node; Pixels per hour (pph): Deprecated. Use pixels per second instead; Pixels per second (pps).enumppsNo
speed_trigger_threshold_highSet a high speed trigger when speed exceeds the high threshold.float100.0Yes
speed_trigger_threshold_lowSet a low speed trigger when speed is below the low threshold.float20.0Yes
speed_trigger_threshold_stationarySet the object as stationary when speed is below the stationary threshold.float0Yes
objects_to_flagFlag specified object classes so you can trigger downstream events using those. Options: Low speed (low); Medium speed (medium); High speed (high); Stationary speed (stationary); Regular Motion (regular); Stop-and-go Motion (stop_and_go); Hover Motion (hover). Format: array of selected option values.string[]nullNo
display_objects_modeDisplay objects on video. Options: None (none); High/Low Speed (triggered); Stationary speed (stationary); Regular Motion (regular); Stop-and-go or Hover Motion (irregular); Flagged objects (flagged); All (all).enumtriggeredNo
display_roiDisplay ROI on video?booltrueNo
tracking_modeTracking mode. Options: Centroid (centroid); Top center (top-center); Bottom center (bottom-center); Left center (left-center); Right center (right-center).enumbottom-centerNo
analysis_windowAnalyze the last n seconds of an object's motion to determine motion type. Unit: seconds.float10.0No
sensitivityHigher sensitivity counts smaller movements as motion. Lower sensitivity counts only larger movements as motion. Range: minimum 0, maximum 100. Step: 1.integer50No
speed_labels_to_addAdd the speed category or motion type to the object's classes. Use it to filter objects or report on them. Options: None (none); Speed Category (stationary/low/medium/high) (speed_category); Motion Type (hover/stop-and-go/regular) (motion_type); All (all).enumallNo

Output Metadata

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

PathTypeDescription
nodes.<node_id>.rois.<roi_label>.average_speednumberAverage speed of tracked objects in the ROI.
nodes.<node_id>.rois.<roi_label>.objects_stationary_countintegerNumber of currently stationary objects.
nodes.<node_id>.rois.<roi_label>.objects_stationary_deltaintegerWhen one or more objects are newly classified as stationary
nodes.<node_id>.rois.<roi_label>.objects_low_speed_countintegerNumber of objects currently in the low-speed range.
nodes.<node_id>.rois.<roi_label>.objects_low_speed_deltaintegerWhen one or more objects are newly classified as low speed
nodes.<node_id>.rois.<roi_label>.objects_medium_speed_countintegerNumber of objects currently in the medium-speed range.
nodes.<node_id>.rois.<roi_label>.objects_medium_speed_deltaintegerWhen one or more objects are newly classified as medium speed
nodes.<node_id>.rois.<roi_label>.objects_high_speed_countintegerNumber of objects currently in the high-speed range.
nodes.<node_id>.rois.<roi_label>.objects_high_speed_deltaintegerWhen one or more objects are newly classified as high speed
nodes.<node_id>.rois.<roi_label>.objects_flagged_countintegerNumber of objects currently matching this node’s alert criteria.
nodes.<node_id>.rois.<roi_label>.objects_flagged_deltaintegerWhen one or more objects is newly flagged
nodes.<node_id>.rois.<roi_label>.coordsarrayArray of pixel coordinates defining the configured ROI or line.
nodes.<node_id>.rois.<roi_label>.speeds[].idintegerTracked object ID.
nodes.<node_id>.rois.<roi_label>.speeds[].speednumberMost recently measured object speed.
nodes.<node_id>.rois.<roi_label>.speeds[].categorystringConfigured speed category assigned to the object.
nodes.<node_id>.rois.<roi_label>.speeds[].motion_typestringMotion state assigned to the object.
nodes.<node_id>.rois.<roi_label>.objects_stationaryarrayArray of tracking IDs of currently stationary objects.
nodes.<node_id>.rois.<roi_label>.objects_low_speedarrayArray of tracking IDs of objects in the low-speed range.
nodes.<node_id>.rois.<roi_label>.objects_medium_speedarrayArray of tracking IDs of objects in the medium-speed range.
nodes.<node_id>.rois.<roi_label>.objects_high_speedarrayArray of tracking IDs of objects in the high-speed range.
nodes.<node_id>.rois.<roi_label>.objects_flaggedarrayArray of tracking IDs of objects currently matching this node’s alert criteria.
nodes.<node_id>.rois.<roi_label>.objects_of_interest_keysarrayArray of metadata keys that contain object IDs relevant to downstream integrations.
nodes.<node_id>.rois.<roi_label>.descriptionstringHuman-readable summary of the node’s current result.
nodes.<node_id>.typestringIdentifies the node type that produced this metadata.

JSON example

{
  "nodes": {
    "annotate_speed1": {
      "rois": {
        "roi1": {
          "average_speed": 0.0,
          "coords": [],
          "description": "value",
          "objects_flagged": [object_id1, object_id2...],
          "objects_flagged_count": 0,
          "objects_flagged_delta": 0,
          "objects_high_speed": [object_id1, object_id2...],
          "objects_high_speed_count": 0,
          "objects_high_speed_delta": 0,
          "objects_low_speed": [object_id1, object_id2...],
          "objects_low_speed_count": 0,
          "objects_low_speed_delta": 0,
          "objects_medium_speed": [object_id1, object_id2...],
          "objects_medium_speed_count": 0,
          "objects_medium_speed_delta": 0,
          "objects_of_interest_keys": [],
          "objects_stationary": [object_id1, object_id2...],
          "objects_stationary_count": 0,
          "objects_stationary_delta": 0,
          "speeds": [
            {
              "category": "value",
              "id": 0,
              "motion_type": "value",
              "speed": 0.0
            }
          ]
        }
      },
      "type": "annotate_speed"
    }
  }
}

Object labels and attributes

  • Object labels/classes added: None.
  • Object attribute labels/classes added: Selected speed labels (speed_stationary, speed_low, speed_medium, or speed_high) use class 12400; selected motion labels (motion_hover, motion_stop_and_go, or motion_regular) use class 12401.

Did this page help you?