Home

Awesome

Random Erasing Data Augmentation

===============================================================

Examples

blackwhiterandom
i1i2i3
i4i5i6

This code has the source code for the paper "Random Erasing Data Augmentation".

If you find this code useful in your research, please consider citing:

@inproceedings{zhong2020random,
title={Random Erasing Data Augmentation},
author={Zhong, Zhun and Zheng, Liang and Kang, Guoliang and Li, Shaozi and Yang, Yi},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence (AAAI)},
year={2020}
}

Other re-implementations

[Official Torchvision in Transform]

[Pytorch: Random Erasing for ImageNet]

[Python Augmentor]

[Person_reID CamStyle]

[Person_reID_baseline + Random Erasing + Re-ranking]

[Keras re-implementation]

Installation

Requirements for Pytorch (see Pytorch installation instructions)

Examples:

CIFAR10

ResNet-20 baseline on CIFAR10: python cifar.py --dataset cifar10 --arch resnet --depth 20

ResNet-20 + Random Erasing on CIFAR10: python cifar.py --dataset cifar10 --arch resnet --depth 20 --p 0.5

CIFAR100

ResNet-20 baseline on CIFAR100: python cifar.py --dataset cifar100 --arch resnet --depth 20

ResNet-20 + Random Erasing on CIFAR100: python cifar.py --dataset cifar100 --arch resnet --depth 20 --p 0.5

Fashion-MNIST

ResNet-20 baseline on Fashion-MNIST: python fashionmnist.py --dataset fashionmnist --arch resnet --depth 20

ResNet-20 + Random Erasing on Fashion-MNIST: python fashionmnist.py --dataset fashionmnist --arch resnet --depth 20 --p 0.5

Other architectures

For ResNet: --arch resnet --depth (20, 32, 44, 56, 110)

For WRN: --arch wrn --depth 28 --widen-factor 10

Our results

You can reproduce the results in our paper:

 CIFAR10CIFAR10CIFAR100CIFAR100Fashion-MNISTFashion-MNIST
Models Base.+REBase.+REBase.+RE
ResNet-20 7.216.7330.8429.974.394.02
ResNet-32 6.415.6628.5027.184.163.80
ResNet-44 5.535.1325.2724.294.414.01
ResNet-56 5.314.8924.8223.694.394.13
ResNet-110 5.104.6123.7322.104.404.01
WRN-28-10 3.803.0818.4917.734.013.65

NOTE THAT, if you use the latest released Fashion-MNIST, the performance of Baseline and RE will slightly lower than the results reported in our paper. Please refer to the issue.

If you have any questions about this code, please do not hesitate to contact us.

Zhun Zhong

Liang Zheng