nvidia.dali.fn.experimental.remap¶
-
nvidia.dali.fn.experimental.
remap
(*inputs, **kwargs)¶ The remap operation applies a generic geometrical transformation to an image. In other words, it takes pixels from one place in the input image and puts them in another place in the output image. The transformation is described by
mapx
andmapy
parameters, where:output(x,y) = input(mapx(x,y),mapy(x,y))
The type of the output tensor will match the type of the input tensor.
Handles only HWC layout.
Currently picking border policy is not supported. The
DALIBorderType
will always beCONSTANT
with the value0
.This operator allows sequence inputs.
- Supported backends
‘gpu’
- Parameters
input (TensorList ('HWC', 'FHWC')) – Input data. Must be a 1- or 3-channel HWC image.
mapx (TensorList of float ('HWC', 'HW', 'FHWC', 'FHW', 'F***', 'F**')) – Defines the remap transformation for x coordinates.
mapy (TensorList of float ('HWC', 'HW', 'FHWC', 'FHW', 'F***', 'F**')) – Defines the remap transformation for y coordinates.
- 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.
interp (
nvidia.dali.types.DALIInterpType
, optional, default = DALIInterpType.INTERP_LINEAR) – Interpolation type.pixel_origin (str, optional, default = ‘corner’) –
Pixel origin. Possible values:
"corner"
,"center"
.Defines which part of the pixel (upper-left corner or center) is interpreted as its origin. This value impacts the interpolation result. To match OpenCV, please pick
"center"
.preserve (bool, optional, default = False) – Prevents the operator from being removed from the graph even if its outputs are not used.
seed (int, optional, default = -1) –
Random seed.
If not provided, it will be populated based on the global seed of the pipeline.