MEGA-NET: an image inpainting method based on attention fusion and multi-scale guidance
摘要
Image inpainting for large missing regions faces three major challenges: insufficient global context modeling, blurred local details, and incomplete preservation of structural and textural information during decoding. To address these issues, this paper proposes MEGA-NET, a single-stage inpainting model integrating attention mechanisms with multi-scale guidance. The model employs a Fast Fourier Convolution (FFC) module to significantly expand the receptive field and capture long-range contextual dependencies. However, relying solely on FFC may lead to insufficient local feature representation. Therefore, a Global Channel-Spatial Attention (GCSA) mechanism is designed to adaptively recalibrate channel-wise and spatial features, enhancing local detail fidelity and ensuring natural coherence of restored textures with surrounding structures. Meanwhile, to preserve the enhanced representations during decoding, an Efficient Upsampling Convolution Block (EUCB) is introduced to replace conventional convolutional upsampling, effectively mitigating information loss while maintaining structural and textural consistency. Multi-scale discriminators are used for adversarial training, allowing the model to balance local details and global structure across different scales. Experimental results on benchmark datasets including CelebA-HQ and Paris StreetView demonstrate that MEGA-NET significantly outperforms state-of-the-art methods, achieving improved global coherence and visually natural restoration quality, especially in complex scenes with large missing regions.