dgs.utils.image.load_image_list¶
- dgs.utils.image.load_image_list(filepath: str | tuple[str, ...], dtype: torch.dtype = torch.float32, device: torch.device = 'cpu', read_mode: torchvision.io.ImageReadMode = torchvision.io.ImageReadMode.RGB) list[torchvision.tv_tensors.Image | torch.Tensor][source]¶
- Load multiple images with possibly different sizes as a list of tv_tensor images. - Parameters:
- filepath – Single string or list of absolute or local filepaths to the image. 
- dtype – The dtype of the image, most likely one of uint8, byte, or float32. Default torch.float32. 
- device – Device the image should be on. Default “cpu” 
- read_mode – Which ImageReadMode to use while loading the images. Default ‘ImageReadMode.RGB’. 
 
- Returns:
- A list of tv_tensor images with the provided dtype on the device. All images are four-dimensional wit a leading batch dimension of 1, like: - [1 x C x H x W].