[Paper Review] Resolution-robust Large Mask Inpainting with Fourier Convolutions
This paper proposes LaMa, a resolution-robust single-stage image inpainting method using fast Fourier convolutions (FFCs) to achieve full-image receptive fields from early network layers. By combining FFC-based architecture, a high-receptive-field perceptual loss, and aggressive large-mask training data augmentation, LaMa achieves state-of-the-art performance on large masks and generalizes effectively to higher resolutions than seen during training, with fewer parameters and inference cost than prior methods.
Modern image inpainting systems, despite the significant progress, often struggle with large missing areas, complex geometric structures, and high-resolution images. We find that one of the main reasons for that is the lack of an effective receptive field in both the inpainting network and the loss function. To alleviate this issue, we propose a new method called large mask inpainting (LaMa). LaMa is based on i) a new inpainting network architecture that uses fast Fourier convolutions (FFCs), which have the image-wide receptive field; ii) a high receptive field perceptual loss; iii) large training masks, which unlocks the potential of the first two components. Our inpainting network improves the state-of-the-art across a range of datasets and achieves excellent performance even in challenging scenarios, e.g. completion of periodic structures. Our model generalizes surprisingly well to resolutions that are higher than those seen at train time, and achieves this at lower parameter&time costs than the competitive baselines. The code is available at \url{https://github.com/saic-mdal/lama}.
Motivation & Objective
- To address the limitations of existing inpainting models in handling large masks and complex structures, especially in high-resolution settings.
- To overcome the insufficient effective receptive field in standard convolutional networks and perceptual losses, which hinders global structure understanding.
- To develop a single-stage inpainting framework that outperforms two-stage or complex architectures with reduced computational cost.
- To enable generalization to high-resolution images without requiring high-res training data.
Proposed method
- The method employs a feed-forward, ResNet-like generator network based on fast Fourier convolutions (FFCs), which provide an image-wide receptive field even in early layers.
- A high-receptive-field perceptual loss is used, based on a semantic segmentation backbone with large context, to enforce consistency in global shapes and structures.
- An aggressive mask generation strategy produces wide, large, and diverse training masks to fully exploit the model’s and loss function’s high receptive fields.
- The training uses a multi-component loss combining adversarial loss (with an r1-regularized PatchGAN discriminator), perceptual loss, and feature matching.
- The input is a four-channel tensor formed by stacking the masked image and the binary mask, enabling the network to attend to missing regions.
- The architecture is trained exclusively on low-resolution (256×256) data but generalizes effectively to higher resolutions at inference time.
Experimental results
Research questions
- RQ1Can a single-stage image inpainting model achieve state-of-the-art performance on large masks without intermediate supervision or complex design?
- RQ2How does a high-receptive-field architecture based on Fourier convolutions improve generalization to high-resolution images not seen during training?
- RQ3To what extent does a perceptual loss with large context improve the modeling of global image structures in inpainting?
- RQ4Does aggressive large-mask data augmentation significantly enhance the model’s ability to leverage high-receptive-field components?
- RQ5Can FFC-based networks better capture and generate periodic or repetitive visual patterns compared to standard convolutions?
Key findings
- LaMa achieves state-of-the-art performance across multiple benchmark datasets, including on challenging large-mask and complex-structure scenarios.
- The model generalizes remarkably well to resolutions up to 4K, even when trained only on 256×256 images, demonstrating resolution-robustness.
- LaMa achieves superior results on periodic and repetitive structures, which are often poorly handled by prior methods.
- The method uses 30-50% fewer parameters and has lower inference time compared to competitive baselines like DCT-Net and SIREN.
- Ablation studies confirm that each component—FFC architecture, high-receptive-field loss, and aggressive mask generation—contributes significantly to performance.
- The model maintains strong performance on free-form and object-shaped masks, indicating robustness to mask diversity.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.