arXiv(opens in a new tab)Computer ScienceAug 2017Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:1708.04896

Random Erasing Data Augmentation

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

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.

1 Introduction

The ability to generalize is a research focus for the convolutional neural network (CNN). When a model is excessively complex, such as having too many parameters compared to the number of training samples, over-fitting might happen and weaken its generalization ability. A learned model may describe random error or noise instead of the underlying data distribution [35]. In bad cases, the CNN model may exhibit good performance on the training data, but fail drastically when predicting new data. To improve the generalization ability of CNNs, many data augmentation and regularization approaches have been proposed, such as random cropping [14], flipping [21], dropout [22], and batch normalization [11].

Occlusion is a critical influencing factor on the generalization ability of CNNs. It is desirable that invariance to various levels of occlusion is achieved. When some parts of an object are occluded, a strong classification model should be able to recognize its category from the overall object structure. However, the collected training samples usually exhibit limited variance in occlusion. In an extreme case when all the training objects are clearly visible, i.e., no occlusion happens, the learned CNN will probably work well on testing images without occlusion, but, due to the limited generalization ability of the CNN model, may fail to recognize objects which are partially occluded. While we can manually add occluded natural images to the training set, it is costly and the levels of occlusion might be limited.

Figure

Figure 1: Examples of Random Erasing. In CNN training, we randomly choose a rectangle region in the image and erase its pixels with random values or the ImageNet mean pixel value. Images with various levels of occlusion are thus generated.

To address the occlusion problem and improve the generalization ability of CNNs, this paper introduces a new data augmentation approach, Random Erasing. It can be easily implemented in most existing CNN models. In the training phase, an image within a mini-batch randomly undergoes either of the two operations: 1) kept unchanged; 2) we randomly choose a rectangle region of an arbitrary size, and assign the pixels within the selected region with random values (or the ImageNet [5] mean pixel value). During Operation 2), an image is partially occluded in a random position with a random-sized mask. In this manner, augmented images with various occlusion levels can be generated. Examples of Random Erasing are shown in Fig. 1.

Two commonly used data augmentation approaches, i.e., random flipping and random cropping, also work on the image level and are closely related to Random Erasing. Both techniques have demonstrated the ability to improve the image recognition accuracy. In comparison with Random Erasing, random flipping does not incur information loss during augmentation. Different from random cropping, in Random Erasing, 1) only part of the object is occluded and the overall object structure is preserved, 2) pixels of the erased region are re-assigned with random values, which can be viewed as adding block noise to the image.

Working primarily on the fully connected (FC) layer, Dropout [22] is also related to our method. It prevents over-fitting by discarding (both hidden and visible) units of the CNN with a probability pp. Random Erasing is somewhat similar to performing Dropout on the image level. The difference is that in Random Erasing, 1) we operate on a continuous rectangular region, 2) no pixels (units) are discarded, and 3) we focus on making the model more robust to noise and occlusion. The recent A-Fast-RCNN [27] proposes an occlusion invariant object detector by training an adversarial network that generates examples with occlusion. Comparison with A-Fast-RCNN, Random Erasing does not require any parameter learning, can be easily applied to other CNN-based recognition tasks and still yields competitive accuracy with A-Fast-RCNN in object detection. To summarize, Random Erasing has the following advantages:

  • A lightweight method that does not require any extra parameter learning or memory consumption. It can be integrated with various CNN models without changing the learning strategy.
  • A complementary method to existing data augmentation and regularization approaches. When combined, Random Erasing further improves the recognition performance.
  • Consistently improving the performance of recent state-of-the-art deep models on image classification, object detection, and person re-ID.
  • Improving the robustness of CNNs to partially occluded samples. When we randomly adding occlusion to the CIFAR-10 testing dataset, Random Erasing significantly outperforms the baseline model.

References (40)

  • Adaptive dropout for training deep neural networks
  • Sparse contextual activation for efficient visual re-ranking
  • Scalable person re-identification on supervised smoothed manifold
  • Person re-identification by deep learning multi-scale representations
  • Li, K. Li, and L. Fei-Fei
  • The pascal visual object classes (voc) challenge
  • Deep residual learning for image recognition
  • Identity mappings in deep residual networks
  • A. Hermans, L. Beyer, and B. Leibe. In defense of the triplet loss for person re-identification. arXiv preprint arXiv:1703.07737, 2017. (opens arXiv in a new tab)
  • Batch normalization: Accelerating deep network training by reducing internal covariate shift
  • Patchshuffle regularization (opens arXiv in a new tab)
  • Learning multiple layers of features from tiny images
  • Imagenet classification with deep convolutional neural networks
  • Learning deep context-aware features over body and latent parts for person re-identification
  • Deepreid: Deep filter pairing neural network for person re-identification
  • Person re-identification by deep joint learning of multi-loss classification
  • Person re-identification by local maximal occurrence representation and metric learning
  • Performance measures and a data set for multi-target, multi-camera tracking
  • Person re-identification by deep learning attribute-complementary information
  • Very deep convolutional networks for large-scale image recognition
  • Dropout: a simple way to prevent neural networks from overfitting
  • Pose-driven deep convolutional model for person re-identification
  • SVDNet for pedestrian retrieval
  • Gated siamese convolutional neural network architecture for human re-identification
  • Regularization of neural networks using dropconnect
  • A-fast-rcnn: Hard positive generation via adversary for object detection
  • Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms
  • Joint detection and identification feature learning for person search
  • Disturblabel: Regularizing cnn on the loss layer
  • Aggregated residual transformations for deep neural networks
  • Divide and fuse: A re-ranking approach for person re-identification
  • Wide residual networks
  • Stochastic pooling for regularization of deep convolutional neural networks
  • Understanding deep learning requires rethinking generalization
  • Learning a discriminative null space for person re-identification
  • Deeply-learned part-aligned representations for person re-identification
  • Scalable person re-identification: A benchmark
  • Person re-identification: Past, present and future (opens arXiv in a new tab)
  • Unlabeled samples generated by gan improve the person re-identification baseline in vitro
  • Re-ranking person re-identification with k-reciprocal encoding