Visit ComfyUI Online for ready-to-use ComfyUI environment
Filter segments based on criteria, refining and controlling processed segments by evaluating and filtering against specified range.
The ImpactSEGSRangeFilter node is designed to filter segments (SEGS) based on specific criteria, allowing you to refine and control the segments that are processed further. This node evaluates each segment against a defined target attribute, such as area, width, height, or confidence, and filters them based on whether they fall within or outside a specified range. This functionality is particularly useful for AI artists who need to manage and manipulate image segments with precision, ensuring that only segments meeting certain criteria are included in subsequent operations. By using this node, you can streamline your workflow and achieve more accurate and targeted results in your AI art projects.
The target
parameter specifies the attribute of the segment that will be evaluated for filtering. Options include "area(=wh)", "width", "height", "x1", "y1", "x2", "y2", and "length_percent". Each option corresponds to a different aspect of the segment's geometry or confidence level. For example, selecting "area(=wh)" will filter segments based on their area, while "confidence(0-100)" will filter based on the confidence score of the segment. This parameter is crucial as it determines the basis on which segments are filtered.
The mode
parameter is a boolean that determines the filtering logic. When set to True
(inside mode), segments with target values within the specified range (min_value to max_value) are included. When set to False
(outside mode), segments with target values outside the specified range are included. This parameter allows you to control whether you want to keep segments within a certain range or exclude them.
The min_value
parameter defines the minimum value of the target attribute for filtering. Segments with target values below this threshold will be excluded (or included if mode is set to False
). This parameter helps in setting the lower bound for the filtering criteria. The default value is 0, and it can be adjusted based on the specific requirements of your project.
The max_value
parameter sets the maximum value of the target attribute for filtering. Segments with target values above this threshold will be excluded (or included if mode is set to False
). This parameter helps in setting the upper bound for the filtering criteria. The default value is 67108864, providing a wide range that can be narrowed down as needed.
The output parameter SEGS
returns the filtered segments. This output consists of the segments that meet the specified criteria based on the target attribute and the defined range. The filtered segments can then be used in subsequent nodes for further processing or analysis. This output is essential for ensuring that only the desired segments are passed along in your workflow, enhancing the precision and effectiveness of your AI art projects.
target
parameter to "area(=w*h)" and adjust the min_value
and max_value
to define the acceptable range of segment areas.mode
parameter to switch between including segments within a range (inside mode) or excluding them (outside mode), depending on your specific needs.target
to "confidence(0-100)" to filter segments based on their confidence levels, ensuring that only high-confidence segments are included in your results.<target>
'target
parameter.target
parameter is set to one of the valid options: "area(=w*h)", "width", "height", "x1", "y1", "x2", "y2", or "length_percent".min_value
parameter is set to a value greater than the max_value
parameter.min_value
and max_value
parameters to ensure that min_value
is less than or equal to max_value
.target
parameter is not provided as a string.target
parameter is specified as a string, using one of the valid options.mode
parameter is not provided as a boolean.mode
parameter is specified as a boolean value (True
or False
).© Copyright 2024 RunComfy. All Rights Reserved.