draw.bbox
Description
Draws bounding boxes over detected objects.
- class Node(config=None, **kwargs)[source]
Draws bounding boxes on image.
The
draw.bbox
node uses bboxes and, optionally, bbox_labels from the model predictions to draw the bbox predictions onto the image.- 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.bbox_labels
(numpy.ndarray
): A NumPy array of shape \((N)\) containing strings representing the labels of detected objects. The order corresponds to bboxes and bbox_scores.- Outputs
none
: No outputs produced.- Configs
show_labels (
bool
) – default = False.
IfTrue
, shows class label, e.g., “person”, above the bounding box.