DI-Retinex: Digital-Imaging Retinex Theory for Low-Light Image Enhancement

Shangquan Sun, Wenqi Ren, Jingyang Peng, Fenglong Song, Xiaochun CaoarXiv 2024 · DOI · arXiv

Introduction: Beyond Classic Retinex

Low-light image enhancement (LLIE) has long relied on the Retinex Theory, which models an image as the product of illumination ($L$) and reflectance ($R$): $I = L \odot R$. While effective for modeling human vision, this classic theory fails to account for the complexities of digital sensors.

Digital cameras introduce several degradations that the original theory ignores, such as sensor noise, non-linear camera response functions, quantization errors, and dynamic range clipping. When these factors are overlooked, enhancement algorithms often amplify noise or produce unrealistic colors.

Comparison of Retinex theories: (a) Classic, (b) Robust, and the proposed Digital-Imaging Retinex which accounts for digital-specific degradations.

The DI-Retinex Model

The authors propose DI-Retinex (Digital-Imaging Retinex), a framework that incorporates these digital-specific factors. Through mathematical derivation, they demonstrate that the relationship between a low-light image ($I_l$) and its properly exposed counterpart ($I_h$) can be approximated by a simple pixel-wise linear function: $$I_h \approx \alpha I_l + \beta$$ In this model, $\alpha$ adjusts brightness and contrast, while $\beta$ acts as a flexible offset to compensate for digital errors like quantization and noise.

Implementation and Learning

To realize this model, the researchers developed a tiny CNN with only three convolutional layers. This network predicts the optimal $\alpha$ and $\beta$ coefficients for every pixel. Notably, the model employs zero-shot learning, meaning it does not require paired training data. Instead, it uses two unsupervised losses:

  • Masked Reverse Degradation Loss ($L_{RD}$): Ensures that darkening the enhanced image reproduces the original input.
  • Variance Suppression Loss ($L_{VS}$): Prevents the $\beta$ term from amplifying noise.

Key Results and Efficiency

DI-Retinex achieves state-of-the-art performance on standard benchmarks like LOL-v1 and LOL-v2. It reached a PSNR of 21.54 dB on LOL-v1, outperforming other unsupervised methods.

The primary advantage of DI-Retinex is its extreme efficiency. Because the underlying physical model is robust, the neural network can remain very shallow. This leads to a massive reduction in parameter count and inference time compared to complex "black-box" models.

Performance comparison: DI-Retinex (red stars) achieves superior PSNR with significantly fewer parameters and faster inference times than competing methods.

On a mobile device like the Huawei Mate 20, the model can process frames in approximately 0.439 seconds using only the CPU, making it suitable for real-time applications.

Conclusion

By updating the 50-year-old Retinex theory for the digital age, DI-Retinex provides a mathematically grounded yet computationally efficient solution for low-light enhancement. While it faces challenges in extreme noise conditions, its ability to restore detail without overexposure marks a significant step forward for mobile and real-time imaging.

Summary updated

Abstract

Many existing methods for low-light image enhancement (LLIE) based on Retinex theory ignore important factors that affect the validity of this theory in digital imaging, such as noise, quantization error, non-linearity, and dynamic range overflow. In this paper, we propose a new expression called Digital-Imaging Retinex theory (DI-Retinex) through theoretical and experimental analysis of Retinex theory in digital imaging. Our new expression includes an offset term in the enhancement model, which allows for pixel-wise brightness contrast adjustment with a non-linear mapping function. In addition, to solve the lowlight enhancement problem in an unsupervised manner, we propose an image-adaptive masked reverse degradation loss in Gamma space. We also design a variance suppression loss for regulating the additional offset term. Extensive experiments show that our proposed method outperforms all existing unsupervised methods in terms of visual quality, model size, and speed. Our algorithm can also assist downstream face detectors in low-light, as it shows the most performance gain after the low-light enhancement compared to other methods.
BibTeX
@misc{sun2024di,
  author = {Shangquan Sun and Wenqi Ren and Jingyang Peng and Fenglong Song and Xiaochun Cao},
  title = {{DI-Retinex: Digital-Imaging Retinex Theory for Low-Light Image Enhancement}},
  year = {2024},
  eprint = {2404.03327},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.03327},
}
Figure