Abstract
This paper introduces collaGAN, a collaborative adversarial learning framework designed to improve face inpainting. Unlike traditional methods that learn facial semantics implicitly, collaGAN forces the model to simultaneously perform landmark detection and semantic segmentation. By explicitly incorporating geometric and part-based knowledge, the framework achieves superior structural consistency and realism, bridging the "uncanny valley" often found in generative face completion.
Introduction: The Semantic Gap in Inpainting
Traditional image inpainting often relies on texture synthesis or background matching, which is insufficient for structured objects like human faces. Filling a missing eye requires more than just matching surrounding skin tones; it requires a deep understanding of facial symmetry, feature placement, and semantic parts.
While Generative Adversarial Networks (GANs) have advanced the field, they typically learn these structures implicitly. This often leads to artifacts such as mismatched eyes or misplaced mouths. The authors propose to bridge this gap by making semantic understanding an explicit component of the training process through multi-task learning.
Methods: Collaborative Adversarial Learning (collaGAN)
The core innovation is the Collaborative Adversarial Learning (collaGAN) framework. Instead of a single-task generator, the model employs a multi-task approach to leverage the synergy between inpainting, segmentation, and landmark detection.
1. Multi-Task Generator
The generator ($G$) is a single encoder-decoder network with U-Net style skip connections. It takes a masked image and outputs three distinct representations simultaneously:
- $G^i(x, z)$: The inpainted image.
- $G^s(x, z)$: A semantic segmentation mask.
- $G^d(x, z)$: A landmark detection heatmap.
2. Dedicated Discriminators
To ensure high-quality outputs for each task, the model uses three separate discriminators ($D_i, D_s, D_d$). This ensures that the generated segmentation and landmarks are as spatially contiguous and realistic as the image itself.
3. Inpainting Concentrated Scheme
To prevent the model from wasting capacity on reconstructing unmasked regions, the authors use a scheme where the discriminator only evaluates the inpainted region merged back into the original ground-truth context. This forces the network to focus exclusively on the coherence between the "hole" and the "whole."
Datasets and Training
The model was trained on the CelebA dataset, containing over 200,000 face images. Notably, the researchers chose not to align the faces by the eyes. This lack of alignment forces the model to learn the actual spatial distribution of features rather than relying on a fixed template. Training involved various augmentations (rotation, scaling) and three types of masks: random blocks, pattern masks, and high-density noise masks.
Key Insights
- Knowledge Sharing: Learning where a landmark is (detection) informs the model where to draw features (inpainting), while segmentation boundaries help maintain sharpness.
- Internal Coherence: The generated segmentation masks align perfectly with the inpainted results, proving that the tasks share a common internal representation of facial structure.
- Skip Connections: These are critical for maintaining spatial coherence between the existing context and the newly generated pixels.
Results and Performance
CollaGAN outperformed state-of-the-art models like Context Encoders (CE) and Generative Face Completion (GFC) both qualitatively and quantitatively.
- Symmetry and Sharpness: The model produced significantly better symmetry (e.g., matching eye color and size) and sharper feature boundaries.
- Quantitative Gains: The model achieved the highest PSNR and SSIM across various missing-part scenarios.
- Cross-Task Boost: Integrating inpainting and segmentation tasks reduced landmark localization error by 27.7% (from 2.38 to 1.72 pixels), confirming that learning to "draw" helps the model "see" better.
Conclusion
By explicitly integrating semantic and geometric knowledge through collaborative learning, collaGAN sets a new standard for realistic face completion. Future work may extend this framework to more complex scenes where multiple objects require coordinated semantic understanding.
Summary updated