nvidia.dali.fn.bbox_paste — NVIDIA DALI (original) (raw)

nvidia.dali.fn.bbox_paste(__input, /, *, bytes_per_sample_hint=[0], ltrb=False, paste_x=0.5, paste_y=0.5, preserve=False, ratio, device=None, name=None)#

Transforms bounding boxes so that the boxes remain in the same place in the image after the image is pasted on a larger canvas.

Corner coordinates are transformed according to the following formula:

(x', y') = (x/ratio + paste_x', y/ratio + paste_y')

Box sizes (if xywh is used) are transformed according to the following formula:

(w', h') = (w/ratio, h/ratio)

Where:

paste_x' = paste_x * (ratio - 1)/ratio paste_y' = paste_y * (ratio - 1)/ratio

The paste coordinates are normalized so that (0,0) aligns the image to top-left of the canvas and (1,1) aligns it to bottom-right.

Supported backends

Parameters:

__input (TensorList) – Input to the operator.

Keyword Arguments: