ComfyUI > Nodes > ComfyUI > Draw BBoxes

ComfyUI Node: Draw BBoxes

Class Name

DrawBBoxes

Category
detection
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI 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 Online for ready-to-use ComfyUI environment

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

Run ComfyUI Online

Draw BBoxes Description

Overlay bounding boxes on images for visualizing detected objects, aiding in precise object localization and highlighting areas of interest.

Draw BBoxes:

The DrawBBoxes node is designed to overlay bounding boxes on images, providing a visual representation of detected objects. This node is particularly useful for AI artists who want to visualize object detection results directly on their images. By drawing bounding boxes, you can easily identify and highlight specific areas of interest within an image, making it easier to understand the output of object detection models. The node processes a batch of images and corresponding bounding box data, ensuring that each image is accurately annotated with the detected objects. This capability is essential for tasks that require precise localization of objects, such as image editing, content creation, and visual storytelling.

Draw BBoxes Input Parameters:

bboxes

The bboxes parameter is a crucial input for the DrawBBoxes node, as it contains the bounding box data that will be drawn on the images. This parameter should be a list of lists, where each inner list contains dictionaries representing individual bounding boxes. Each dictionary should include keys such as "x", "y", "width", "height", and optionally "label" and "score". The "x" and "y" keys define the top-left corner of the bounding box, while "width" and "height" specify its dimensions. The "label" key can be used to annotate the box with a specific class name, and the "score" key indicates the confidence level of the detection. Properly formatted bounding box data ensures that the node can accurately draw the boxes on the images.

image

The image parameter is the input image or batch of images on which the bounding boxes will be drawn. This parameter should be provided as a tensor, where each image is represented in a format compatible with the node's processing requirements. The images should be pre-processed and normalized as needed to ensure compatibility with the node's operations. The quality and resolution of the input images can impact the clarity and precision of the drawn bounding boxes, so it is important to provide high-quality images for optimal results.

Draw BBoxes Output Parameters:

out_images

The out_images parameter is the output of the DrawBBoxes node, providing the images with the drawn bounding boxes. This output is a tensor containing the processed images, where each image has been annotated with the specified bounding boxes, labels, and scores. The output images can be used for further analysis, presentation, or integration into other workflows. The annotated images offer a clear visual representation of the detected objects, making it easier to interpret and utilize the results of object detection models.

Draw BBoxes Usage Tips:

  • Ensure that the bounding box data is correctly formatted and corresponds accurately to the objects in the images to achieve precise annotations.
  • Use high-resolution images to maintain the clarity and visibility of the drawn bounding boxes, especially when dealing with small or closely packed objects.
  • Experiment with different label and score configurations to customize the appearance and information displayed on the bounding boxes.

Draw BBoxes Common Errors and Solutions:

Invalid bounding box format

  • Explanation: This error occurs when the bounding box data is not formatted as a list of lists containing dictionaries with the required keys.
  • Solution: Verify that the bounding box data is structured correctly, with each dictionary containing "x", "y", "width", "height", and optionally "label" and "score" keys.

Image tensor dimension mismatch

  • Explanation: This error arises when the input image tensor does not match the expected dimensions or format required by the node.
  • Solution: Ensure that the input images are pre-processed and normalized correctly, and that they conform to the expected tensor dimensions for the node's operations.

Draw BBoxes Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Draw BBoxes