TL;DR
This paper explores how the shape and orientation of "holes" used during training affect the robustness of image in-painting networks. The researchers demonstrate that training on simple axis-aligned rectangles leads to fragile models, while introducing random rotations or complex geometric shapes significantly improves a network's ability to generalize to unseen occlusion patterns.
What Problem Does This Paper Address?
Image in-painting—the task of filling in missing or masked regions of an image—is a staple of modern computer vision. While many architectures exist, they are often trained and tested on specific types of masks (e.g., just rectangles or specific irregular shapes).
The authors identify a critical gap: relative robustness. If you train a model to fill in rectangular holes, how well does it perform when faced with brushstrokes or complex object silhouettes? The paper investigates whether in-painting networks develop a "natural bias" toward their training hole distributions and how the underlying image dataset influences this sensitivity.
Methods
The authors employ an empirical approach, building a "train-test grid" to cross-compare performance across different hole geometries.
The Architecture
They utilize a U-Net style encoder-decoder network featuring:
- Partial Convolutions: In the encoder, these ensure that the convolution operation only considers "valid" pixels, preventing the "hole" values from contaminating the early feature maps.
- Core Complex: A central block of eight layers using dilated convolutions to increase the receptive field without increasing parameter count.
Hole Geometry Distributions
The study compares four distinct Probability Distribution Functions (PDFs) for holes:
- Random Rectangles (RR): Simple axis-aligned boxes.
- Randomly Rotated Rectangles (R4): Rectangles at arbitrary angles.
- Random Geometric Shapes (RGS): Lines, circles, and curves.
- Random Flow-based Masks (RFOM): Complex shapes derived from video occlusion data.
Evaluation Framework
Beyond standard metrics ($L_1$ loss, PSNR, SSIM), the authors propose a "Holistic" Relative Robustness score. This heuristic combines normalized versions of these metrics to provide a single value representing how well a model generalizes across all test hole distributions.
Datasets
- MIT Places: A large-scale dataset of diverse scenes. The authors used both the validation set (~36k images) for quick iterations and the full dataset (1.8M images) to confirm trends.
- CUHK Celeb-A: A dataset of face images. Interestingly, the authors found Celeb-A to be a better "separator"—it revealed differences in model robustness more clearly than the Places dataset.
Key Insights and Ideas
- The Alignment Trap (H2): Models trained only on axis-aligned rectangles (RR) are significantly less robust. The authors hypothesize that when hole edges align perfectly with square convolution kernels, the network learns "lazy" features that fail when edges are diagonal or curved.
- Rotation is a "Cheap" Robustness Hack: Simply adding random rotations to rectangular masks (R4) makes a model nearly as robust as one trained on highly complex flow-based masks (RFOM). This suggests that edge orientation diversity is more important than the specific complexity of the shape.
- Dataset Edge Distribution (H4): The ability of a dataset to differentiate model robustness correlates with its edge gradient distribution. Celeb-A, which has a more even distribution of edge directions, proved more effective at exposing model weaknesses than the Places dataset, which is dominated by horizontal and vertical lines (e.g., horizons, buildings).
Key Results
The "Holistic" robustness scores (where higher is better) clearly show the hierarchy of training strategies:
| Training Distribution | Holistic Score (Places) | Holistic Score (Celeb-A) |
|---|---|---|
| RR (Rectangles) | 2.10 | 2.17 |
| R4 (Rotated) | 2.86 | 2.90 |
| RFOM (Flow-based) | 2.99 | 2.97 |
Models trained on RR performed well only on RR tests but plummeted when tested on other shapes. In contrast, RFOM and R4 models maintained high performance across the board. The $L_1$ reconstruction error was found to be the most sensitive metric for detecting these robustness gaps.
Limitations and Future Work
- Limited Hole Types: The study only looked at four distributions. Real-world occlusions (like text or specific object shapes) might present different challenges.
- Loss Function Interaction: Preliminary results in the supplementary material suggest that changing the loss function (e.g., adding GAN-based discriminative losses) might alter the dominance order of robustness, a topic the authors mark for future study.
- Regularization: The authors suggest exploring whether mixing different hole classes during a single training run could act as a superior form of regularization.
- Adversarial Holes: A promising direction involves finding "adversarial" hole patterns specifically designed to break an in-painting system.
Summary updated