augmix_image#
- composer.functional.augmix_image(img, severity=3, depth=-1, width=3, alpha=1.0, augmentation_set=[<function autocontrast>, <function equalize>, <function posterize>, <function rotate>, <function solarize>, <function shear_x>, <function shear_y>, <function translate_x>, <function translate_y>, <function color>, <function contrast>, <function brightness>, <function sharpness>])[source]#
Applies the AugMix (Hendrycks et al, 2020) data augmentation.
This function works on a single image or batch of images. See
AugMix
and the Method Card for details. This function only acts on a single image (or batch) per call and is unlikely to be used in a training loop. UseAugmentAndMixTransform
to use AugMix as part of atorchvision.datasets.VisionDataset
'stransform
.Example
import composer.functional as cf from composer.algorithms.utils import augmentation_sets augmixed_image = cf.augmix_image( img=image, severity=3, width=3, depth=-1, alpha=1.0, augmentation_set=augmentation_sets["all"] )
- Parameters
- Returns
PIL.Image โ AugMixโd image.