Diff-Restorer: Unleashing Visual Prompts for Diffusion-based Universal Image Restoration

Yuhong Zhang, Hengsheng Zhang, Xinning Chai, Zhengxue Cheng, Rong Xie, Li Song, Wenjun ZhangIEEE TCSVT 2024

Abstract

Image restoration is a classic low-level problem aimed at recovering high-quality images from low-quality images with various degradations such as blur, noise, rain, haze, etc. However, due to the inherent complexity and non-uniqueness of degradation in real-world images, it is challenging for a model trained for single tasks to handle real-world restoration problems effectively. Moreover, existing methods often suffer from over-smoothing and lack of realism in the restored results. To address these issues, we propose Diff-Restorer, a universal image restoration method based on the diffusion model, aiming to leverage the prior knowledge of Stable Diffusion to remove degradation while generating high perceptual quality restoration results. Specifically, we utilize the pre-trained visual language model to extract visual prompts from degraded images, including semantic and degradation embeddings. The semantic embeddings serve as content prompts to guide the diffusion model for generation. In contrast, the degradation embeddings modulate the Image-guided Control Module to generate spatial priors for controlling the spatial structure of the diffusion process, ensuring faithfulness to the original image. Additionally, we design a Degradation-aware Decoder to perform structural correction and convert the latent code to the pixel domain. We conducted comprehensive qualitative and quantitative analysis on restoration tasks with different degradations, demonstrating the effectiveness and superiority of our approach.

Introduction

Traditional image restoration models are often "specialists"—trained to solve one specific problem like denoising, deblurring, or dehazing. However, real-world images are rarely so polite; they often suffer from a messy combination of multiple degradations. While "all-in-one" restoration models exist, they face two major hurdles: task interference, where learning to fix one degradation conflicts with another, and the realism gap, where regression-based models produce over-smoothed results. Generative models like Stable Diffusion (SD) offer a solution for realism, but they are notoriously difficult to "tether" to the original image's spatial structure, often leading to unwanted hallucinations or distortions. Diff-Restorer addresses these challenges by leveraging the generative power of Stable Diffusion guided by CLIP-based "visual prompts."

Methodology

Diff-Restorer integrates three novel components into the Stable Diffusion pipeline:

  • Visual Prompt Processor: Instead of using text prompts, the model uses CLIP to extract embeddings from the degraded image. It splits these into a Semantic Embedding (content prompt) and a Degradation Embedding (degradation information).
  • Image-guided Control Module: This module provides spatial and color priors. Crucially, it is modulated by the degradation embedding, allowing the network to adapt its control signals based on the specific type of damage.
  • Degradation-aware Decoder: To prevent detail loss during the latent-to-pixel conversion, Diff-Restorer uses a custom decoder with skip-connections from the original low-quality image's encoder features to preserve structural fidelity.

Experiments and Results

The model was trained on a unified dataset of 80,000 images covering eight degradation types, including noise, low-light, haze, rain, raindrop, snow, blur, and JPEG artifacts. It was also evaluated on real-world and mixed benchmarks.

Diff-Restorer demonstrates superior performance across single, real-world, and mixed degradation scenarios.

Qualitatively, Diff-Restorer successfully recovers complex textures—like individual needles on a pine branch or facial features—where other models produce blurry or artifact-heavy results. Quantitatively, it achieved state-of-the-art performance on perceptual metrics. For example, on the "Noise+Blur" mixture, it achieved an FID of 26.59, vastly outperforming the next best model, AirNet (75.70).

Detailed view of Diff-Restorer's performance on a complex mixed degradation (Raindrop + Blur + Noise).

Conclusion and Future Work

Diff-Restorer represents a significant step forward in universal image restoration. By decoupling semantic content from degradation information and employing a custom structural decoder, it restores images with high perceptual realism. While inference speed remains a challenge typical of diffusion models, future work will focus on distillation techniques and scaling training datasets to further improve generalization.

Summary updated

BibTeX
@article{zhang2024diff,
  author = {Yuhong Zhang and Hengsheng Zhang and Xinning Chai and Zhengxue Cheng and Rong Xie and Li Song and Wenjun Zhang},
  title = {{Diff-Restorer: Unleashing Visual Prompts for Diffusion-based Universal Image Restoration}},
  journal = {IEEE Transactions on Circuits and Systems for Video Technology},
  year = {2024},
  url = {https://openreview.net/forum?id=7i6YICclB2},
}
Figure