RICAP: Random Image Cropping and Patching Data Augmentation for Deep CNNs

Ryo Takahashi, Takashi Matsubara, Kuniaki Uehara

Abstract

Deep Convolutional Neural Networks (CNNs) are prone to overfitting due to their high capacity. While data augmentation techniques like Cutout and Mixup have been proposed to improve generalization, they often involve information loss or unrealistic pixel blending. This paper presents Random Image Cropping and Patching (RICAP), a data augmentation technique that constructs new training samples by randomly cropping four images and patching them into a single frame. RICAP mixes both visual features and class labels, forcing the model to learn from partial features and providing implicit label smoothing. Experimental results demonstrate that RICAP achieves state-of-the-art performance, including a 2.23% error rate on CIFAR-10.

Introduction

The performance of deep CNNs is often limited by overfitting. Standard data augmentation techniques, such as horizontal flipping and random cropping, provide limited variety. More recent methods like Cutout mask portions of an image, while Mixup blends two images linearly. However, Cutout discards information, and Mixup creates unnatural images. RICAP addresses these issues by stitching together four distinct image patches, preserving local spatial integrity while significantly increasing the diversity of training samples.

Methodology

The RICAP procedure involves three primary steps:

  1. Selection: Four images are randomly sampled from the training set.
  2. Cropping and Patching: A boundary position $(w, h)$ is randomly selected within the target image dimensions $(I_x, I_y)$. This point divides the final image into four quadrants. Each quadrant is filled with a random crop from one of the four selected images.
  3. Label Mixing: The target label for the new image is calculated as a weighted average of the four original labels, where the weights correspond to the area ratio of each patch in the final image.
Overview of the RICAP process, showing four source images being cropped and patched into a single training sample.

The authors explored different distributions for the boundary point $(w, h)$, finding that "corner-RICAP"—where the boundary is biased towards the edges—often yields the best results by allowing one image to dominate while others provide minor regularizing features.

Geometric parameters (w, h) defining the patch boundaries within the target image dimensions (Ix, Iy).

Key Insights

RICAP provides several advantages for training deep networks:

  • Partial Feature Learning: By presenting only portions of objects, the network is forced to identify classes based on subsets of features, enhancing robustness.
  • Implicit Label Smoothing: The mixed labels prevent the model from becoming overconfident, acting as a powerful regularizer.
  • Spatial Integrity: Unlike Mixup, RICAP maintains original pixel values and local textures, avoiding the "ghosting" effects of pixel blending.

Results

RICAP was evaluated on standard benchmarks, consistently outperforming baseline models and competing augmentation methods:

  • CIFAR-10: Achieved a 2.23% test error using the Shake-Shake architecture, surpassing Mixup (2.48%) and Cutout (2.56%).
  • CIFAR-100: Reduced error to 17.44% on WideResNet, compared to the 18.85% baseline.
  • ImageNet: Improved Top-1 error on WideResNet-50 to 21.70%, demonstrating scalability to large-scale datasets.

Conclusion

RICAP is an effective and simple data augmentation technique that improves the generalization of deep CNNs. By patching together four images and mixing their labels, it encourages the learning of diverse features and provides robust regularization. Future work may extend RICAP to tasks such as image captioning or object detection.

Summary updated

BibTeX
@inproceedings{takahashi2018ricap,
  author = {Ryo Takahashi and Takashi Matsubara and Kuniaki Uehara},
  title = {{RICAP: Random Image Cropping and Patching Data Augmentation for Deep CNNs}},
  booktitle = {ACML},
  year = {2018},
}
Figure