We propose AugMix, a data processing technique that mixes augmented images and enforces consistent embeddings of the augmented images, which results in increased robustness and improved uncertainty calibration. AugMix does not require tuning to work correctly, as with random cropping or CutOut, and thus enables plug-and-play data augmentation. AugMix significantly improves robustness and uncertainty measures on challenging image classification benchmarks, closing the gap between previous methods and the best possible performance by more than half in some cases. With AugMix, we obtain state-of-the-art on ImageNet-C, ImageNet-P and in uncertainty estimation when the train and test distribution do not match.


  • torchvision==0.2.2


  1. Install PyTorch and other required python libraries with:

    pip install -r requirements.txt
  2. Download CIFAR-10-C and CIFAR-100-C datasets with:

    mkdir -p ./data/cifar
    curl -O
    curl -O
    tar -xvf CIFAR-100-C.tar -C data/cifar/
    tar -xvf CIFAR-10-C.tar -C data/cifar/
  3. Download ImageNet-C with:

    mkdir -p ./data/imagenet/imagenet-c
    curl -O
    curl -O
    curl -O
    curl -O
    tar -xvf blur.tar -C data/imagenet/imagenet-c
    tar -xvf digital.tar -C data/imagenet/imagenet-c
    tar -xvf noise.tar -C data/imagenet/imagenet-c
    tar -xvf weather.tar -C data/imagenet/imagenet-c


Training recipes used in our paper:

WRN: python

AllConv: python -m allconv

ResNeXt: python -m resnext -e 200

DenseNet: python -m densenet -e 200 -wd 0.0001

ResNet-50: python <path/to/imagenet> <path/to/imagenet-c>

Pretrained weights

Pretrained weights for ResNet-50 trained with AugMix on ImageNet are available

This model was measured at 66.2 mCE and 77.06% top-1 accuracy.