Abstract
Very recently, with the widespread research of deep learning, its achievements are increasingly evident in image inpainting tasks. However, many existing multi-stage methods fail to effectively inpaint larger missing areas; their common drawback is that the result of each stage is easily misguided by the wrong content generated in the previous stage. To solve this issue, this paper proposes a novel one-stage generative adversarial network based on a progressive decoding architecture and gradient guidance. Firstly, gradient priors are extracted at the encoder stage to be passed to the decoding branch, and a multiscale attention fusion group is used to help the network understand the image features. Secondly, multiple parallel decoding branches fill and refine the missing regions by top-down passing the reconstructed priors. This progressively guided repair avoids the detrimental effects of inappropriate priors. The joint guidance of features and gradient priors helps the restoration results contain the correct structure and rich details. Progressive guidance is achieved by a fusion strategy combining reimage convolution and channel coordinate attention to fuse and reweight the features of different branches. Finally, multiscale fusion merges the feature maps at different scales reconstructed by the last decoding branch and maps them to the image space, further improving semantic plausibility. Experiments on multiple datasets show that the qualitative and quantitative results of this computationally efficient model are competitive with state-of-the-art methods.
Introduction
Image inpainting—the process of reconstructing missing or damaged parts of an image—is a fundamental challenge in computer vision, particularly when dealing with large occlusions. Traditional state-of-the-art models often rely on multi-stage approaches that first generate a coarse low-resolution prediction and then refine it. However, these models suffer from "error propagation": if the initial coarse stage produces an incorrect semantic structure (e.g., misplacing a facial feature), the subsequent refinement stages merely polish that error rather than correcting it.
This paper introduces a one-stage, end-to-end model designed to overcome these limitations by utilizing structural "priors" in the form of gradient maps to guide the reconstruction process from the start, ensuring both global structural integrity and local textural detail.
Methodology
The proposed architecture is built upon three primary pillars designed to ensure structural accuracy and high-fidelity detail.
Progressive Decoder Architecture
Unlike standard architectures that use a single decoding pass, this model employs three parallel decoding branches. Features from the initial branch are passed down to subsequent branches, allowing the network to iteratively refine its internal representations in a "coarse-to-fine" manner within a single training step. This avoids the pitfalls of multi-stage models while retaining the benefits of iterative refinement.
Gradient Guidance and Attention Mechanisms
The model explicitly extracts gradient maps—representing edges and sharp boundaries—from the encoder. These are passed to the decoder via a Gradient Transfer Module, acting as a "skeleton" for the reconstruction. To manage these complex features, the authors implement several advanced modules:
- MAFG (Multiscale Attention Fusion Group): Positioned at the encoder's bottleneck to capture features across various scales.
- CCA (Channel Coordinate Attention): A strategy that reweights features to emphasize critical information while suppressing noise during branch fusion.
- MF (Multiscale Fusion): A final module that merges feature maps from different resolutions to ensure the output is semantically consistent and visually sharp.
Experiments and Results
The model was evaluated on the Places2 and CelebA-HQ datasets using the Nvidia Irregular Mask Dataset to simulate realistic damage.
Quantitative Performance
On the CelebA-HQ dataset, the model achieved superior results compared to previous leaders like MC-Net. Specifically, it reached an SSIM of 0.926 and a PSNR of 27.59 (compared to MC-Net's 0.916 and 26.63, respectively). Lower LPIPS scores further confirmed higher perceptual similarity to ground-truth images.
Qualitative Performance
Visual analysis demonstrated the model's strength in maintaining symmetry and structural logic, particularly in human faces. It successfully avoided common artifacts such as "checkerboard" patterns or blurry textures that often plague other deep learning-based inpainting methods when faced with large, irregular holes.
Conclusion
By integrating gradient guidance with a progressive decoding strategy, this one-stage GAN effectively mitigates the error propagation issues inherent in multi-stage models. While the current model requires pre-defined masks, future research will focus on "blind inpainting," enabling the network to automatically detect and repair damaged areas without human-provided guidance.
Summary updated