Taming Generative Diffusion Prior for Universal Blind Image Restoration

Siwei Tu, Weidong Yang, Ben Fei

Imagine trying to fix a blurry, low-light, or pixelated photo without knowing exactly how it was ruined in the first place. In the world of computer vision, this is known as blind image restoration, and it is notoriously difficult. While generative diffusion models have become the "gold standard" for creating high-quality images, using them to fix real-world damage usually requires us to guess the specific "degradation model"—the mathematical formula for the blur or noise.

A new paper from researchers at Fudan University and the Chinese University of Hong Kong, titled "Taming Generative Diffusion Prior for Universal Blind Image Restoration" (BIR-D), aims to change that. They’ve developed a framework that doesn't just fix the image; it learns how the image was broken while it's fixing it.

Examples of universal blind image restoration tasks handled by BIR-D, including deblurring, low-light enhancement, and mixed degradations.

TL;DR

BIR-D is a universal framework for blind image restoration that leverages pre-trained diffusion models without needing to know the degradation type beforehand. By using an optimizable convolutional kernel to simulate unknown damage and an empirical formula for adaptive guidance, it achieves state-of-the-art results across tasks like deblurring, low-light enhancement, and HDR recovery.

What Problem Does This Paper Address?

Most existing image restoration methods are "non-blind," meaning they assume we know the degradation function (e.g., "this image was downsampled by 4x using bicubic interpolation"). Even "blind" methods often assume the type of damage (like Gaussian blur) and only try to guess the parameters (like the blur radius).

Real-world images are messier. They might suffer from a mix of motion blur, poor lighting, and compression artifacts simultaneously. Previous diffusion-based solvers like GDP or DDRM struggle here because they require a fixed, known degradation operator to guide the denoising process. Furthermore, these models usually rely on a "guidance scale" hyperparameter that researchers have to painstakingly tune via grid search for every single task.

Methods

The core innovation of BIR-D (Blind Image Restoration Diffusion) lies in two clever additions to the standard diffusion denoising process:

The BIR-D framework architecture, illustrating the optimizable convolutional kernel and adaptive guidance scale during the diffusion denoising process.
  1. Optimizable Convolutional Kernel & Mask: Instead of assuming a fixed degradation function $D$, BIR-D uses a small convolutional kernel ($K$) and a brightness mask ($M$) to simulate the damage: $y = K(x) + M$. During the reverse diffusion steps (denoising), the model calculates the gradient of the loss between the simulated degraded image and the actual input. It then updates the parameters of $K$ and $M$ on the fly. This allows the model to "learn" the specific blur or noise pattern unique to that image.
  2. Adaptive Guidance Scale: In diffusion guidance, you have to balance the "prior" (what a clean image should look like) with the "guidance" (staying true to the degraded input). BIR-D replaces the usual manual hyperparameter $s$ with a mathematically derived empirical formula. This formula calculates the optimal guidance scale for each specific denoising step in real-time, eliminating the need for manual tuning.
  3. Multi-Guidance Support: The framework is flexible enough to take multiple degraded versions of the same scene (e.g., three different exposures of a dark room) and use them collectively to guide the generation of a single high-quality HDR image.

Datasets

The authors evaluated BIR-D across a massive battery of datasets to prove its "universal" nature:

  • Faces: LFW and WIDER.
  • General Images: ImageNet 1k (for super-resolution, deblurring, inpainting, and colorization).
  • Low-Light: LOL, VE-LOL, and LoLi-Phone.
  • Motion Blur: GoPro and HIDE.
  • HDR: NTIRE 2021 Multi-Frame HDR Challenge dataset.

Key Insights and Ideas

  • The "Aha" Moment on Degradation: You don't need a complex physical model of a camera lens to fix a blurry photo. A simple, optimizable $7 \times 7$ kernel is surprisingly effective at simulating a wide variety of linear and non-linear degradations when updated iteratively.
  • Guidance is Dynamic: The researchers found that the optimal guidance scale shouldn't be constant. Early in the denoising process (when the image is mostly noise), you need different guidance than at the end (when you are refining fine details). Their adaptive formula captures this intuition automatically.
  • The Power of the Mask: While the kernel handles blur and resolution, the optimizable mask ($M$) is the secret sauce for low-light enhancement. It allows the model to capture regional brightness shifts that a simple convolution would miss.

Key Results

BIR-D consistently outperformed other unsupervised "off-the-shelf" methods:

  • Blind Face Restoration: On the WIDER dataset, BIR-D achieved a NIQE score of 3.65, significantly better than DiffBIR (3.78) and PGDiff (3.93). (Lower NIQE indicates better perceptual quality).
  • Low-Light Enhancement: It achieved a Perceptual Index (PI) of 4.87 on the LOL dataset, crushing the previous best unsupervised method, GDP (6.47).
  • Versatility: Perhaps most impressively, BIR-D can handle "mixed" degradations—like an image that is simultaneously low-resolution, grayscale, and blurry—without any changes to the underlying code.

Limitations and Future Work

Despite its power, BIR-D isn't instantaneous. Because it relies on a patch-based solution to handle high-resolution images using a standard DDPM prior, the generation speed can be slow as image size increases.

The authors suggest that moving the framework to Latent Diffusion Models (like Stable Diffusion) could be a promising future direction to achieve faster speeds and handle even larger images while maintaining the "blind" restoration capabilities.

Check out the code: https://github.com/Tusiwei/BIR-D

Summary updated

BibTeX
@inproceedings{tu2024taming,
  author = {Siwei Tu and Weidong Yang and Ben Fei},
  title = {{Taming Generative Diffusion Prior for Universal Blind Image Restoration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=NbFOrcwqbR},
}
Figure