Filter Objects

Filter objects based on their presence within or outside a Region of interest.

Overview

This node can be used if you want to remove objects to process on downstream pipeline nodes based on their current position on image.

Requires a AI Model Node before it in order to function properly. Having a Track Objects Node before is optional, but it's required to get proper results on filtered_object_entered_delta and filtered_object_exited_delta metadata fields.

Inputs & Outputs

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

Properties

PropertyDescriptionTypeDefaultRequired
filter_modeThe filter mode to be used. Options:
include_within_roi (Retain if within ROI),
include_outside_roi (Retain if outside ROI),
new_or_updated_objects (Retain if new or updated),
pattern_matched_objects (Retain if matches a pattern),
include_outside_object (Retain if outside other object), include_inside_object (Retain if within other object),
include_contains_object (Retain if contains other object),
include_not_contains_object (Retain if does not contain other object)
enuminclude_within_roiYes
roi_labelsRegions of interest labels.hiddenNoneYes
roisRegions of interest. This property is conditional on roi_labelspolygonNoneYes
source_node_idSource node to process. If specified, only process objects generated by the specified source node. Removes objects from other nodes.nodeNoneNo
objects_to_trackObject types to process. Objects that are not specified will be removed/kept depending on Object processing mode. Leave blank to process all.model-labelNoneNo
object_min_thresholdRetain objects which have confidence above this threshold.slider-optionalNoneNo
object_max_thresholdRetain objects which have confidence below this threshold.slider-optionalNoneNo
object_id_patternMetadata pattern to match. Retain objects with IDs specified in the pattern. This property is conditional on filter_mode being set to pattern_matched_objectsstringNoneNo
other_object_typesRetain objects within/outside/contain/not contain these object types. Only applies when filter mode is include_inside_object, include_outside_object, include_contains_object or include_not_contains_object.model-labelNoneNo
display_roiDisplay ROI on video?boolfalseNo
display_objectsDisplay removed objects on video?boolfalseNo
display_retained_objectsDisplay retained objects on video?boolfalseNo
object_processing_modeRemove or keep objects other than specified types to process. Options: remove_non_specified_objects (Remove non-specified), keep_non_specified_objects (Keep non-specified)enumremove_non_specified_objectsNo
tracking_modeObject tracking mode. Options: centroid, top-center, bottom-center, left-center, right-centerenumcentroidNo
object_contain_modeObject containment mode. Options: bbox (Bounding Box inside other object's bbox), centroid (Selected tracking point inside other object's bbox)enumcentroidNo

Metadata

Metadata PropertyDescription
nodes.<node_id>Describes the Filtered objects by this node, and their properties. Format : as defined in the table below. <node_id> for Filter Object Nodes is of the form filter_objectsX (ex. filter_objects1)

Example

"nodes": {
    "filter_objects1": {
        "type": "filter_objects",
        "filtered_objects": { ... },
        "filtered_object_count": <int>,
        "retained_object_count": <int>,
        "filtered_object_entered_delta": <int>,
        "filtered_object_exited_delta": <int>,
        "retained_object_added_delta": <int>,
        "retained_object_removed_delta": <int>
    }
}

Format

KeyTypeDescription
<filtered_objects>Array of dictionariesInformation about the objects removed from ROI
filtered_object_countIntegerCurrent total number of removed objects
retained_object_countintegerCurrent total number of retained objects
filtered_object_entered_deltaIntegerNumber of objects that entered the filtered_objects list between last frame and the current frame. Note: Requires an upstream Track Objects Node. Else this property will be set to 0.
filtered_object_exited_deltaIntegerNumber of objects that left the filtered_objects list between last frame and the current frame. Note: Requires an upstream Track Objects Node. Else this property will be set to 0.
retained_object_added_deltaintegerNumber of objects that were added to the retain list between last frame and the current frame. Note: Requires an upstream Track Objects Node. Else this property will be set to 0.
retained_object_removed_deltaintegerNumber of objects that were removed from the retain list between last frame and the current frame. Note: Requires an upstream Track Objects Node. Else this property will be set to 0.