Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates mask creation using segmentation and detection techniques for precise image manipulation by AI artists.
The SAMDetectorCombined
node is designed to facilitate the creation of masks for images using a combination of segmentation and detection techniques. This node leverages the capabilities of the SAM (Segment Anything Model) to generate precise masks based on various detection hints and parameters. It is particularly useful for AI artists who need to create detailed and accurate masks for their images, enabling more refined and controlled image manipulation. By combining segmentation and detection, this node provides a robust solution for generating masks that can be tailored to specific needs, enhancing the overall quality and precision of the artwork.
This parameter specifies the SAM model to be used for mask generation. The SAM model is a pre-trained model that helps in segmenting the image based on the provided hints and parameters.
This parameter represents the segments or regions of interest within the image that the SAM model will use to generate the mask. These segments guide the model in focusing on specific areas of the image.
This parameter is the input image for which the mask needs to be generated. The image serves as the base on which the SAM model will apply its segmentation and detection techniques.
This parameter provides hints to the SAM model on how to approach the detection process. Options include "center-1", "horizontal-2", "vertical-2", "rect-4", "diamond-4", "mask-area", "mask-points", "mask-point-bbox", and "none". These hints help in guiding the model to focus on specific patterns or areas within the image.
This parameter controls the dilation of the mask, which can expand or contract the mask boundaries. It accepts integer values with a default of 0, a minimum of -512, and a maximum of 512, with a step of 1. Dilation can help in refining the mask edges.
This parameter sets the confidence threshold for the mask generation. It accepts float values with a default of 0.93, a minimum of 0.0, and a maximum of 1.0, with a step of 0.01. A higher threshold results in more confident but potentially smaller masks.
This parameter controls the expansion of the bounding box around the detected segments. It accepts integer values with a default of 0, a minimum of 0, and a maximum of 1000, with a step of 1. Expanding the bounding box can help in capturing more context around the detected segments.
This parameter sets the threshold for using mask hints. It accepts float values with a default of 0.7, a minimum of 0.0, and a maximum of 1.0, with a step of 0.01. This threshold helps in determining the relevance of mask hints in the detection process.
This parameter specifies whether to use negative hints for mask generation. Options include "False", "Small", and "Outter". Negative hints can help in excluding certain areas from the mask.
The output of this node is a mask generated based on the input parameters and the SAM model. The mask highlights the areas of interest within the image, providing a precise and detailed segmentation that can be used for further image manipulation or analysis.
detection_hint
options to see which one best suits your image and desired outcome.threshold
parameter to balance between mask confidence and coverage. A higher threshold may result in more accurate but smaller masks.dilation
parameter to refine the edges of your mask, either expanding or contracting them as needed.bbox_expansion
to capture more context around your detected segments, especially if the initial mask is too tight.mask_hint_use_negative
to exclude unwanted areas from your mask, improving the overall quality of the segmentation.© Copyright 2024 RunComfy. All Rights Reserved.