Random Erasing Data Augmentation

Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, Yi Yang

TL;DR

This paper introduces "Random Erasing," a simple yet effective data augmentation technique for Convolutional Neural Networks (CNNs). By randomly masking out rectangular regions of an image with random pixel values during training, Random Erasing simulates occlusions, making models more robust to real-world scenarios and reducing overfitting. This method consistently improves performance across image classification, object detection, and person re-identification tasks.

What Problem Does This Paper Address?

Deep learning models, particularly CNNs, are prone to overfitting when faced with complex architectures and limited training data. This overfitting leads to poor generalization on unseen data. A significant real-world challenge that hinders generalization is occlusion – when parts of an object are hidden. While existing data augmentation techniques like random cropping and flipping help, they don't fully address the problem of partial occlusion in a naturalistic way. Manually creating occluded datasets is costly and often limited in variety. The paper aims to provide an easy-to-implement, parameter-free data augmentation method that specifically tackles the issue of occlusion to improve model robustness and generalization.

Methods

The core contribution is the Random Erasing data augmentation technique. During the training phase, for each image, there's a probability p that Random Erasing will be applied. If applied, the method randomly selects a rectangular region within the image. The pixels within this selected region are then replaced with random values (or, alternatively, the mean pixel value from the ImageNet dataset). This process effectively generates training images with varying levels of simulated occlusion.

Key aspects of the method include:

  • Random Region Selection: The size and aspect ratio of the erased rectangle are randomly sampled within defined ranges.
  • Random Pixel Values: The erased pixels are filled with random values, mimicking noise or partial obstruction.
  • Parameter-Free: Unlike some other augmentation methods, Random Erasing doesn't require learning additional parameters.
  • Integration: It's designed to be easily integrated into existing CNN architectures without modifying the core learning strategy.

The paper also explores variations for object detection, including:

  • Image-aware Random Erasing (IRE): Erasing occurs on the whole image.
  • Object-aware Random Erasing (ORE): Erasing is confined to the bounding box of detected objects.
  • Image and Object-aware Random Erasing (I+ORE): A combination of IRE and ORE.

Datasets

The paper evaluates its method on several standard datasets:

  • Image Classification:
    • CIFAR-10 (32x32 color images, 10 classes)
    • CIFAR-100 (32x32 color images, 100 classes)
    • Fashion-MNIST (28x28 grayscale images, 10 classes)
  • Object Detection:
    • PASCAL VOC 2007 (images with annotated objects)
  • Person Re-identification (re-ID):
    • Market-1501
    • DukeMTMC-reID
    • CUHK03

No new benchmarks were introduced; the focus was on evaluating Random Erasing on existing, well-established datasets.

Key Insights and Ideas

  • Simulating Occlusion is Crucial: The paper strongly suggests that explicitly training models to be robust to occlusions is a key factor in improving generalization, especially in real-world scenarios where objects are rarely perfectly visible.
  • Simplicity is Powerful: Random Erasing is remarkably simple to implement and requires no additional parameter learning, making it highly practical for researchers and practitioners.
  • Complementary to Existing Methods: Random Erasing doesn't replace existing augmentation techniques like random cropping and flipping; instead, it complements them, leading to even greater performance gains when combined.
  • Robustness to Occlusion: The method demonstrably improves a model's ability to perform well even when presented with occluded test images, a significant advantage for practical applications.
  • Random Pixel Values vs. Mean Pixel: Erasing with random pixel values (RE-R) and erasing with the ImageNet mean pixel value (RE-M) yield very similar, strong performance, suggesting that the act of erasing and replacing is more critical than the specific value used.

Key Results

  • Image Classification: Random Erasing consistently improved accuracy across various CNN architectures (ResNet, Pre-activation ResNet, ResNeXt, Wide Residual Networks) on CIFAR-10, CIFAR-100, and Fashion-MNIST. For instance, it achieved a new state-of-the-art error rate of 3.08% on CIFAR-10 using WRN-28-10, a 0.72% improvement.
  • Object Detection: The I+ORE scheme (Image and Object-aware Random Erasing) improved the mean Average Precision (mAP) on the PASCAL VOC 2007 dataset, outperforming the Fast-RCNN baseline and the A-Fast-RCNN method by 0.5%.
  • Person Re-identification: Random Erasing consistently boosted performance (rank-1 accuracy and mAP) across different baseline models (IDE, TriNet, SVDNet) on Market-1501, DukeMTMC-reID, and CUHK03 datasets. For example, it improved SVDNet's rank-1 accuracy on DukeMTMC-reID from 76.82% to 79.31%.
  • Robustness: When tested with increasing levels of occlusion, models trained with Random Erasing showed significantly slower performance degradation compared to baseline models. For example, at 50% occlusion, Random Erasing achieved a 56.36% error rate, while the baseline reached 75.04%.

Limitations and Future Work

  • Limitations:
    • The paper notes that while Random Erasing is effective, it can sometimes be sensitive to the choice of hyper-parameters (erasing probability p, area ratio range s, and aspect ratio range r). However, it also shows that the method is robust across a range of these parameters.
  • For person re-identification on CUHK03, the paper mentions that over-fitting can still be an issue due to limited training data, although Random Erasing helps mitigate this.
  • Future Work: The authors suggest applying Random Erasing to other CNN recognition tasks, such as image retrieval and face recognition, indicating its broad applicability.

Summary updated

Abstract

In this paper, we introduce Random Erasing, a new data augmentation method for training the convolutional neural network (CNN). In training, Random Erasing randomly selects a rectangle region in an image and erases its pixels with random values. In this process, training images with various levels of occlusion are generated, which reduces the risk of over-fitting and makes the model robust to occlusion. Random Erasing is parameter learning free, easy to implement, and can be integrated with most of the CNN-based recognition models. Albeit simple, Random Erasing is complementary to commonly used data augmentation techniques such as random cropping and flipping, and yields consistent improvement over strong baselines in image classification, object detection and person re-identification. Code is available at: https://github.com/zhunzhong07/Random-Erasing.
BibTeX
@inproceedings{zhong2020random,
  author = {Zhun Zhong and Liang Zheng and Guoliang Kang and Shaozi Li and Yi Yang},
  title = {{Random Erasing Data Augmentation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i07.7000},
}
Figure