nvidia.dali.fn.peek_image_shape#

nvidia.dali.fn.peek_image_shape(__input, /, *, bytes_per_sample_hint=[0], dtype=DALIDataType.INT64, preserve=False, seed=-1, device=None, name=None)#

Obtains the shape of the encoded image.

This operator returns the shape that an image would have after decoding.

Note

This operator is not recommended for use with the dynamic executor (exec_dynamic=True in the pipeline constructor). Use nvidia.dali.pipeline.DataNode.shape() instead on the decoded images.

Supported backends
  • ‘cpu’

Parameters:

__input (TensorList) – Input to the operator.

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.

  • dtype (nvidia.dali.types.DALIDataType, optional, default = DALIDataType.INT64) – Data type, to which the sizes are converted.

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

  • type (nvidia.dali.types.DALIDataType) –

    Warning

    The argument type is a deprecated alias for dtype. Use dtype instead.