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
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
roi_labels | Region of interest label | string | — | No |
rois | Region 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). | string | null | No |
object_types | ex. car,person,car.red. Comma-separated list of object types to measure speed. | model-labels | null | Yes |
speed_unit | Speed 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). | enum | pps | No |
speed_trigger_threshold_high | Set a high speed trigger when speed exceeds the high threshold. | float | 100.0 | Yes |
speed_trigger_threshold_low | Set a low speed trigger when speed is below the low threshold. | float | 20.0 | Yes |
speed_trigger_threshold_stationary | Set the object as stationary when speed is below the stationary threshold. | float | 0 | Yes |
objects_to_flag | Flag 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[] | null | No |
display_objects_mode | Display 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). | enum | triggered | No |
display_roi | Display ROI on video? | bool | true | No |
tracking_mode | Tracking mode. Options: Centroid (centroid); Top center (top-center); Bottom center (bottom-center); Left center (left-center); Right center (right-center). | enum | bottom-center | No |
analysis_window | Analyze the last n seconds of an object's motion to determine motion type. Unit: seconds. | float | 10.0 | No |
sensitivity | Higher sensitivity counts smaller movements as motion. Lower sensitivity counts only larger movements as motion. Range: minimum 0, maximum 100. Step: 1. | integer | 50 | No |
speed_labels_to_add | Add 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). | enum | all | No |
Output Metadata
The fields below are declared by this node's metadata schema; the JSON values are representative examples.
| Path | Type | Description |
|---|---|---|
nodes.<node_id>.rois.<roi_label>.average_speed | number | Average speed of tracked objects in the ROI. |
nodes.<node_id>.rois.<roi_label>.objects_stationary_count | integer | Number of currently stationary objects. |
nodes.<node_id>.rois.<roi_label>.objects_stationary_delta | integer | When one or more objects are newly classified as stationary |
nodes.<node_id>.rois.<roi_label>.objects_low_speed_count | integer | Number of objects currently in the low-speed range. |
nodes.<node_id>.rois.<roi_label>.objects_low_speed_delta | integer | When one or more objects are newly classified as low speed |
nodes.<node_id>.rois.<roi_label>.objects_medium_speed_count | integer | Number of objects currently in the medium-speed range. |
nodes.<node_id>.rois.<roi_label>.objects_medium_speed_delta | integer | When one or more objects are newly classified as medium speed |
nodes.<node_id>.rois.<roi_label>.objects_high_speed_count | integer | Number of objects currently in the high-speed range. |
nodes.<node_id>.rois.<roi_label>.objects_high_speed_delta | integer | When one or more objects are newly classified as high speed |
nodes.<node_id>.rois.<roi_label>.objects_flagged_count | integer | Number of objects currently matching this node’s alert criteria. |
nodes.<node_id>.rois.<roi_label>.objects_flagged_delta | integer | When one or more objects is newly flagged |
nodes.<node_id>.rois.<roi_label>.coords | array | Array of pixel coordinates defining the configured ROI or line. |
nodes.<node_id>.rois.<roi_label>.speeds[].id | integer | Tracked object ID. |
nodes.<node_id>.rois.<roi_label>.speeds[].speed | number | Most recently measured object speed. |
nodes.<node_id>.rois.<roi_label>.speeds[].category | string | Configured speed category assigned to the object. |
nodes.<node_id>.rois.<roi_label>.speeds[].motion_type | string | Motion state assigned to the object. |
nodes.<node_id>.rois.<roi_label>.objects_stationary | array | Array of tracking IDs of currently stationary objects. |
nodes.<node_id>.rois.<roi_label>.objects_low_speed | array | Array of tracking IDs of objects in the low-speed range. |
nodes.<node_id>.rois.<roi_label>.objects_medium_speed | array | Array of tracking IDs of objects in the medium-speed range. |
nodes.<node_id>.rois.<roi_label>.objects_high_speed | array | Array of tracking IDs of objects in the high-speed range. |
nodes.<node_id>.rois.<roi_label>.objects_flagged | array | Array of tracking IDs of objects currently matching this node’s alert criteria. |
nodes.<node_id>.rois.<roi_label>.objects_of_interest_keys | array | Array of metadata keys that contain object IDs relevant to downstream integrations. |
nodes.<node_id>.rois.<roi_label>.description | string | Human-readable summary of the node’s current result. |
nodes.<node_id>.type | string | Identifies 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, orspeed_high) use class12400; selected motion labels (motion_hover,motion_stop_and_go, ormotion_regular) use class12401.
Updated 20 days ago
Did this page help you?
