Add ndd.imread function for reading and decoding images by jantonguirao · Pull Request #6092 · NVIDIA/DALI
bot found potential problems Nov 20, 2025
This adds a new imread() function to the experimental dynamic API that provides a simple interface for loading images from file paths. The function combines io.file.read and decoders.image operations into a single convenient call. Features: - Supports single image (returns Tensor) or batch of images (returns Batch) - Supports CPU and GPU decoding (device: 'cpu', 'mixed') - Accepts string paths, lists of paths, or Tensor/Batch inputs - Forwards all kwargs to decoders.image for full control over decoding Implementation details: - Dynamically expands function signature with all decoders.image kwargs using makefun - Automatically generates comprehensive docstring by extracting kwargs documentation from decoders.image schema using ops._docs._get_kwargs() - Provides full IDE autocomplete support for ~20 decoder parameters - Excludes unsupported/internal args (bytes_per_sample_hint, preserve) Signed-off-by: Joaquin Anton Guirao <janton@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters