nvidia.dali.fn.experimental.peek_image_shape#
- nvidia.dali.fn.experimental.peek_image_shape(input, /, *, device=None, name=None, adjust_orientation=True, bytes_per_sample_hint=[0], dtype=DALIDataType.INT64, image_type=DALIImageType.RGB, preserve=False)#
Obtains the shape of the encoded image.
This operator returns the shape that an image would have after decoding.
Note
In most cases the optimal solution is to call
nvidia.dali.pipeline.DataNode.shape()on the decoded images. Use this operator if you either do not intend to decode the image in your pipeline, or do not use the default execution model (i.e., explicitly setexec_dynamic=False).- Supported backends
‘cpu’
- Parameters:
input¶ (TensorList) – Input to the operator.
- Keyword Arguments:
adjust_orientation¶ (bool, optional, default = True) – Use the EXIF orientation metadata when calculating the shape.
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.
dtype¶ (
nvidia.dali.types.DALIDataType, optional, default = DALIDataType.INT64) – Data type, to which the sizes are converted.image_type¶ (
nvidia.dali.types.DALIImageType, optional, default = DALIImageType.RGB) – Color format of the image.preserve¶ (bool, optional, default = False) – Prevents the operator from being removed from the graph even if its outputs are not used.