TL;DR
This paper introduces a novel approach to image inpainting that uses knowledge distillation to provide direct, feature-level supervision to an image encoder. By combining cross-network distillation from a "teacher" autoencoder and self-distillation within the network itself, along with dedicated "filler-blocks," the model generates significantly more consistent structures and textures in missing image regions compared to previous two-stage or handcrafted methods.
What Problem Does This Paper Address?
Image inpainting—the art of filling in missing or damaged parts of an image—is a classic computer vision challenge. While deep learning has pushed the field forward, many current models still produce blurry textures or distorted structures that don't match the surrounding area.
The authors argue that the root cause is the encoder's ineffectiveness. In a standard encoder-decoder setup, the encoder struggles to create a faithful representation (embedding) of a region that is completely empty. Existing "two-stage" solutions try to fix this by first generating a coarse sketch (like edges or contours) and then refining it. However, these are often computationally expensive and limited by the quality of the handcrafted features they rely on. This paper seeks a more efficient way to "teach" the encoder how to handle holes from the very first layers.
Methods
The authors propose a single-stage architecture enhanced by two primary strategies:
- Knowledge Distillation (Cross and Self):
- Cross-Distillation: The team uses an "off-the-shelf" autoencoder trained on ground-truth (GT) images as a teacher. Since the teacher sees the complete image, its internal features are "perfect." The inpainting encoder (the student) is trained to mimic these high-quality features specifically for the masked regions.
- Self-Distillation: They observe that deeper layers in an inpainting network naturally contain more "complete" information as the features propagate. They use this to provide supervision for shallower layers, forcing the early parts of the network to better anticipate the final filled-in content.
- Dedicated Filler-Blocks: Standard encoders try to do two things at once: extract features from valid pixels and fill in the holes. To ease this burden, the authors introduce filler-blocks (referred to as Adaptive Filtering Blocks in the architecture). These are parallel, lightweight residual blocks that use adaptive convolutions. These convolutions allow the network to dynamically decide where to look in the neighborhood to find the best information to fill a specific hole.
Datasets
The model was evaluated on three standard benchmarks for image inpainting:
- Places2: A massive dataset of various scenes and environments.
- CelebA: A dataset of face images, which are particularly challenging due to intricate human features.
- Paris Street View: Images of cityscapes and architectural details.
The researchers used a dataset of 12,000 irregular masks, with hole sizes ranging from 0% to 60% of the total image area.
Key Insights and Ideas
- The Ground Truth is an Underutilized Teacher: Most models only use the ground truth image at the very end to calculate loss. This paper shows that the ground truth's internal feature representations (via a teacher network) can provide vital "hints" to the encoder during training.
- Encoders Need Specialization: By adding "filler-blocks," the main encoder layers can focus on understanding the scene (feature extraction), while the dedicated blocks focus on the "hallucination" task of filling holes.
- Adaptive Convolutions vs. Fixed Kernels: Instead of using standard or dilated convolutions with fixed weights, adaptive convolutions allow the model to adjust its "receptive field" based on the specific image content, which is crucial for maintaining structural consistency across different types of images.
Key Results
The proposed method consistently outperformed several state-of-the-art models, including PIC (Pluralistic Image Completion) and EC (EdgeConnect).
Quantitative Performance: As shown in the table below, the "Ours" model achieved the highest scores in both Structural Similarity Index (SSIM) and Peak Signal-to-Noise Ratio (PSNR) across all datasets and mask ratios. For example, on the CelebA dataset with a 30-40% mask ratio, the model achieved a PSNR of 27.84, significantly higher than the next best competitor at 26.94.
Qualitative Performance: Visually, the results are much cleaner. In face inpainting (CelebA), the model avoids the "uncanny valley" distortions often seen in other methods. In architectural scenes (Paris Street View), it maintains straight lines and consistent textures where other models produce visible seams or blurriness.
Limitations and Future Work
While the paper demonstrates significant improvements, it does not explicitly detail specific failure cases or limitations. However, the authors note that the choice of how to "break down" the teacher and student networks for distillation is a complex problem that warrants further study. Future work might involve exploring different teacher architectures or more complex "meta-networks" to further refine which features are most beneficial to transfer during the distillation process.
Summary updated