ComfyUI Node
CV Box IoU Matrix
Intersection-over-union of every box in A against every box in B, as an (N,M) array. The generic primitive behind detection scoring against ground truth, frame-to-frame track association, de-duplicating two detectors, and 'drop anything overlapping this keep-out region' - the 'CV Polygon IoU (convex)' subgraph only does a single pair. Boxes are flattened across frames (use 'CV BBoxes To Array' if you need to know which frame a row came from). Empty input yields an empty matrix and never raises.
CV Box IoU Matrix
- bboxes_a
- bboxes_b
- iou
- best_index
- best_iou
- count_a
- count_b
Categoryimage/CV
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| bboxes_a | 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. Becomes the ROWS of the matrix. |
| bboxes_b | 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. Becomes the COLUMNS. Pass the same value on both sides to get the self-overlap matrix (its diagonal is 1.0). |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| iou | NPARRAY | (N,M) float32 in [0,1]: intersection area / union area for each pair. 0.0 where the boxes do not touch. |
| best_index | NPARRAY | (N,) int32: for each A box, the B box it overlaps most (-1 when it overlaps nothing at all). |
| best_iou | NPARRAY | (N,) float32: that best overlap. Threshold it to get the classic matched/unmatched split. |
| count_a | INT | Number of A boxes (rows). |
| count_b | INT | Number of B boxes (columns). |