nvidia.dali.experimental.dynamic.experimental.peek_image_shape#

nvidia.dali.experimental.dynamic.experimental.peek_image_shape(input, /, *, batch_size=None, device=None, adjust_orientation=None, dtype=None, image_type=None)#

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 set exec_dynamic=False).

Supported backends
  • ‘cpu’

Parameters:

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

Keyword Arguments:
  • adjust_orientation (bool, optional, default = True) – Use the EXIF orientation metadata when calculating the shape.

  • 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.