Abstract
This paper presents a high-performance, one-stage image inpainting framework designed to match the quality of complex two-stage models while significantly reducing computational overhead. The proposed architecture utilizes a Pyramid Filling Block (PF-block) to integrate high-level semantic guidance and a Bilateral Attention (BA) layer to ensure spatial and feature continuity. By employing a two-step training process followed by a single-pass inference stage, the model achieves state-of-the-art results with up to 30x faster inference speeds compared to existing methods.
Introduction
Image inpainting—the process of reconstructing missing or corrupted regions in an image—traditionally faces a trade-off between efficiency and semantic quality. High-quality "two-stage" models, which separate structure prediction from texture generation, are often computationally expensive. Conversely, existing "one-stage" methods frequently suffer from a "semantic chasm," where filled regions lack global coherence or exhibit structural distortions due to a lack of spatial awareness. This research introduces a novel framework that bridges this gap, delivering structural intelligence within a fast, one-stage inference pipeline.
Proposed Method
The core of the framework is a shared U-Net architecture optimized through a unique training and structural strategy.
Two-Step Training, One-Stage Inference
The model undergoes two distinct training phases: global structure reconstruction followed by fine texture generation. Weights from the first phase are transferred to the second to refine structural predictions. Crucially, during deployment, only a single pass through the network is required, ensuring high efficiency.
Pyramid Filling Block (PF-block)
The PF-block addresses the semantic gap by operating from "deep to shallow." It leverages high-level semantic features from the U-Net bottleneck to guide the filling process in lower-level feature maps. This ensures that fine-grained textures are grounded in a global understanding of the image content.
Bilateral Attention Layer (BA-layer)
Inspired by bilateral filtering, the BA-layer optimizes feature maps by considering both value similarity and spatial distance. Unlike standard global attention mechanisms that may ignore local continuity, the BA-layer ensures that generated pixels are both semantically consistent and spatially coherent with their surroundings.
Experiments and Results
The model was evaluated on the CelebA, Places2, and Paris StreetView datasets using irregular masks to simulate real-world damage.
Quantitative and Qualitative Performance
The proposed method demonstrated significant speed advantages, achieving an inference time of 8.8ms on the Paris StreetView dataset—nearly 30x faster than the Coherent Semantic Attention (CSA) method (261.6ms). Quantitatively, the model matched or exceeded state-of-the-art performance in PSNR and SSIM metrics. Qualitatively, the results showed superior structural alignment and fewer artifacts, such as "checkerboard" patterns, compared to baseline models.
Conclusion
This work demonstrates that high-quality image inpainting does not necessitate slow, multi-stage inference. By integrating semantic flow through the Pyramid Filling Block and spatial-aware attention via the Bilateral Attention layer, the authors provide a robust solution for real-time, high-fidelity image restoration. Future work will focus on further refining vertical pixel relationships and optimizing pyramid-level interactions for extremely large missing regions.
Summary updated