Visit ComfyUI Online for ready-to-use ComfyUI environment
Converts JSON coordinates for AI image segmentation, ensuring accuracy and compatibility in complex workflows.
Florence2toCoordinates is a node designed to convert JSON-formatted coordinate data into a structured format suitable for further processing in AI models. This node is particularly useful for tasks involving image segmentation, where precise coordinates of objects within an image are required. By transforming the input coordinates into a standardized format, Florence2toCoordinates ensures that both positive and negative points are correctly interpreted and utilized by subsequent nodes or models. This node simplifies the handling of coordinate data, making it easier to integrate into complex workflows without requiring extensive manual preprocessing.
This parameter accepts a JSON string representing the positive coordinates of points within an image. The JSON string should be formatted with each coordinate as an object containing x
and y
values. These coordinates are crucial for identifying the areas of interest in the image. If not provided, the node will not have any positive points to process. There is no specific minimum or maximum value for this parameter, but it must be a valid JSON string.
This parameter accepts a JSON string representing the negative coordinates of points within an image. Similar to coordinates_positive
, the JSON string should contain objects with x
and y
values. These coordinates help in identifying areas that should be excluded or treated differently in the image processing task. This parameter is optional, and if not provided, the node will proceed without negative points. There is no specific minimum or maximum value for this parameter, but it must be a valid JSON string if provided.
This boolean parameter determines whether the coordinates should be treated as individual objects or as a single set of points. If set to True
, each coordinate will be processed as a separate object, which can be useful for tasks requiring distinct handling of multiple objects. If set to False
, all coordinates will be treated as part of a single object. The default value is False
.
This output parameter provides the combined coordinates of both positive and negative points in a structured format. The coordinates are returned as a NumPy array, which can be easily used in subsequent processing steps. The format ensures that the coordinates are correctly aligned and ready for further analysis or model input.
This output parameter provides the labels associated with the coordinates. Positive points are labeled with 1
, and negative points are labeled with 0
. The labels are returned as a NumPy array, ensuring that each coordinate has a corresponding label. This is essential for tasks that require differentiation between positive and negative points.
coordinates_positive
and coordinates_negative
are correctly formatted to avoid parsing errors.individual_objects
parameter to control whether the coordinates should be treated as separate objects or a single set, depending on your specific use case.coordinates_positive
is not correctly formatted.x
and y
properties.coordinates_negative
is not correctly formatted.x
and y
properties.index
parameter is out of the range of available data points.© Copyright 2024 RunComfy. All Rights Reserved.