nvidia.dali.fn.decoders.image — NVIDIA DALI (original) (raw)

nvidia.dali.fn.decoders.image(__input, /, *, affine=True, bytes_per_sample_hint=[0], cache_batch_copy=True, cache_debug=False, cache_size=0, cache_threshold=0, cache_type='', device_memory_padding=16777216, device_memory_padding_jpeg2k=0, host_memory_padding=8388608, host_memory_padding_jpeg2k=0, hw_decoder_load=0.65, hybrid_huffman_threshold=1000000, jpeg_fancy_upsampling=False, memory_stats=False, output_type=DALIImageType.RGB, preallocate_height_hint=0, preallocate_width_hint=0, preserve=False, use_fast_idct=False, device=None, name=None)#

Decodes images.

For jpeg images, depending on the backend selected (“mixed” and “cpu”), the implementation uses the nvJPEG library or libjpeg-turbo, respectively. Other image formats are decoded with OpenCV or other specific libraries, such as libtiff.

If used with a mixed backend, and the hardware is available, the operator will use a dedicated hardware decoder.

Warning

Due to performance reasons, hardware decoder is disabled for driver < 455.x

The output of the decoder is in HWC layout.

Supported formats: JPG, BMP, PNG, TIFF, PNM, PPM, PGM, PBM, JPEG 2000, WebP. Please note that GPU acceleration for JPEG 2000 decoding is only available for CUDA 11 and newer.

Note

EXIF orientation metadata is disregarded.

Supported backends

Parameters:

__input (TensorList) – Input to the operator.

Keyword Arguments: