Visit ComfyUI Online for ready-to-use ComfyUI environment
Enhance image processing with bounding box masks for precise region manipulation and control.
The LayerMask: DrawBBoxMaskV2 node is designed to enhance image processing by generating masks based on bounding boxes. This node is particularly useful for AI artists who need to manipulate or analyze specific regions within an image. By drawing bounding box masks, it allows for precise control over which areas of an image are affected by subsequent operations. The node provides flexibility in adjusting the bounding boxes, enabling users to expand or contract the mask area as needed. This capability is essential for tasks that require detailed attention to specific image sections, such as object detection, segmentation, or artistic effects. The node's ability to handle rounded rectangles and apply anti-aliasing further enhances the quality and smoothness of the masks, making it a valuable tool for creating professional-grade image modifications.
The image
parameter is the input image on which the bounding box masks will be drawn. It serves as the canvas for the mask creation process, and the quality and resolution of this image can affect the final output.
The bboxes
parameter represents the bounding boxes that define the areas to be masked. These are typically provided as a list of coordinates, specifying the top-left and bottom-right corners of each box. The bounding boxes determine the regions of interest within the image.
The grow_top
parameter allows you to expand the bounding box upwards by a specified proportion of its height. This parameter accepts a float value ranging from -10 to 10, with a default of 0. Positive values increase the height of the bounding box upwards, while negative values decrease it.
Similar to grow_top
, the grow_bottom
parameter adjusts the bounding box downwards. It accepts a float value from -10 to 10, with a default of 0. This parameter is useful for fine-tuning the vertical extent of the mask.
The grow_left
parameter modifies the bounding box to the left by a specified proportion of its width. It accepts a float value between -10 and 10, with a default of 0. This allows for precise control over the horizontal expansion or contraction of the mask.
The grow_right
parameter adjusts the bounding box to the right. It accepts a float value from -10 to 10, with a default of 0. This parameter is essential for customizing the horizontal reach of the mask.
The rounded_rect_radius
parameter defines the radius of the corners for rounded rectangles. It accepts an integer value between 0 and 100, with a default of 50. This parameter is crucial for creating masks with smooth, rounded edges.
The anti_aliasing
parameter controls the level of anti-aliasing applied to the mask edges. It accepts an integer value from 0 to 16, with a default of 2. Higher values result in smoother edges, reducing the jagged appearance of the mask.
The mask
output parameter is the resulting mask generated from the specified bounding boxes. This mask highlights the areas of interest within the input image, allowing for further processing or analysis. The mask is typically a binary image where the masked regions are marked, providing a clear delineation of the selected areas.
grow_top
, grow_bottom
, grow_left
, and grow_right
parameters to fine-tune the size of your bounding boxes, ensuring they accurately cover the desired regions.rounded_rect_radius
parameter to create masks with smooth, rounded edges, which can be particularly useful for artistic effects or when working with circular objects.anti_aliasing
value to improve the smoothness of the mask edges, especially when working with high-resolution images or when precise edge definition is required.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.