Track Objects
Track detected objects and assign a unique identifier to each new object
Overview
Use the Track Objects node after a AI Model Node to track any detected objects across the video frames. This node assigns unique identifiers to each object and persists them across video frames.
These unique identifiers can be used, for example, to:
- determine the presence of a new object in the video
- count the number of unique objects crossing an imaginary line in the scene
- determine the velocity of an object (or aggregate objects)
- determine how long a particular object has been in the scene (for instance, to detect loitering)
Caveats: The tracker only tracks objects that continue to appear in consecutive video frames - so if an object disappears from the video and then reappears some time later, it will be tracked as a new object at that time.
This node adds tracking IDs and (if needed) interpolated tracked objects to the metadata; these may be displayed on the stream using the Overlay Node or processed using the Function Node.
Inputs & Outputs
- Inputs: 1, Media Format: Raw or Multiplexed Video
- Outputs: Raw or Multiplexed Video (same as Input format)
- Output Metadata: Object ID, Interpolated Tracked Objects
Properties
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
tracker | Tracker. Options: High ({"type": "dcf"}); Medium ({"type": "klt"}); Low ({"type": "iou"}); Re-Id (High) ({"type": "deepsort"}). | enum | {"type": "dcf"} | Yes |
profile | Profile. Options: Default (default); Stationary (stationary); Custom (custom). | enum | default | No |
custom_properties | Optional tracker-specific tuning properties (only used when Profile is Custom). Conditional on profile being custom. | json | null | No |
Tracker Types:
- High : This is the most accurate, but computationally intensive tracking method. Highly robust against partial occlusions, shadow, and other transient visual changes. Less frequent ID switches.
- Medium : Works reasonably well for simple scenes. Susceptible to change in the visual appearance due to noise and perturbations, such as shadow, non-rigid deformation, out-of-plane rotation, and partial occlusion. Cannot work on objects with low textures.
- Low : Least computationally intensive tracking method. No visual features for matching, so prone to frequent tracker ID switches and failures. Not suitable for fast moving scene.
Custom Properties
| Property | Description | Type | Default | Required |
| custom_properties.min_iou_diff | Minimum difference in IOU scores to consider objects distinct. Range 0.0 - 1.0 | float | null | No |
| custom_properties.min_iou_score | Minimum IOU score to keep a tracked object. Range 0.0 - 1.0 | float | null | No |
| custom_properties.activation_age | Number of frames an object must persist before being tracked. | integer | null | No |
| custom_properties.max_targets_per_stream | Maximum number of objects to track concurrently per stream. | integer | null | No |
| custom_properties.min_tracker_confidence | Minimum confidence required for tracker output. Range 0.0 - 1.0 | float | null | No |
| custom_properties.max_shadow_tracking_age | Maximum missed frames before a disappeared object is considered lost. | integer | null | No |
| custom_properties.min_visual_similarity_score | Minimum visual similarity score for object association. Range 0.0 - 1.0 | float | null | No |
Output Metadata
The fields below are declared by this node's metadata schema; the JSON values are representative examples.
| Path | Type | Description |
|---|---|---|
objects | array | Value of objects. |
objects[].attributes | array | Value of attributes. |
objects[].attributes[].class_id | integer | Value of class id. |
objects[].attributes[].label | string | Value of label. |
objects[].attributes[].probability | number | Value of probability. |
objects[].class_id | integer | Value of class id. |
objects[].id | integer | Value of id. |
objects[].label | string | Value of label. |
objects[].probability | number | Value of probability. |
objects[].rect.height | integer | Value of height. |
objects[].rect.left | integer | Value of left. |
objects[].rect.top | integer | Value of top. |
objects[].rect.width | integer | Value of width. |
JSON example
{
"objects": [
{
"attributes": [
{
"class_id": 0,
"label": "example",
"probability": 0.9
}
],
"class_id": 0,
"id": 1,
"label": "person",
"probability": 0.95,
"rect": {
"height": 320,
"left": 120,
"top": 80,
"width": 160
}
}
]
}Updated about 22 hours ago
