dgs.utils.validation.validate_images

dgs.utils.validation.validate_images(images: list[torchvision.tv_tensors.Image | torch.Tensor | torch.Tensor]) list[torchvision.tv_tensors.Image | torch.Tensor][source]

Given one single or multiple images, validate them and return a torchvision-tensor image.

Parameters:

images – A list containing Tensor or tv_tensor.Image objects.

Returns:

The images as a list containing tv_tensor.Image objects, each with exactly 4 dimensions.

Raises:

TypeError – If images is not a list.