A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.nvidia.com/deeplearning/dali/user-guide/docs/operations/nvidia.dali.fn.bbox_paste.html below:

nvidia.dali.fn.bbox_paste — NVIDIA DALI

nvidia.dali.fn.bbox_paste#
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
  • ‘cpu’

Parameters:

__input¶ (TensorList) – Input to the operator.

Keyword Arguments:
  • bytes_per_sample_hint¶ (int or list of int, optional, default = [0]) –

    Output size hint, in bytes per sample.

    If specified, the operator’s outputs residing in GPU or page-locked host memory will be preallocated to accommodate a batch of samples of this size.

  • ltrb¶ (bool, optional, default = False) – True for ltrb or False for xywh.

  • paste_x¶ (float or TensorList of float, optional, default = 0.5) – Horizontal position of the paste in image coordinates (0.0 - 1.0).

  • paste_y¶ (float or TensorList of float, optional, default = 0.5) – Vertical position of the paste in image coordinates (0.0 - 1.0).

  • preserve¶ (bool, optional, default = False) – Prevents the operator from being removed from the graph even if its outputs are not used.

  • ratio¶ (float or TensorList of float) – Ratio of the canvas size to the input size; the value must be at least 1.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4