Zero-Shot Low Light Image Enhancement with Diffusion Prior

Joshua Cho, Sara Aghajanzadeh, Zhen Zhu, David ForsythOpenReview 2024 · DOI

TL;DR

This paper introduces a novel zero-shot method for enhancing low-light images using pre-trained diffusion models. By leveraging internal self-attention features from the diffusion model during inversion, the approach avoids hallucinations and color distortions common in existing methods, achieving state-of-the-art results without any training or fine-tuning.

What Problem Does This Paper Address?

Low-light image enhancement (LLIE) aims to transform underexposed images into well-lit, visually appealing counterparts. This is a challenging task because low-light conditions often introduce noise, color casts, and a lack of detail, making it difficult to accurately recover the original scene's appearance. Existing methods, including those based on diffusion models, often struggle with either generating unrealistic details (hallucinations) or failing to correct color inaccuracies, especially when dealing with varying illumination conditions. The paper specifically targets the limitations of current zero-shot LLIE methods that either require per-image optimization or rely on custom loss functions, which can be unstable or computationally expensive.

Methods

The proposed method, termed "Zero-Shot Low Light Image Enhancement with Diffusion Prior," is a "free lunch" solution, meaning it requires no training, fine-tuning, or hyperparameter adjustments. It leverages a pre-trained text-to-image diffusion model. The core of the method involves four steps:

  1. Preprocessing: If an input image's intensity is below a threshold, its average intensity is upscaled. Otherwise, no change is made.
  2. Inversion: The input image is inverted into the latent space of a diffusion model using DDIM inversion. Crucially, during this inversion process, the self-attention features (query, key, value) from each layer of the diffusion model's UNet are extracted and stored.
  3. Normalization: Adaptive Instance Normalization (AdaIN) is applied to the inverted latent state to align it with a standard normal distribution (N(0, I)). This step helps to re-center the latent representation.
  4. Denoising: The denoising process uses the standard diffusion model, but with a key modification: the self-attention features extracted during the inversion step are used to replace the default self-attention features generated by the model. This guides the denoising process using information inherent to the input image, preventing hallucinations and ensuring color fidelity.

The paper also highlights that this framework, without modification, can perform auto white balance (AWB).

Datasets

The paper evaluates its method on several standard datasets:

  • Paired Datasets:
    • LOL dataset (LOLv1 and LOLv2)
    • LSRW dataset
  • Unpaired Datasets:
    • DICM
    • LIME
    • NPE
    • MEF
    • VV

For Auto White Balance (AWB) evaluation, the CUBE+ dataset is used.

Key Insights and Ideas

  • Inverted Layers Have Meaning: The authors hypothesize that each channel in the latent space of diffusion models might correspond to a specific color property. Re-centering these latents using AdaIN can lead to a more balanced reconstruction, especially in low-light scenarios where color degradation is prominent.
  • Diffusion Prior for Naturalness: Pre-trained diffusion models, trained on vast datasets of natural images, inherently bias reconstructions towards producing natural-looking outputs. This is a key advantage over methods that might learn specific degradation patterns.
  • Self-Attention as a Robust Signal: Self-attention features are found to be relatively invariant to image intensity and white balance. This robustness makes them ideal for guiding the denoising process, ensuring that the enhancement is faithful to the original scene's structure and color.
  • "Free Lunch" Approach: The method's ability to achieve SOTA performance without any training or optimization is a significant contribution, making it highly practical and accessible.

Key Results

  • LLIE Performance: The proposed method consistently outperforms existing unsupervised and zero-shot methods across various quantitative metrics (PSNR, SSIM, LPIPS) on multiple datasets. It achieves performance comparable to supervised methods on datasets they were trained on and demonstrates superior generalization on unseen datasets.
  • AWB Performance: Without any modifications, the method achieves competitive performance with supervised AWB methods and surpasses state-of-the-art general image restoration methods on the AWB task.
  • Qualitative Results: Visual evaluations show that the method produces images with superior color constancy, fidelity, and noise reduction compared to existing approaches. It effectively mitigates hallucinations and color shifts.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that while self-attention features are stable, they are not entirely invariant to illumination changes.
  • DDIM inversion can introduce approximation errors, potentially affecting reconstruction fidelity.
  • The method's performance on AWB, while competitive, is a secondary outcome and not its primary focus.
  • Future Work: The authors anticipate that this method will find additional applications beyond LLIE and AWB, suggesting its potential for broader use in image manipulation tasks that leverage diffusion models. The robustness of self-attention features could be further explored for other generative tasks.

Summary updated

BibTeX
@misc{cho2024zero,
  author = {Joshua Cho and Sara Aghajanzadeh and Zhen Zhu and David Forsyth},
  title = {{Zero-Shot Low Light Image Enhancement with Diffusion Prior}},
  year = {2024},
  eprint = {2412.13401},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.13401},
}
Figure