ComfyUI Node
CV Scale BBoxes
Rescales bounding boxes from one image space to another by comparing the sizes of two references - e.g. a bbox found by 'Match Template' on a LATENT (latent-cell coordinates) mapped onto the original image (pixel coordinates) for the core 'Draw BBoxes' node, or boxes detected on a downscaled copy mapped back to full resolution. Only the references' height/width are read, so any IMAGE, MASK, NPARRAY or LATENT works on either side.
CV Scale BBoxes
- bboxes
- from_space
- to_space
- bboxes
- scale_x
- scale_y
Categoryimage/CV
Inputs (3)
| 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. Boxes in from_space coordinates: a single dict, a flat list, or per-frame nested lists. Extra keys (score, label, ...) are preserved. |
| from_space | NPARRAY,IMAGE,MASK,LATENT | Reference the boxes were measured on (e.g. the LATENT that was searched). Only its height/width are used - for a LATENT that is the latent-cell grid size. | |
| to_space | NPARRAY,IMAGE,MASK,LATENT | Reference to map the boxes onto (e.g. the original IMAGE, or its MASK - only height/width are used). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| bboxes | BOUNDING_BOX | Core BOUNDING_BOX data: per-frame lists of {x, y, width, height} dicts - compatible with Draw BBoxes, Crop By Bounding Boxes, Image Crop, etc. Same nesting as the input, coordinates in to_space. |
| scale_x | FLOAT | Applied horizontal factor: to_space width / from_space width (8.0 for a stride-8 VAE latent). |
| scale_y | FLOAT | Applied vertical factor: to_space height / from_space height. |