Abstract
Image super-resolution (SR) with generative adversarial networks (GAN) has achieved great success in restoring realistic details. However, it is notorious that GAN-based SR models will inevitably produce unpleasant and undesirable artifacts, especially in practical scenarios. Previous works typically suppress artifacts with an extra loss penalty in the training phase. They only work for in-distribution artifact types generated during training. When applied in real-world scenarios, we observe that those improved methods still generate obviously annoying artifacts during inference. In this paper, we analyze the cause and characteristics of the GAN artifacts produced in unseen test data without ground-truths. We then develop a novel method, namely, DeSRA, to Detect and then Delete those SR Artifacts in practice. Specifically, we propose to measure a relative local variance distance from MSE-SR results and GAN-SR results, and locate the problematic areas based on the above distance and semantic-aware thresholds. After detecting the artifact regions, we develop a finetune procedure to improve GAN-based SR models with a few samples, so that they can deal with similar types of artifacts in more unseen real data. Equipped with our DeSRA, we can successfully eliminate artifacts from inference and improve the ability of SR models to be applied in real-world scenarios. The code is available at https://github.com/TencentARC/DeSRA.
Introduction
Single Image Super-Resolution (SISR) has transitioned from producing blurry, "safe" images using Mean Squared Error (MSE) loss to generating sharp, detailed textures via Generative Adversarial Networks (GANs). However, GANs are notorious for "hallucinating" unpleasant visual patterns—GAN-inference artifacts—when they encounter real-world data that differs from their training distribution.
Existing solutions often attempt to penalize artifacts during the initial training phase. However, these methods are limited to artifact types seen during training. When deployed in the wild, models encounter "out-of-distribution" degradations that trigger new, unpredictable artifacts. The core challenge addressed by DeSRA is how to detect and fix these errors without access to ground-truth high-resolution images.
Methodology: The DeSRA Framework
DeSRA (Detect and Delete) introduces a two-stage pipeline designed to identify and eliminate artifacts post-inference.
1. Detection via Relative Distance
Since MSE-based models rarely produce artifacts but lack detail, they serve as a structural reference. DeSRA calculates a relative local variance distance ($D$) between the GAN-SR and MSE-SR patches. This metric, inspired by SSIM, highlights areas where the GAN has deviated too aggressively from the base structure of the image.
2. Semantic-Aware Adjustment
Human perception varies across different textures; a pattern might be acceptable in foliage but intolerable on a smooth wall. DeSRA utilizes a segmentation model (SegFormer) to adjust detection thresholds based on semantic categories, ensuring stricter detection in perceptually sensitive regions like buildings or the sky.
3. The "Delete" (Finetuning) Step
Once artifacts are detected, a pseudo ground-truth image is created by replacing artifact regions in the GAN-SR result with patches from the MSE-SR result. The model is then finetuned on a small set of these corrected pairs (as few as 50) for approximately 1000 iterations. This surgical approach teaches the model to suppress specific artifacts without losing its ability to generate fine details elsewhere.
Evaluation and Results
The authors evaluated DeSRA using state-of-the-art SR models including Real-ESRGAN, LDL, and SwinIR. A new benchmark dataset was introduced, consisting of 200 real-world images with manually labeled artifact masks.
- Detection Accuracy: In tests on Real-ESRGAN, DeSRA achieved an Intersection over Union (IoU) of 51.1%, significantly outperforming traditional no-reference metrics like NIQE (2.9%) and specialized methods like LDL (35.3%).
- Artifact Removal: The removal rate reached 75.43% for Real-ESRGAN and 74.97% for LDL, with a 0% addition rate, meaning no new artifacts were introduced during the process.
- User Preference: In user studies, 82.23% of participants preferred DeSRA-finetuned results over original GAN-SR outputs. Furthermore, 93% preferred them over blurry MSE-SR results, confirming that the model retains desirable details while removing artifacts.
Discussion and Future Work
While effective, DeSRA has limitations. It currently focuses on "obvious and large" artifact regions, making the detection of subtle artifacts a remaining challenge. Additionally, the method's precision depends on the accuracy of the underlying segmentation model and the quality of the MSE-SR reference. Future research may explore online continual learning, enabling models to automatically detect and correct artifacts in a continuous stream of real-world data.
Summary updated