ComfyUI Node
CV BBoxes To Array
Reads a BOUNDING_BOX value as plain arrays - the numeric bridge OUT of the detection world. Every detector emits dicts, so their coordinates and their score/label keys cannot be sorted, thresholded, measured or plotted; this node exposes them as NPARRAY, which the whole of points.py, contours.py, the charts and the raw cv2 wrappers accept. Works on any emitter: this pack's own nodes, core 'RT-DETR' / SAM3 / MediaPipe / 'Bounding Box', hand-authored boxes. 'CV Array To BBoxes' is the return leg. Empty input yields empty arrays and never raises.
CV BBoxes To Array
- bboxes
- boxes
- scores
- label_ids
- labels
- group_index
- count
◄layoutx, y, width, height►
Categoryimage/CV
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| bboxes | BOUNDING_BOX | [object Object] | Core BOUNDING_BOX data: per-frame lists of {x, y, width, height} dicts - compatible with Draw BBoxes, Crop By Bounding Boxes, Image Crop, etc. A single dict, a flat list or per-frame nested lists are all accepted; the frame each box came from is reported in 'group_index'. |
| layoutopt | COMBO | x, y, width, height | Column layout of the array. 'x, y, width, height' is OpenCV's own convention (and BOUNDING_BOX's); 'x1, y1, x2, y2' is the corner form most DNN heads and torchvision use; 'center x, center y, width, height' is the YOLO form. Only the ARRAY side changes - BOUNDING_BOX is always {x, y, width, height}. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| boxes | NPARRAY | (N,4) float32, one row per box in the chosen layout, in the order the boxes appear (frame by frame). Cast it with 'CV Cast Array' if a consumer wants int32. |
| scores | NPARRAY | (N,) float32 confidence, from each box's 'score' key. Boxes with no score read as 1.0, so a threshold never silently drops un-scored boxes. float32 like every other score in this pack, so a round trip through 'CV Array To BBoxes' keeps ~7 digits, not all 17. |
| label_ids | NPARRAY | (N,) int32 index into 'labels'. Boxes with no label all share index 0. Feed it to 'CV NMS Boxes' for per-class suppression. |
| labels | STRING | The distinct label names, one per line, indexed by 'label_ids' - the same shape 'Load Labels' produces. |
| group_index | NPARRAY | (N,) int32: which per-frame GROUP each row came from. Pass it back to 'CV Array To BBoxes' to restore the original nesting. |
| count | INT | Total number of boxes (rows). |