ComfyUI  >  Nodes  >  ComfyUI Impact Pack >  SEGS Filter (ordered)

ComfyUI Node: SEGS Filter (ordered)

Class Name

ImpactSEGSOrderedFilter

Category
ImpactPack/Util
Author
Dr.Lt.Data (Account age: 458 days)
Extension
ComfyUI Impact Pack
Latest Updated
6/19/2024
Github Stars
1.4K

How to Install ComfyUI Impact Pack

Install this extension via the ComfyUI Manager by searching for  ComfyUI Impact Pack
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Impact Pack in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Cloud for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

SEGS Filter (ordered) Description

Organize and filter segmented elements based on specific criteria to manage and prioritize relevant elements effectively.

SEGS Filter (ordered):

The ImpactSEGSOrderedFilter node is designed to help you organize and filter segmented elements (SEGS) based on specific criteria. This node allows you to sort SEGS by various attributes such as area, width, height, and confidence, among others. By specifying the order and the range of SEGS to take, you can effectively manage and prioritize the elements that are most relevant to your project. This functionality is particularly useful in scenarios where you need to focus on the most significant segments or when you want to streamline your workflow by filtering out less important elements.

SEGS Filter (ordered) Input Parameters:

target

This parameter specifies the attribute by which the SEGS will be sorted. Options include "area(=wh)", "width", "height", "x1", "y1", "x2", "y2", and "confidence". Each option targets a different aspect of the SEGS, allowing you to sort them based on the chosen attribute. For example, selecting "area(=wh)" will sort the SEGS by their area, while "confidence" will sort them by their confidence score.

order

This boolean parameter determines the sorting order. If set to True, the SEGS will be sorted in descending order, meaning the highest values will come first. If set to False, the SEGS will be sorted in ascending order, with the lowest values first. The default value is True.

take_start

This integer parameter specifies the starting index from which SEGS will be taken after sorting. It allows you to skip a certain number of SEGS from the beginning of the sorted list. The default value is 0, with a minimum value of 0 and no specified maximum value.

take_count

This integer parameter defines the number of SEGS to take starting from the take_start index. It allows you to limit the number of SEGS that are selected after sorting. The default value is 1, with a minimum value of 0 and no specified maximum value.

SEGS Filter (ordered) Output Parameters:

DETAILER_HOOK

The output of this node is a DETAILER_HOOK, which is a specialized hook that can be used in subsequent processing steps. This hook contains the filtered and sorted SEGS based on the specified input parameters, allowing for further manipulation or analysis in your workflow.

SEGS Filter (ordered) Usage Tips:

  • To focus on the largest segments in your project, set the target parameter to "area(=w*h)" and the order parameter to True.
  • If you are only interested in the top 5 segments based on confidence, set the target to "confidence", order to True, take_start to 0, and take_count to 5. - Use the take_start parameter to skip initial segments that may not be relevant to your analysis, especially in large datasets.

SEGS Filter (ordered) Common Errors and Solutions:

Unexpected target '<target>'

  • Explanation: This error occurs when an invalid target attribute is specified.
  • Solution: Ensure that the target parameter is set to one of the valid options: "area(=w*h)", "width", "height", "x1", "y1", "x2", "y2", or "confidence".

Index out of range

  • Explanation: This error may occur if the take_start or take_count parameters are set in a way that exceeds the number of available SEGS.
  • Solution: Verify that the values for take_start and take_count are within the range of the total number of SEGS after sorting. Adjust these values accordingly to avoid exceeding the list bounds.

SEGS Filter (ordered) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Impact Pack
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.