draw.group_bbox_and_tag
Description
Draws large bounding boxes with tags, over identified groups of bounding boxes.
- class Node(config=None, **kwargs)[source]
Draws large bounding boxes with tags over multiple object bounding boxes which have been identified as belonging to the same group.
The large_groups data type from
dabble.check_large_groups
, and thegroups
key of the obj_attrs data type fromdabble.group_nearby_objs
, are inputs for this node which identifies the different groups, and the group associated with each bounding box.For better understanding, refer to the Group Size Checking use case.
- Inputs
img
(numpy.ndarray
): A NumPy array of shape \((height, width, channels)\) containing the image data in BGR format.bboxes
(numpy.ndarray
): A NumPy array of shape \((N, 4)\) containing normalized bounding box coordinates of \(N\) detected objects. Each bounding box is represented as \((x_1, y_1, x_2, y_2)\) where \((x_1, y_1)\) is the top-left corner and \((x_2, y_2)\) is the bottom-right corner. The order corresponds to bbox_labels and bbox_scores.obj_attrs
(Dict[str, Any]
): A dictionary of attributes associated with each bounding box, in the same order as bboxes. Different nodes that produce this obj_attrs output type may contribute different attributes.draw.group_bbox_and_tag
requires thegroups
attribute fromdabble.group_nearby_objs
.large_groups
(List[int]
): A list of integers representing the group IDs of groups that have exceeded the size threshold.- Outputs
none
: No outputs produced.- Configs
tag (
str
) – default = “LARGE GROUP!”.
The string message printed when a large group is detected.
Changed in version 1.2.0:
draw.group_bbox_and_tag
used to take inobj_tags
(List[str]
) as an input data type, which has been deprecated and now subsumed under obj_attrs. The same attribute is accessed by using thegroups
key of obj_attrs.