utils.image.transforms#

Module Contents#

Functions#

convert_transforms_to_dali

Converts a list of PyTorch/Timm image transformations into DALI transformations Only works with transformations that follow this pattern:

Data#

API#

utils.image.transforms.ERROR_MESSAGE = <Multiline-String>#
utils.image.transforms.SUPPORTED_INTERPOLATIONS#

None

utils.image.transforms.convert_transforms_to_dali(
torch_transform: torchvision.transforms.transforms.Compose,
) list#

Converts a list of PyTorch/Timm image transformations into DALI transformations Only works with transformations that follow this pattern:

Compose( Resize(interpolation=bicubic or bilinear, max_size=None, antialias=True), CenterCrop(), MaybeToTensor(), Normalize(), )

Anything that does not follow this pattern will cause a ValueError to be raised