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_deltaandfiltered_object_exited_deltametadata 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 | Filter mode. Options: Retain if within ROI (include_within_roi); Retain if outside ROI (include_outside_roi); Retain if new or updated (new_or_updated_objects); Retain if matches a pattern (pattern_matched_objects); Retain if outside other object (include_outside_object); Retain if within other object (include_inside_object); Retain if contains other object (include_contains_object); Retain if does not contain other object (include_not_contains_object). | enum | include_within_roi | No |
roi_labels | Regions of interest labels | string | — | No |
rois | Regions of interest. Conditional on roi_labels. Format: comma-separated normalized x,y coordinate pairs; separate multiple polygons with semicolons (for example, 0.1,0.1,0.9,0.1,0.9,0.9). | string | null | No |
source_node_id | If specified, only process objects generated by the specified source node. Removes objects from other nodes. Accepted node type: model_inference. | string | null | No |
objects_to_track | ex. car,person,car.red. Object types to process. Objects that are not specified will be removed/kept depending on Object processing mode. Leave blank to process all. | model-labels | null | No |
object_min_threshold | Retain objects which have confidence above this threshold. Range: minimum 0, maximum 1.0. Step: 0.1. | float | null | No |
object_max_threshold | Retain objects which have confidence below this threshold. Range: minimum 0, maximum 1.0. Step: 0.1. | float | null | No |
object_min_size | Retain objects which have height and width greater than this value in pixels. Range: minimum 0, maximum 1920. Step: 16. Unit: pixels. | integer | null | No |
object_id_pattern | Retain objects with IDs specified in the pattern. Conditional on filter_mode being pattern_matched_objects. | string | null | No |
other_object_types | ex. car,person,car.red. 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-labels | null | 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 (remove_non_specified_objects): Remove objects other than specified Object types to process; Keep non-specified (keep_non_specified_objects): Keep objects other than specified Object types to process. | enum | remove_non_specified_objects | No |
tracking_mode | Object tracking mode. Options: Centroid (centroid); Top center (top-center); Bottom center (bottom-center); Left center (left-center); Right center (right-center). | enum | centroid | No |
object_contain_mode | Object containment mode. Options: Bounding Box (bbox): Bounding box inside other object's bounding box; Tracking Point (centroid): Selected tracking point (above) inside other object's bounding box. | enum | centroid | No |
Output Metadata
The fields below are declared by this node's metadata schema; the JSON values are representative examples.
| Path | Type | Description |
|---|---|---|
nodes.<node_id>.filtered_object_count | integer | Current total number of removed objects |
nodes.<node_id>.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. |
nodes.<node_id>.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. |
nodes.<node_id>.retained_object_count | integer | Current total number of retained objects |
nodes.<node_id>.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. |
nodes.<node_id>.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. |
nodes.<node_id>.filtered_objects | array | Array of tracking IDs of objects removed by the configured filters. |
nodes.<node_id>.type | string | Identifies the node type that produced this metadata. |
JSON example
{
"nodes": {
"filter_objects1": {
"filtered_object_count": 0,
"filtered_object_entered_delta": 0,
"filtered_object_exited_delta": 0,
"filtered_objects": [],
"retained_object_added_delta": 0,
"retained_object_count": 0,
"retained_object_removed_delta": 0,
"type": "filter_objects"
}
}
}Updated 6 days ago
Did this page help you?
