ComfyUI > Nodes > ComfyUI-PixtralLlamaMolmoVision > Parse Bounding Boxes

ComfyUI Node: Parse Bounding Boxes

Class Name

ParseBoundingBoxes

Category
PixtralLlamaVision/Utility
Author
SeanScripts (Account age: 1678days)
Extension
ComfyUI-PixtralLlamaMolmoVision
Latest Updated
2024-10-05
Github Stars
0.06K

How to Install ComfyUI-PixtralLlamaMolmoVision

Install this extension via the ComfyUI Manager by searching for ComfyUI-PixtralLlamaMolmoVision
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-PixtralLlamaMolmoVision 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Parse Bounding Boxes Description

Extract bounding box info from text using regex, convert to objects for AI image tasks, flexible coordinate options.

Parse Bounding Boxes:

The ParseBoundingBoxes node is designed to extract bounding box information from a given string, making it a valuable tool for AI artists working with image data. This node utilizes a regular expression to identify and parse bounding box coordinates from text, converting them into a list of bounding box objects. These objects are compatible with other tools and systems that handle bounding boxes, such as mtb. The node offers flexibility in how bounding boxes are defined, allowing you to choose between relative coordinates, which are expressed as float values between 0 and 1, or absolute image coordinates. Additionally, you can specify whether the bounding boxes should be defined by their corner points or by their width and height. This versatility makes the ParseBoundingBoxes node an essential utility for efficiently managing and interpreting bounding box data in various image processing tasks.

Parse Bounding Boxes Input Parameters:

image

The image parameter represents the image data that the bounding boxes will be applied to. This parameter is crucial as it provides the context in which the bounding box coordinates are interpreted, especially when using relative coordinates. The image's dimensions are used to calculate the absolute positions of the bounding boxes if the relative parameter is set to true.

string

The string parameter is the text input from which the bounding box coordinates are extracted. This string should contain the bounding box data formatted in a way that the node's regular expression can recognize. The accuracy and completeness of the bounding box extraction depend on the correct formatting of this string.

relative

The relative parameter is a boolean that determines whether the bounding box coordinates are interpreted as relative or absolute. When set to true, the coordinates are considered relative, meaning they are expressed as float values between 0 and 1, representing a proportion of the image's dimensions. When false, the coordinates are treated as absolute pixel values. The default value is true.

corners_only

The corners_only parameter is a boolean that specifies the format of the bounding box coordinates. If true, the bounding box is defined by its corner points, i.e., [(x1, y1), (x2, y2)]. If false, the bounding box is defined by its top-left corner and its dimensions, i.e., [(x1, y1), (width, height)]. The default value is true.

Parse Bounding Boxes Output Parameters:

BBOX

The BBOX output parameter is a list of bounding box objects extracted from the input string. Each bounding box is represented by a tuple containing its coordinates and dimensions, formatted according to the corners_only parameter. This output is essential for further processing or analysis of the image data, as it provides the precise locations and sizes of the areas of interest within the image.

Parse Bounding Boxes Usage Tips:

  • Ensure that the input string is correctly formatted to match the regular expression used by the node. This will help in accurately extracting the bounding box data.
  • Use the relative parameter to easily scale bounding boxes across different image sizes without manually recalculating coordinates.
  • When working with systems that require specific bounding box formats, adjust the corners_only parameter to match the expected input format.

Parse Bounding Boxes Common Errors and Solutions:

Invalid bbox: (x1, y1, width, height)

  • Explanation: This error occurs when the calculated bounding box dimensions are invalid, such as having a width or height of zero or exceeding the image dimensions.
  • Solution: Check the input string for correct formatting and ensure that the coordinates are within the valid range for the given image size.

Failed to parse bbox: match

  • Explanation: This error indicates that the node was unable to parse a bounding box from the input string due to incorrect formatting or unexpected values.
  • Solution: Verify that the input string is correctly formatted and matches the expected pattern for bounding box data. Adjust the string as necessary to ensure compatibility with the node's regular expression.

Parse Bounding Boxes Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-PixtralLlamaMolmoVision
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.