General Filtering V2
Description
The operator iterates through each element in the Input list based on user-defined conditions, filters out elements that meet the conditions, and finally outputs a new list composed of these elements.
Overview
Filters elements in a list based on index or attributes and outputs a new list satisfying the conditions.
Scenarios
-
Filter by Attribute: When elements in the list are objects with multiple attributes (e.g., Detection results containing attributes like "Score", "Size", "Confidence", etc.), you can filter based on the value of any of these attributes. For example, filter out all targets with a score higher than 0.8.
-
Filter by Index: Filter based on the position (Index) of the element in the list. For example, keep only the first 10 elements in the list.
-
Data Cleaning: Remove data from the list that does not meet specific numerical standards or ranges.
Inputs and Outputs
Inputs |
Data to be judged: A list whose elements can be objects with attributes or basic data types. |
Outputs |
Filter Result: A new list containing only the elements from the input list that meet the filtering conditions. |
Parameters
Judge Condition
Description |
Defines the logical comparison relationship used during screening. |
Tuning Instructions |
Select the required comparison logic: Less than, Less than or equal to, Greater than, Greater than or equal to, Equal to, Not equal to. |
Parameter Range |
Values/Range:
Default: Equal To |
Judgment Threshold
Description |
The numerical value used to compare with the element’s attribute value to judge whether the condition is met. |
Tuning Instructions |
Input a specific value; the type should match the type of the selected "Internal element property". For example, if filtering by score, this value should be a number; if filtering by label, this value should be text. |
Parameter Range |
Default: 0 |
Difference Threshold
Description |
This parameter takes effect only when "Judgment condition" is set to "Equal to" and the attribute being compared is a numeric type. It is used to set an acceptable error range. When the difference between the element attribute value and the Judgment threshold is within this range, it is considered to meet the condition. |
Tuning Instructions |
|
Parameter Range |
Values/Range: [0, 100000] Default: 0 |
Comparison Object Type
Description |
Comparison object type. This parameter identifies the current data type of the instantiated input list and determines the dynamically generated comparison-attribute parameter. |
Parameter Range |
Default: List |
Comparison Attribute Name
Description |
This parameter is displayed dynamically based on the currently selected list type and specifies the field that actually participates in filtering. Available options typically include element Index, the Value itself, or internal attributes of the object. Choose the field that best represents your filtering condition, such as Index for keeping the first few elements in order, or a specific attribute for filtering by Confidence score, class, or Dimensions. |
Parameter Range |
Values/Range:
|