Abstract
GridMask is a novel data augmentation technique designed to improve the performance of convolutional neural networks (CNNs) by dropping image regions in a structured, grid-like pattern. Unlike existing methods like Cutout or Hide-and-Seek, which often suffer from excessive deletion or reservation of information, GridMask achieves a superior balance by ensuring that parts of the object are consistently masked while others remain visible. This structured approach forces the network to learn from context and a wider variety of features. Evaluated across classification, detection, and segmentation tasks, GridMask consistently outperforms complex search-based methods like AutoAugment with minimal computational overhead.
Introduction
Deep learning models, particularly CNNs, are notorious for overfitting due to their massive number of parameters. Data augmentation is the standard remedy, but not all augmentation is created equal. The authors focus on "information dropping" methods, which aim to improve robustness by deleting parts of the input image.
Existing techniques like Cutout (deleting one large continuous block) or Hide-and-Seek (deleting random small squares) often suffer from two extremes: excessive deletion, where the entire object of interest is removed, or excessive reservation, where the object is left completely untouched. The challenge is finding a "Goldilocks" balance—removing enough information to force the network to learn from context without destroying the semantic content of the image.
Methods
The authors propose GridMask, a structured information-dropping method. Instead of random blocks, it applies a uniform grid of squares where pixels are set to zero. The method is defined by four key parameters:
- $r$: The ratio of the preserved region within a grid unit (determines the "keep ratio").
- $d$: The size of one grid unit.
- $\delta_x, \delta_y$: Random offsets to shift the grid so the network doesn't learn to ignore specific pixel coordinates.
Unlike AutoAugment, which requires thousands of GPU hours to find optimal policies, GridMask is a simple, hand-crafted rule. The authors also found that scheduling matters: linearly increasing the probability of applying GridMask as training progresses yields better results than using a constant probability from the start.
Key Insights and Visualizations
The core advantage of GridMask is its ability to force holistic learning. By masking out primary features, the model is compelled to recognize secondary features (e.g., recognizing a bird by its wings or body when the beak is masked). Using Class Activation Mapping (CAM), the authors show that models trained with GridMask focus on larger, more distributed regions of an object compared to baseline models or even those trained with AutoAugment.
Key Results
GridMask consistently improved performance over strong baselines across various industry-standard benchmarks:
- ImageNet-1K: Improved ResNet50 top-1 accuracy from 76.5% to 77.9% (+1.4%), outperforming AutoAugment (77.6%).
- CIFAR10: Boosted ResNet18 accuracy by 1.26%, reaching 96.54%.
- Object Detection (COCO): Increased mAP for Faster R-CNN from 37.4% to 39.2% (+1.8%).
- Semantic Segmentation (Cityscapes): Improved PSPNet50 mIoU from 77.3% to 78.1% (+0.8%).
Conclusion
GridMask provides a simple, structured, and efficient alternative to computationally expensive search-based augmentation methods. By ensuring a statistical balance between information deletion and reservation, it acts as a robust regularizer that is easy to implement and broadly applicable across virtually any computer vision task.
Summary updated