Visit ComfyUI Online for ready-to-use ComfyUI environment
Convert masks to SEGS format for advanced image processing and AI art tasks, enhancing creative projects.
The MaskToSEGS node is designed to convert a given mask into SEGS (segmentation) format, which is useful for various image processing and AI art tasks. This node allows you to manipulate and refine masks by providing options to combine masks, crop them, fill bounding boxes, and more. By converting masks into SEGS, you can leverage advanced segmentation techniques to enhance your creative projects. The node's primary function is to facilitate the transformation of 2D or 3D masks into a more structured and detailed segmentation format, enabling more precise and flexible image editing and analysis.
The mask parameter is the input mask that you want to convert into SEGS format. This mask can be either a 2D or 3D tensor, depending on your specific needs. The mask serves as the base for the segmentation process, and its quality and structure will directly impact the resulting SEGS.
The combined parameter is a boolean option that determines whether the resulting SEGS should be combined into a single output. When set to True, the node will merge all segments into one; when set to False, it will keep them separate. The default value is False, with label_on as "True" and label_off as "False".
The crop_factor parameter is a float that specifies the factor by which the mask should be cropped. This helps in focusing on specific regions of the mask. The value ranges from 1.0 to 100, with a default of 3.0 and a step of 0.1. Adjusting this factor can help in refining the segmentation by excluding unnecessary parts of the mask.
The bbox_fill parameter is a boolean that indicates whether the bounding box around the mask should be filled. When enabled, it fills the bounding box, which can help in creating more defined segments. The default value is False, with label_on as "enabled" and label_off as "disabled".
The drop_size parameter is an integer that sets the minimum size of the segments to be retained. Any segment smaller than this size will be dropped. This helps in removing noise and focusing on significant segments. The value ranges from 1 to MAX_RESOLUTION, with a default of 10 and a step of 1.
The contour_fill parameter is a boolean that determines whether the contours of the mask should be filled. When enabled, it fills the contours, which can help in creating more solid segments. The default value is False, with label_on as "enabled" and label_off as "disabled".
The SEGS output parameter is the resulting segmentation data derived from the input mask. This output is in SEGS format, which provides a structured and detailed representation of the segments within the mask. The SEGS format is useful for further image processing and analysis, enabling more precise and flexible manipulation of the segmented regions.
crop_factor to focus on specific regions of the mask.drop_size parameter to filter out smaller, less significant segments, which can help in reducing noise and focusing on important areas.bbox_fill if you need more defined segments with filled bounding boxes, which can be useful for certain types of image analysis.crop_factor value is outside the allowed range.crop_factor value to be within the range of 1.0 to 100.drop_size value is outside the allowed range.drop_size value is within the range of 1 to MAX_RESOLUTION.contour_fill is enabled for batch masks, which is not supported.contour_fill option when working with batch masks.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.