SSL: A Self-similarity Loss for Improving Generative Image Super-resolution
Du Chen, Zhengqiang Zhang, Jie Liang, Lei Zhang
TL;DR
The paper tackles artifacts in Real-ISR produced by GANs and diffusion models by introducing a self-similarity loss (SSL) that leverages the inherent self-similarity of natural images. SSL computes a self-similarity graph (SSG) from the ground-truth image and enforces a close match with the SSG of the Real-ISR output, focusing computations on edge regions via an offline mask. Formally, the SSL combines a KL-divergence term and an L1 term between normalized SSGs: $L_{SSL} = D_{KL}(\bar{S}_{HR} || \bar{S}_{SR}) + \alpha|\bar{S}_{SR} - \bar{S}_{HR}|$ with $\alpha=1$, serving as a plug-and-play penalty for both GAN- and DM-based Real-ISR models. Across extensive experiments on diverse models and degradations, SSL consistently improves perceptual realism and reduces artifacts, demonstrating broad applicability and practical impact, with code available at the authors' repository.
Abstract
Generative adversarial networks (GAN) and generative diffusion models (DM) have been widely used in real-world image super-resolution (Real-ISR) to enhance the image perceptual quality. However, these generative models are prone to generating visual artifacts and false image structures, resulting in unnatural Real-ISR results. Based on the fact that natural images exhibit high self-similarities, i.e., a local patch can have many similar patches to it in the whole image, in this work we propose a simple yet effective self-similarity loss (SSL) to improve the performance of generative Real-ISR models, enhancing the hallucination of structural and textural details while reducing the unpleasant visual artifacts. Specifically, we compute a self-similarity graph (SSG) of the ground-truth image, and enforce the SSG of Real-ISR output to be close to it. To reduce the training cost and focus on edge areas, we generate an edge mask from the ground-truth image, and compute the SSG only on the masked pixels. The proposed SSL serves as a general plug-and-play penalty, which could be easily applied to the off-the-shelf Real-ISR models. Our experiments demonstrate that, by coupling with SSL, the performance of many state-of-the-art Real-ISR models, including those GAN and DM based ones, can be largely improved, reproducing more perceptually realistic image details and eliminating many false reconstructions and visual artifacts. Codes and supplementary material can be found at https://github.com/ChrisDud0257/SSL
