Filter Objects Node

Filters objects from the current frame metadata if they're within or outside a certain ROI area

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

PropertyValue
roi_labelsComma separated list of labels for each ROI in the rois list above.

Format: label1, label2

Ex: roi_entrance, street_name
roisSemicolon separated list of areas in the video within which the node tracks these objects.

Format: roi1_pt1_x,roi1_pt1_y,roi1_pt2_x,roi1_pt2_y,roi1_pt3_x,roi1_pt3_y;roi2_pt1_x,roi2_pt1_y,roi2_pt2_x,roi2_pt2_y,roi2_pt3_x,roi2_pt3_y
objects_to_trackComma separated list of Detected Object labels to operate on, as specified in Model Labels

ex. car, person

Accepted formats:
object_label: any object of this type, with or without a classifier attribute. Example: car

object_label.class_type: any object of this type that has a specific classifier attribute. Example: car.red

object_label.*: any object of this type that has at least one classifier attribute. Example: car.* (this will match car.red, car.yellow, etc)
filter_modeThe filter mode to be used. Keeps the objects for downstream nodes depending on whether object's centroid is within or outside the ROI area.

include_within_roi => Retain if object's centroid is within ROI

include_outside_roi => Retain if object's centroid is outside ROI

Ex: include_within_roi
display_roiBoolean. If true, ROI area will be drawn on video

Ex. true / false
display_objectsBoolean. If true, Removed Objects bounding box will be drawn on video

Ex. true / false
display_retained_objectsIf true, retained objects bounding boxes will be drawn on video

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.