Diffusion Image Prior

Hamadi Chihaoui, Paolo Favaro

TL;DR

This paper introduces the Diffusion Image Prior (DIIP), a novel method for blind image restoration that leverages pre-trained diffusion models. DIIP effectively restores images from various degradations without needing to know the degradation model, achieving state-of-the-art results by adapting the optimization process of diffusion models.

What Problem Does This Paper Address?

Image restoration (IR) aims to recover a clean image from a degraded version. Traditional IR methods often require explicit knowledge of the degradation process (e.g., the specific blur kernel or noise distribution). However, in real-world scenarios, these degradations can be complex, unknown, or difficult to model precisely. This limitation hinders the applicability of many IR techniques. While methods like Deep Image Prior (DIP) have shown promise in handling unknown degradations by leveraging the implicit prior of untrained neural networks, they are primarily effective for high-frequency artifacts like noise. This paper addresses the challenge of performing blind image restoration for a broader range of degradations, including those that remove high-frequency details (like blurring) or introduce complex artifacts (like JPEG compression), without prior knowledge of the degradation model.

Methods

The core of DIIP is inspired by Deep Image Prior (DIP) but replaces the untrained Convolutional Neural Network (CNN) with a pre-trained and frozen diffusion model. Instead of optimizing the network's parameters as in DIP, DIIP optimizes the input noise vector to the diffusion model. This process is framed as an energy minimization problem where the data fidelity term measures how well the output of the diffusion model matches the degraded image, and a regularization term is implicitly provided by the diffusion model's prior.

A key innovation is the development of self-supervised stopping criteria to prevent overfitting to the degraded image. Two criteria are proposed:

  1. For degradations that remove high-frequency content (e.g., blur): The variance of the Laplacian of the reconstructed image is tracked. The optimization stops when this variance consistently decreases, indicating a loss of sharpness. The restoration is taken from the point of last peak sharpness.
  2. For degradations that add high-frequency content (e.g., noise): The normalized slope of the loss function is monitored. The optimization stops when this slope falls below a predefined threshold, indicating that the model is struggling to reduce high-frequency artifacts.

The diffusion model used is a deterministic version (like DDIM) to ensure a consistent mapping from noise to image space.

Datasets

The paper evaluates DIIP on images from the FFHQ dataset for studying the implicit priors of diffusion models. For quantitative and qualitative comparisons, it uses images from CelebA 1K and ImageNet 1K datasets. The authors note that they use pre-trained models from existing work for CelebA and ImageNet. No new datasets were introduced.

Key Insights and Ideas

  • Diffusion models offer a stronger prior than untrained CNNs: Pre-trained diffusion models, even when not trained for restoration, provide a more powerful implicit prior for image reconstruction compared to untrained CNNs used in DIP.
  • Broader degradation handling: DIIP, by leveraging diffusion models, can handle a wider range of degradations, including low-frequency ones like blur, which were challenging for DIP.
  • Consistent intermediate clean reconstructions: A surprising finding is that the optimization process with diffusion models consistently produces clean, realistic images at intermediate stages, regardless of the degradation type, before eventually overfitting. This is a key property that enables effective early stopping.
  • Self-supervised stopping is crucial: The proposed stopping criteria are essential for achieving state-of-the-art results by preventing overfitting and identifying the optimal point in the reconstruction process.

Key Results

  • State-of-the-art performance: DIIP achieves state-of-the-art or competitive results across various blind image restoration tasks, including denoising, super-resolution, JPEG artifact removal, waterdrop removal, and non-uniform deformation.
  • Quantitative improvements: Tables in the paper show DIIP achieving higher PSNR, SSIM, and lower LPIPS scores compared to methods like DIP and DreamClean on several benchmarks. For example, on CelebA for denoising, DIIP achieves a PSNR of 28.37 dB, outperforming DreamClean (27.05 dB) and DIP (25.81 dB).
  • Qualitative superiority: Visual comparisons (Figures 2, 5, and 7) demonstrate that DIIP produces more faithful and realistic reconstructions, preserving image details better than competing methods, especially for unstructured degradations.
  • Efficiency: DIIP offers a good balance between image quality and computational efficiency, with competitive runtime and memory consumption compared to other training-free methods.

Limitations and Future Work

  • Computational cost: While DIIP is efficient for a training-free method, the iterative nature of diffusion model inversion can still be computationally demanding compared to methods that use a learned degradation model.
  • Stopping criterion tuning: The effectiveness of the stopping criteria relies on hyperparameters like $k_{min}$ and $\epsilon$. While the paper provides reasonable values, further exploration might be needed for optimal performance across all scenarios.
  • Future work: The authors suggest that DIIP's ability to handle complex and unknown degradations makes it a promising direction for real-world image restoration applications. Further research could explore more advanced diffusion model architectures or optimization strategies to further improve performance and efficiency.

Summary updated

BibTeX
@inproceedings{chihaoui2025diffusion,
  author = {Hamadi Chihaoui and Paolo Favaro},
  title = {{Diffusion Image Prior}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure