Visit ComfyUI Online for ready-to-use ComfyUI environment
Transforms bounding box and mask data into structured dictionary format for easier handling and visualization of object detection results.
The ConvertToDict
node is designed to transform bounding box and mask data into a structured dictionary format, making it easier to handle and visualize object detection results. This node is particularly useful for AI artists working with object detection models, as it simplifies the process of converting raw detection outputs into a more readable and manageable format. By organizing the data into a dictionary, you can easily access and manipulate the information for further processing or visualization. The main goal of this node is to streamline the workflow by providing a clear and structured representation of the detected objects, including their bounding boxes and masks.
The bbox
parameter accepts a list of bounding boxes, where each bounding box is represented as a list or tuple of four values: [x, y, width, height]
. These values correspond to the coordinates and dimensions of the bounding box. The bbox
parameter is optional, and if not provided, the node will not include bounding box information in the output dictionary. This parameter allows you to specify the detected objects' locations and sizes, which can be crucial for tasks such as object tracking or region-based processing. The default value is None
.
The mask
parameter accepts a list of masks, where each mask is represented as a 2D array or matrix. These masks correspond to the pixel-wise segmentation of the detected objects. The mask
parameter is optional, and if not provided, the node will not include mask information in the output dictionary. This parameter allows you to specify the detailed shape and area of the detected objects, which can be useful for tasks requiring precise object boundaries, such as image editing or advanced visualizations. The default value is None
.
The output of the ConvertToDict
node is a JSON-formatted string that represents the structured dictionary containing the detected objects' information. This string includes details about the bounding boxes and masks, if provided, and organizes them in a way that is easy to read and manipulate. The output string can be used for further processing, visualization, or storage, making it a versatile and valuable result for various applications. The JSON format ensures compatibility with many tools and platforms, allowing seamless integration into your workflow.
bbox
nor the mask
parameters are provided to the node.bbox
or mask
parameters is provided with valid data before executing the node.[x, y, width, height]
.© Copyright 2024 RunComfy. All Rights Reserved.