Modify and Merge Objects

Merges and modifies objects, changes object bbox sizes & attributes, and allows rename and grouping of class names

Overview

This node can be used if you want to merge bounding boxes of objects of the same class, or rename one or more object classes into a specific class, or modify the object's attributes'.

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. ex. car,person,car.redmodel-labelnullfalse
object_match_patternsModify objects with IDs specified in the metadata attribute(s) defined by this pattern. Requires tracker prior to this node. ex. nodes...*.cur_dir1_objectsmetadata-listnullfalse
processing_modeObject processing mode. Options: continuous (Process objects continuously after they match type/patterns specified at least once), matched (Process objects only for frames where they match the type/patterns specified)enumcontinuousfalse
min_presence_secsOnly process objects/attributes that have been seen for at least this duration. Conditional on processing_mode being set to continuous.float0false
rename_objects_toRename object types specified using object types above. If object types are specified, number of renamed objects must match number of object types.stringnullfalse
add_object_attributesAdd the specified attributes to the object, keeping any attributes it already has. Format: <attribute> or <attribute>=<class_id>. Ex. wrong_way,object_of_interest=6700stringnullfalse
remove_object_attributesRemove the specified attributes from the object. Format: <attribute>. Ex. wrong_way,object_of_intereststringnullfalse
replace_object_attributesReplace all the object attributes with the ones specified. Format: <attribute> or <attribute>=<class_id>. Ex. wrong_way,object_of_interest=6700stringnullfalse
scale_factorGrows/shrinks the bounding box of the objects by this factor. Does not resize the object itself. Min: 0, Max: 10.0, Step: 0.1slider1.0false
overlap_thresholdMerges all overlapping objects with overlap ratio (Intersection over Union (IoU)) above this threshold. Min: 0, Max: 1.0, Step: 0.05slider-optionalnullfalse
display_objectsIf enabled, objects removed as a result of the merge will be drawn on video for debug purposes.boolfalsefalse
object_history_durationRemember objects for this duration after they are last seen in case they reappear.float600false

Intersection over Union (IoU)

IoU (Intersection over Union) is the area of overlap between two detection bounding boxes divided by the area of union of both.

300 448