Review: RandAugment

A Set of Data Augmentation Choices is Randomized

RandAugment (Image from here)
  • For NAS-based data augmentation approaches, such as AutoAugment (AA), large search space is needed to find a set of augmentation techniques. This separate search phase significantly complicates training and is computationally expensive.
  • In RandAugment, a simple but effective way is proposed to randomly select a set of augmentation techniques.

Outline

  1. RandAugment
  2. Experimental Results

1. RandAugment

1.1. N: Number of Transformation

Python Code for RandAugment
  • The primary goal of RandAugment is to remove the need for a separate search phase on a proxy task.
  • A parameter-free procedure is proposed where RandAugment always selects a transformation with uniform probability 1/K.
  • Given N transformations for a training image, RandAugment may thus express K^N potential policies.
  • With N=14, the number of transformations is: identity, autoContrast, equalize, rotate, solarize, color, posterize, contrast, brightness, sharpness, shear-x, shear-y, translate-x, translate-y.

1.2. M: Magnitude of Transformation

Example images augmented by RandAugment. In these examples N=2 and 3 magnitudes
  • The final set of parameters to consider is the magnitude of the each augmentation distortion.
  • Briefly, each transformation resides on an integer scale from 0 to 10 where a value of 10 indicates the maximum scale for a given transformation.

2. Experimental Results

2.1. RandAugment Studies

Optimal magnitude of augmentation depends on the size of the model and the training set
  • The Wide-ResNet (WRN) models are trained with the additional K=14 data augmentations and N=1, over a range of global distortion magnitudes M parameterized on a uniform linear scale ranging from [0, 30].
  • Dashed lines in (b) & (d): AutoAugment magnitude which is constant.
  • Two free parameters N and M specifying RandAugment are identified through a minimal grid search.

2.2. CIFAR & SVHN

Test accuracy (%) on CIFAR-10, CIFAR-100, SVHN and SVHN core set
  • CIFAR-10: The default augmentations for all methods include flips, pad-and-crop and Cutout. 1 setting for N and 5 settings for M (N=3 and tried 4, 5, 7, 9, and 11 for magnitude) are found using held-out val set.
  • CIFAR-100: Similar for CIFAR-100, 2 and 4 settings for N and M, are sampled respectively. (i.e. N={1, 2} and M={2, 6, 10, 14}). For WRN, Wide-ResNet-28–2 and Wide-ResNet-28–10, N=1, M=2 and N=2, M=14 achieves best results, respectively.
  • SVHN: N=3 and tried 5, 7, 9, and 11 for magnitude.

2.3. ImageNet

Top-1 and Top-5 accuracies (%) on ImageNet
  • RandAugment matches the performance of AutoAugment and Fast AutoAugment on the smallest model (ResNet-50).

2.4. COCO

Mean average precision (mAP) on COCO detection task
  • AutoAugment expended ~15K GPU hours for search, where as RandAugment was tuned by on merely 6 values of the hyperparameters.
  • N=1 and tried distortion magnitudes between 4 and 9.

2.5. Investigating Transformations

Average performance improves when more transformations are included in RandAugment
Average improvement due to each transformation on CIFAR-10 (N=3, M=4)

2.6. Learning the Probabilities for Selecting Image Transformations

Differentiable optimization for augmentation can improve RandAugment
  • αij is denoted as the learned probability of selecting image transformation i for operation j. For K=14 image transformations and N=2 operations, αij constitutes 28 parameters.
  • All weights are initialized such that each transformation is equal probability (i.e. RandAugment), and these parameters are updated based on how well a model classifies a held out set of validation images distorted by αij.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store