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

PropertyDescriptionTypeDefaultRequired
trackerTracker. Options: High ({"type": "dcf"}); Medium ({"type": "klt"}); Low ({"type": "iou"}); Re-Id (High) ({"type": "deepsort"}).enum{"type": "dcf"}Yes
profileProfile. Options: Default (default); Stationary (stationary); Custom (custom).enumdefaultNo
custom_propertiesOptional tracker-specific tuning properties (only used when Profile is Custom). Conditional on profile being custom.jsonnullNo

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.

PathTypeDescription
objectsarrayValue of objects.
objects[].attributesarrayValue of attributes.
objects[].attributes[].class_idintegerValue of class id.
objects[].attributes[].labelstringValue of label.
objects[].attributes[].probabilitynumberValue of probability.
objects[].class_idintegerValue of class id.
objects[].idintegerValue of id.
objects[].labelstringValue of label.
objects[].probabilitynumberValue of probability.
objects[].rect.heightintegerValue of height.
objects[].rect.leftintegerValue of left.
objects[].rect.topintegerValue of top.
objects[].rect.widthintegerValue 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
      }
    }
  ]
}

Did this page help you?