A codebook-driven approach for low-light image enhancement

Xu Wu, Xianxu Hou, Zhihui Lai, Jie Zhou, Ya-nan Zhang, Witold Pedrycz, Linlin Shen

TL;DR

This paper introduces CodeEnhance, a novel approach to low-light image enhancement (LLIE) that reframes the problem as an "image-to-code" mapping. By leveraging a learned codebook from high-quality images and incorporating semantic information and interactive refinement, CodeEnhance significantly improves image quality, texture preservation, and color restoration compared to existing methods.

What Problem Does This Paper Address?

Low-light images are notoriously difficult to enhance due to several challenges. Firstly, the diverse range of brightness degradations in real-world low-light scenes makes it hard for existing methods to achieve accurate restoration. Secondly, many current LLIE techniques struggle with a fundamental trade-off: while they can suppress noise and increase brightness, they often sacrifice crucial texture and color information, leading to over-smoothed or distorted images. This paper aims to overcome these limitations by introducing a more robust and fidelity-preserving LLIE approach.

Methods

CodeEnhance is built upon a two-stage process.

Stage I: Codebook Learning A VQ-GAN (Vector Quantized Generative Adversarial Network) is pre-trained on high-quality (HQ) images to learn a discrete codebook. This codebook acts as a prior knowledge base, representing essential image features. A frozen HQ encoder and decoder from this VQ-GAN are then utilized in Stage II.

Stage II: LLIE with Codebook Guidance 1. Semantic Embedding Module (SEM): This module integrates semantic information (extracted using a pre-trained DeepLab v3+ network) with low-level features from the HQ encoder. This helps bridge the semantic gap between the encoder's output and the codebook, leading to more effective feature matching. 2. Codebook Shift (CS) Mechanism: To address potential distribution shifts between the training data for the codebook and the target low-light dataset, a CS mechanism is introduced. This mechanism adapts the pre-learned codebook to better suit the specific characteristics of the low-light images, ensuring more consistent and relevant feature matching. 3. Interactive Feature Transformation (IFT): This module refines the enhanced image by focusing on texture, color, and brightness. It comprises two sub-modules: * Texture Feature Transformation (TFT): Fuses low-level encoder features with decoder features and uses an affine transformation to mitigate noise and extract texture details. * Controllable Perceptual Transformation (CPT): Utilizes reference HQ images to guide the enhancement of contrast and brightness, allowing for user-adjustable control over the output.

The core idea is to reframe LLIE as mapping a low-light image to its corresponding codebook representation, which is then decoded to produce the enhanced image. This "image-to-code" paradigm effectively reduces the parameter space, mitigating uncertainty and improving robustness.

Datasets

The paper uses several datasets for training and evaluation:

  • Training:
    • DIV2K [45] and Flickr2K [46] (for pre-training VQ-GAN)
  • Evaluation:
    • Paired Datasets: LOL [3], FiveK [53], LSRW (Huawei and Nikon) [47], SynLL [11]
    • Unpaired Datasets: LIME [54], MEF [10], NPE [55]
    • Object Detection Benchmark: ExDark [1] (for evaluating the impact of LLIE on downstream tasks)

Key Insights and Ideas

  • Reframing LLIE as Image-to-Code: The core innovation is treating LLIE as a mapping to a discrete codebook. This approach effectively reduces the complexity and uncertainty inherent in direct image-to-image translation for LLIE.
  • Bridging Semantic and Low-Level Features: The SEM is crucial for aligning semantic understanding with low-level image details, which is vital for accurate feature matching within the codebook.
  • Adapting Priors with Codebook Shift: Recognizing that pre-trained codebooks might not perfectly align with new datasets, the CS mechanism provides a flexible way to adapt these priors, improving generalization.
  • Interactive Enhancement: The IFT module, particularly the CPT, offers user control over the enhancement process, allowing for personalized results based on visual preferences.
  • Codebook as a Robust Prior: The codebook learned from HQ images acts as a strong prior, guiding the enhancement process and making it more robust to noise and illumination variations.

Key Results

  • Quantitative Performance: CodeEnhance achieves state-of-the-art results across various benchmarks, outperforming existing methods in PSNR, SSIM, MAE, and LPIPS metrics on datasets like LOL, FiveK, LSRW, and SynLL. For example, on the LOL dataset, it shows significant improvements in PSNR and SSIM.
  • Qualitative Improvements: Visual comparisons demonstrate that CodeEnhance produces images with enhanced brightness, preserved texture details, suppressed noise, and accurate color restoration. It effectively handles challenging scenarios like uneven illumination and complex scenes.
  • Generalization: The method shows good generalization performance on unpaired datasets (LIME, MEF, NPE).
  • Downstream Task Performance: When used as a preprocessing step for object detection on the ExDark dataset, CodeEnhance-enhanced images lead to improved detection performance (higher mAP).
  • Efficiency: While not the fastest, the method offers a good trade-off between efficiency and enhancement quality, as indicated by runtime comparisons.

Limitations and Future Work

  • GAN-based Generation: The authors acknowledge that GANs, while powerful, may not match the generation capabilities of diffusion models.
  • Future Direction: They propose integrating vector quantization with diffusion models. The idea is to use high-quality image representations learned by vector quantization as effective prompts for diffusion models, potentially leading to even more advanced LLIE capabilities.

Summary updated

BibTeX
@article{wu2025codebook,
  author = {Xu Wu and Xianxu Hou and Zhihui Lai and Jie Zhou and Ya-nan Zhang and Witold Pedrycz and Linlin Shen},
  title = {{A codebook-driven approach for low-light image enhancement}},
  journal = {Engineering Applications of AI},
  year = {2025},
  url = {https://openreview.net/forum?id=W0bMVUSyQm},
}
Figure