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
andfiltered_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
Property | Description | Type | Default | Required |
---|---|---|---|---|
filter_mode | The 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) | enum | include_within_roi | Yes |
roi_labels | Regions of interest labels. | hidden | None | Yes |
rois | Regions of interest. This property is conditional on roi_labels | polygon | None | Yes |
source_node_id | Source node to process. If specified, only process objects generated by the specified source node. Removes objects from other nodes. | node | None | No |
objects_to_track | Object types to process. Objects that are not specified will be removed/kept depending on Object processing mode. Leave blank to process all. | model-label | None | No |
object_min_threshold | Retain objects which have confidence above this threshold. | slider-optional | None | No |
object_max_threshold | Retain objects which have confidence below this threshold. | slider-optional | None | No |
object_id_pattern | Metadata pattern to match. Retain objects with IDs specified in the pattern. This property is conditional on filter_mode being set to pattern_matched_objects | string | None | No |
other_object_types | Retain 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-label | None | No |
display_roi | Display ROI on video? | bool | false | No |
display_objects | Display removed objects on video? | bool | false | No |
display_retained_objects | Display retained objects on video? | bool | false | No |
object_processing_mode | Remove or keep objects other than specified types to process. Options: remove_non_specified_objects (Remove non-specified), keep_non_specified_objects (Keep non-specified) | enum | remove_non_specified_objects | No |
tracking_mode | Object tracking mode. Options: centroid , top-center , bottom-center , left-center , right-center | enum | centroid | No |
object_contain_mode | Object containment mode. Options: bbox (Bounding Box inside other object's bbox), centroid (Selected tracking point inside other object's bbox) | enum | centroid | No |
Metadata
Metadata Property | Description |
---|---|
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
Key | Type | Description |
---|---|---|
<filtered_objects> | Array of dictionaries | Information about the objects removed from ROI |
filtered_object_count | Integer | Current total number of removed objects |
retained_object_count | integer | Current total number of retained objects |
filtered_object_entered_delta | Integer | Number 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_delta | Integer | Number 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_delta | integer | Number 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_delta | integer | Number 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. |
Updated 2 months ago