Introduction
Image inpainting—the automated restoration of missing or damaged image regions—is a cornerstone of modern photo editing. Despite its prevalence, evaluating the quality of inpainted results remains a significant challenge. Traditional Image Quality Assessment (IQA) metrics, such as Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM), are designed to measure global distortions like compression noise. However, inpainting artifacts are inherently localized. A restored patch might achieve high pixel-wise similarity while still appearing unnatural due to visible boundary seams or inconsistent textures. This paper proposes a novel metric, Inpainting Image Quality Assessment (IIQA), based on Guided Regional Statistics (GRS) to address these limitations.
Methodology
The proposed GRS metric evaluates quality through a two-pronged approach that mimics human visual sensitivity to edge discontinuities and statistical naturalness.
1. Boundary Distortion Evaluation ($f_1$)
The transition between the original image and the inpainted region is critical. The algorithm identifies two 16-pixel wide strips along the boundary: one interior and one exterior. It calculates the Gradient Magnitude (GM) for these strips and fits them to a Weibull distribution. By measuring the Kullback-Leibler Divergence (KLD) between these distributions, the metric quantifies the statistical "distance" at the boundary. A high KLD indicates a jarring, visible artifact, while a low KLD suggests a seamless transition.
2. Inpainting Region Naturalness ($f_2$)
To ensure the filled area does not look "plastic" or repetitive, the metric employs a Naturalness Factor (NF). This component compares the statistical properties (gradient and Laplace distributions) of the inpainted $\Omega$-region against the original reference image to ensure the restored texture maintains realistic statistical characteristics.
3. Pooling
The final quality score ($Q$) is a weighted combination: $Q = 0.6 \cdot f_1 + 0.4 \cdot f_2$. The higher weight assigned to $f_1$ reflects the human visual system's acute sensitivity to edge discontinuities.
Experimental Validation
The metric was validated using the TUM-IID database, which includes 17 reference images and 272 inpainted versions from four state-of-the-art algorithms. To establish a robust ground truth, the authors conducted a user study with 31 observers to rank the images by subjective quality.
Key Results
The GRS metric significantly outperformed both traditional and specialized IQA metrics in terms of correlation with human judgment. As shown in the table below, GRS achieved a Spearman Rank Order Correlation Coefficient (SROCC) of 0.8434, far exceeding PSNR (-0.3560) and SSIM (-0.2256).
These results demonstrate that focusing on localized boundary transitions and statistical distributions is far more effective for inpainting assessment than pixel-wise comparisons. Even specialized inpainting metrics like PWIIQ (0.6101) were outperformed by the GRS approach.
Conclusion and Future Work
The GRS metric provides a more accurate benchmark for inpainting algorithms by prioritizing the transition zones that humans find most distracting. While currently a Full-Reference (FR) model requiring the original image, future iterations could adapt these statistical features into a No-Reference (NR) metric. Such an advancement would allow for quality assessment in real-world scenarios, such as historical photo restoration, where the original image is unavailable.
Summary updated