[Paper Review] Feature Refinement to Improve High Resolution Image Inpainting
This paper proposes a novel, training-free, multiscale feature refinement method to enhance high-resolution image inpainting by iteratively optimizing intermediate feature maps during inference using a multiscale consistency loss. By refining predictions from low to high resolution with L1 loss on downsampled outputs, the approach achieves state-of-the-art results on 1024×1024 images without retraining, significantly improving structural coherence and texture detail over existing methods.
In this paper, we address the problem of degradation in inpainting quality of neural networks operating at high resolutions. Inpainting networks are often unable to generate globally coherent structures at resolutions higher than their training set. This is partially attributed to the receptive field remaining static, despite an increase in image resolution. Although downscaling the image prior to inpainting produces coherent structure, it inherently lacks detail present at higher resolutions. To get the best of both worlds, we optimize the intermediate featuremaps of a network by minimizing a multiscale consistency loss at inference. This runtime optimization improves the inpainting results and establishes a new state-of-the-art for high resolution inpainting. Code is available at: https://github.com/geomagical/lama-with-refiner/tree/refinement.
Motivation & Objective
- To address the degradation in inpainting quality at high resolutions due to limited effective receptive fields.
- To improve global structure and texture detail in high-resolution inpainting without retraining the base network.
- To enable high-resolution inpainting with better consistency and sharpness by leveraging low-resolution predictions as guidance.
- To develop a runtime refinement technique that is compatible with existing state-of-the-art inpainting models.
Proposed method
- Construct an image pyramid with downscaling factor 2, starting from the network’s training resolution (512px) up to 1024px.
- Perform a single forward pass at the lowest resolution to generate an initial inpainting prediction.
- For each higher resolution, optimize the feature map from the 'front' of the network (encoder) using Adam with a learning rate of 0.002 over 15 iterations.
- Minimize an L1 loss between the downsampled high-resolution prediction and the low-resolution prediction, applied only to masked regions.
- Apply mask erosion (15px circular kernel) before loss computation to avoid overfitting in thin or well-completed regions.
- Use a Gaussian filter followed by bilinear interpolation for downscaling to prevent aliasing and ensure smooth feature transfer between scales.
Experimental results
Research questions
- RQ1Can feature map optimization during inference improve high-resolution image inpainting without retraining?
- RQ2Does using low-resolution predictions as guidance enhance structural coherence and detail in high-resolution outputs?
- RQ3How does multiscale refinement compare to state-of-the-art methods in terms of FID and LPIPS metrics at 1024×1024 resolution?
- RQ4What is the trade-off between inference time and performance gain when applying iterative refinement?
- RQ5Can a network-agnostic, runtime refinement technique outperform existing methods on high-resolution inpainting benchmarks?
Key findings
- The proposed method achieves state-of-the-art FID scores on 1024×1024 images, with 19.864 FID on medium brushes and 26.401 on thick brushes, outperforming Big-LaMa and other SOTA methods.
- LPIPS scores are reduced to 0.115 (medium) and 0.135 (thick), indicating improved perceptual similarity to ground truth.
- For thin brushes, performance is similar to Big-LaMa (FID: 13.193), as sufficient context exists for the base model to perform well.
- The method significantly improves texture sharpness and global structure, especially in complex regions with large masks.
- Inference time increases to 4.56 seconds per image (vs. 0.26s for Big-LaMa), due to multiple forward/backward passes across scales.
- Memory usage increases due to gradient storage during backpropagation, limiting maximum GPU-compatible resolution.
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.