nvidia.dali.experimental.dynamic.paste#

nvidia.dali.experimental.dynamic.paste(input, /, *, batch_size=None, device=None, fill_value, min_canvas_size=None, n_channels=None, paste_x=None, paste_y=None, ratio)#

Pastes the input images on a larger canvas, where the canvas size is equal to input size * ratio. Only uint8 images of up to 1024 channels are supported.

Supported backends
  • ‘cpu’

  • ‘gpu’

Parameters:

input (Tensor/Batch ('HWC')) – Input to the operator.

Keyword Arguments:
  • fill_value (int or list of int) –

    Tuple of the values of the color that is used to fill the canvas.

    The length of the tuple must be equal to n_channels.

  • min_canvas_size (float or Tensor/Batch of float, optional, default = 0.0) – Enforces the minimum paste canvas dimension after scaling the input size by the ratio.

  • n_channels (int, optional, default = 3) – Number of channels in the image.

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

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

  • ratio (float or Tensor/Batch of float) – Ratio of canvas size to input size. Must be >= 1.