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. ex. nodes...*.cur_dir1_objectsmetadata-listnullfalse
processing_modeProcess objects continuously after they match type/patterns specified at least once or only when they match the type/patterns specified. Options: continuous, matchedenumcontinuousfalse
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. ex. wrong_way,stoppedstringnullfalse
remove_object_attributesRemove the specified attributes from the object. ex. wrong_way,redstringnullfalse
replace_object_attributesReplace all the object attributes with the ones specified. ex. wrong_direction,object_of_intereststringnullfalse
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. ex. true / falseboolfalsefalse
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