Track Attributes

Tracks attributes of objects and persists them across frames.

Overview

This node tracks the specified attributes for objects in the video. It can keep, remove or persist attributes from objects after they are seen for a certain duration. Use it to smoothen out object attributes when detections are intermittent.

Requires a AI Model Node before it in order to function properly. Having a Track Objects Node before is required if using Object Match Patterns else you can place it after the Merge Objects node.

Inputs & Outputs

  • Inputs : 1, Media Format : Raw Video
  • Outputs : 1, Media Format: Raw Video
  • Output Metadata : Filtered Objects Information

Properties

PropertyDescriptionTypeDefaultRequired
object_typesIf specified, only process objects of these types. Leave blank to process all objects.model-labelsnullNo
object_match_patternsOnly modify objects with IDs specified in the metadata attribute(s) defined by this pattern. Requires tracker prior to this node. Format: comma-separated metadata paths or patterns.stringnullNo
tracked_attributesFormat: <attribute> (specific attribute) or * (all attributes). Ex. wrong_direction,object_of_interest. Keep/remove the specified attributes from object after they are seen/not seen for a certain duration.stringnullYes
min_presence_secsOnly process objects/attributes that have been seen for at least this duration. Unit: seconds.float0No
attribute_buffer_secsKeep the Tracked attributes on a object until they are not seen for this duration. Unit: seconds.float0No
object_history_durationRemember objects for this duration after they are last seen in case they reappear. Unit: seconds.float600No

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": 100,
          "label": "hat",
          "probability": 0.8
        }
      ],
      "class_id": 1,
      "id": 101,
      "label": "person",
      "probability": 0.9,
      "rect": {
        "height": 100,
        "left": 20,
        "top": 20,
        "width": 50
      }
    },
    {
      "attributes": [
        {
          "class_id": 100,
          "label": "hat",
          "probability": 0.8
        }
      ],
      "class_id": 1,
      "id": 999,
      "label": "person",
      "probability": 0.9,
      "rect": {
        "height": 100,
        "left": 20,
        "top": 20,
        "width": 50
      }
    },
    {
      "attributes": [
        {
          "class_id": 100,
          "label": "vest",
          "probability": 0.8
        }
      ],
      "class_id": 1,
      "id": 404,
      "label": "person",
      "probability": 0.9,
      "rect": {
        "height": 100,
        "left": 20,
        "top": 20,
        "width": 50
      }
    }
  ]
}

Additional details

Object labels and attributes

  • Object labels/classes added: None.
  • Object attribute labels/classes added: Previously observed upstream attribute labels selected by attributes_to_track; restored entries use class 45000.

Did this page help you?