Visit ComfyUI Online for ready-to-use ComfyUI environment
Identifies objects in images, creates masks using pre-trained models for precise object localization and masking.
The BMAB Detect And Mask node is designed to identify objects within an image and create corresponding masks for these detected objects. This node leverages pre-trained models to perform object detection, and then generates masks by drawing rectangles around the detected objects with a specified dilation. This functionality is particularly useful for tasks that require precise object localization and masking, such as image editing, compositing, and further image processing. By automating the detection and masking process, this node significantly enhances efficiency and accuracy in handling complex imaging tasks.
The image
parameter expects an input of type IMAGE
. This is the image in which the objects will be detected and masked. The quality and resolution of the input image can impact the accuracy of the detection and the quality of the generated masks.
The model
parameter allows you to select from a list of pre-trained models provided by the system. These models are used to perform the object detection within the image. The choice of model can affect the types of objects that are detected and the accuracy of the detection. It is important to select a model that is well-suited to the specific objects you are interested in detecting.
The dilation
parameter is an integer value that specifies the amount of dilation to apply to the bounding boxes of the detected objects. The default value is 4, with a minimum of 4 and a maximum of 128. Dilation expands the bounding box by the specified number of pixels, which can help ensure that the entire object is included within the mask. Adjusting this value can help fine-tune the mask to better fit the detected objects.
The mask
output is of type MASK
. This output contains the masks generated for the detected objects in the input image. Each mask is a binary image where the detected objects are highlighted, and the rest of the image is blacked out. These masks can be used for various image processing tasks, such as isolating objects, applying effects, or further analysis.
image
parameter is not of type IMAGE
or is corrupted.© Copyright 2024 RunComfy. All Rights Reserved.