ReIdentify Objects

Reidentify objects by comparing signatures generated by a ReId model. Overwrites object tracking ids when match found.

Overview

The ReIdentify Objects node allows for reidentifying objects by comparing signatures generated by a ReId model. This functionality is useful for applications requiring accurate object tracking across different frames or scenes.

Inputs & Outputs

  • Input media: Raw Video.
  • Output media: Raw Video.
  • Output metadata: updated objects[].id values and objects[].reid_match_info.

Pipeline usage

Place object detection, Track Objects, and a ReID model-inference node before this node. The selected ReID model must attach a compatible embedding tensor to each object; detections without embeddings cannot be matched. This node may replace the tracker's current object ID with an earlier identity, so downstream nodes that rely on stable IDs should come after it. Start with a conservative reid_threshold, validate false matches on representative video, and shorten max_object_lifespan when identities should not persist through long absences. Attribute matching is a supplemental signal and is useful only when upstream classifiers produce reliable attributes.

Properties

PropertyDescriptionTypeDefaultRequired
objects_to_reidex. car,person,car.red`. Object types to process. Leave blank to process all.model-labelsnullNo
object_src_nodeIf specified, only process objects generated by the specified source node. Accepted node type: model_inference.stringnullNo
reid_model_nodeNode that contains the reidentification model. Accepted node type: model_inference.stringnullYes
reid_comparison_methodReId comparison method. Options: Cosine (cosine); Adaptive Angular Margin Loss (additive_angular_margin_loss).enumcosineNo
reid_thresholdOnly consider objects with similarity above this threshold as a ReId match. Range: minimum 0, maximum 1.0. Step: 0.05.float0.5Yes
match_attributesMatch object attributesboolfalseNo
min_attributes_to_matchMinimum number of attributes that must match to consider two objects as the same. Conditional on match_attributes being true. Unit: attributes.number0No
attribute_weightOverall match Score = ReId Score + Attribute match score. Attribute match score = Weight * # of matching attributes / max # of matching attributes. Weight factor for attribute matches when computing match score. Conditional on match_attributes being true.float1.0No
max_object_lifespanMax. object lifespan. Unit: seconds.float300No
debugIf enabled, debug information will be displayed on objects.boolfalseNo

Output Metadata

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

This node will update Object id for existing objects in the objects metadata when it finds a match with previously seen objects.
It will also add a reid_match_info property to existing objects that it processes with reid info.

PathTypeDescription
objectsarrayValue of objects.
objects[].attributesdictionaryObject's classes, as identified by Classifier models chained to this Object Detection model. Contains: label : Class label, probability : Probability, class_id : Unique id for the class' label
objects[].attributes[].class_idintUnique id for this object's label.
objects[].attributes[].labelstringLabel for this object as outlined in Model Labels
objects[].attributes[].probabilityfloatProbability of detection
objects[].class_idintUnique id for this object's label.
objects[].idlong intA unique ID assigned to this object by a Track Objects Node, and replaced by this node
objects[].labelstringLabel for this object as outlined in Model Labels
objects[].probabilityfloatProbability of detection
objects[].rect.heightintegerValue of height.
objects[].rect.leftintegerValue of left.
objects[].rect.topintegerValue of top.
objects[].rect.widthintegerValue of width.
objects[].reid_match_info.orig_idintegerOriginal ID that was replaced for matched and quick_match objects
objects[].reid_match_info.scorenumberMatch score for matched and validated quick_match objects
objects[].reid_match_info.typestringOptions : in_db (object with this id was found in db), matched (Re-id signature matched with db entry), quick_match (ID matched with a previous object that was signature matched)

JSON example

{
  "objects": [
    {
      "attributes": [
        {
          "class_id": 10,
          "label": "white",
          "probability": 0.9437
        }
      ],
      "class_id": 0,
      "id": 5750484150146564100,
      "label": "car",
      "probability": 0.7,
      "rect": {
        "height": 25,
        "left": 656,
        "top": 201,
        "width": 47
      },
      "reid_match_info": {
        "orig_id": 1218897777140957201,
        "score": 0.838,
        "type": "quick_match"
      }
    }
  ]
}

Did this page help you?