nvidia.dali.experimental.dynamic.transforms.crop#
- nvidia.dali.experimental.dynamic.transforms.crop(input=None, /, *, batch_size=None, device=None, absolute=None, from_end=None, from_start=None, reverse_order=None, to_end=None, to_start=None)#
Produces an affine transform matrix that maps a reference coordinate space to another one.
This transform can be used to adjust coordinates after a crop operation so that a
from_startpoint will be mapped toto_startandfrom_endwill be mapped toto_end.If another transform matrix is passed as an input, the operator applies the transformation to the matrix provided.
Note
The output of this operator can be fed directly to
CoordTransformandWarpAffineoperators.This operator allows sequence inputs.
- Supported backends
‘cpu’
- Parameters:
input¶ (Tensor/Batch, optional) – Input to the operator.
- Keyword Arguments:
absolute¶ (bool, optional, default = False) – If set to true, start and end coordinates will be swapped if start > end.
from_end¶ (float or list of float or Tensor/Batch of float, optional, default = [1.0]) –
The upper bound of the original coordinate space.
Note
If left empty, a vector of ones will be assumed. If a single value is provided, it will be repeated to match the number of dimensions
Supports
per-frameinputs.from_start¶ (float or list of float or Tensor/Batch of float, optional, default = [0.0]) –
The lower bound of the original coordinate space.
Note
If left empty, a vector of zeros will be assumed. If a single value is provided, it will be repeated to match the number of dimensions
Supports
per-frameinputs.reverse_order¶ (bool, optional, default = False) –
Determines the order when combining affine transforms.
If set to False (default), the operator’s affine transform will be applied to the input transform. If set to True, the input transform will be applied to the operator’s transform.
If there’s no input, this argument is ignored.
to_end¶ (float or list of float or Tensor/Batch of float, optional, default = [1.0]) –
The upper bound of the destination coordinate space.
Note
If left empty, a vector of ones will be assumed. If a single value is provided, it will be repeated to match the number of dimensions
Supports
per-frameinputs.to_start¶ (float or list of float or Tensor/Batch of float, optional, default = [0.0]) –
The lower bound of the destination coordinate space.
Note
If left empty, a vector of zeros will be assumed. If a single value is provided, it will be repeated to match the number of dimensions
Supports
per-frameinputs.