HistoHDR-Net: Histogram Equalization for Single LDR to HDR Image Translation

Hrishav Bakul Barua, Ganesh Krishnasamy, KokSheik Wong, Abhinav Dhall, Kalin StefanovarXiv 2024

TL;DR

HistoHDR-Net is a novel deep learning architecture that reconstructs high-quality High Dynamic Range (HDR) images from a single Low Dynamic Range (LDR) input by leveraging the "hidden" details revealed through histogram equalization. By combining a dual-encoder fusion strategy with a loss function inspired by human perception (Weber’s Law), the model significantly improves the recovery of color, contrast, and fine textures in over- and under-exposed regions.

What Problem Does This Paper Address?

Standard digital cameras capture images in Low Dynamic Range (LDR), typically 8-bit, which involves quantization and dynamic range clipping. This process often results in "blown-out" highlights or "crushed" shadows where visual information is permanently lost to the human eye.

While many data-driven methods attempt to reverse this camera pipeline to reconstruct HDR images, they frequently struggle with regions of extreme contrast. The resulting images often suffer from artifacts, unnatural saturation, or a lack of fine detail in saturated areas. The authors of HistoHDR-Net aim to solve this by providing the network with a "pre-enhanced" version of the input that makes these missing details easier to learn.

Methods

The core innovation of HistoHDR-Net lies in its dual-stream approach and a specialized loss function.

Dual-Encoder Architecture

Instead of feeding a single image into a network, HistoHDR-Net uses two parallel ResNet50 encoders:

  1. The Ground Truth Stream: Processes the original LDR image ($LDR_{GT}$).
  2. The Histogram Stream: Processes a histogram-equalized version of the LDR image ($LDR_{His}$).

Histogram equalization spreads out the intensity values of pixels across the full 0–255 range. As shown in Figure 3, this process can reveal textures in shadows or highlights that were previously non-perceivable, effectively acting as a feature-engineering step for the deep learning model.

Fig. 3: Original and histogram-equalized LDR images. The green and orange histograms are for the original LDRGT and histogram-equalized LDRHis images, respectively.

Fusion and Self-Attention

The feature maps from both encoders are concatenated (late fusion) and passed through a Self-Attention Module. This allows the network to weigh the importance of different spatial features, increasing the receptive field so that the reconstruction of a specific pixel can be influenced by the context of the entire image. Finally, a decoder block reconstructs the HDR image.

Fig. 2: Architecture of the proposed HistoHDR-Net method.

Perceptual Loss Function

The authors introduced a novel five-component loss function ($L$) to guide the training:

  • $L_1$ and Perceptual ($VGG$) losses: Standard metrics for pixel-wise and feature-level similarity.
  • Weber’s Law Loss ($L_W$): A novel addition based on the psychological principle that human perception of light is relative to the background intensity. This helps the model prioritize perceptual meaningfulness.
  • Multi-Scale Structural Similarity ($L_{SIM}$): Focuses on preserving structural information across different scales.
  • Color Loss ($L_C$): Uses the $\Delta E^*$ score to ensure accurate color reproduction.

Datasets

The model was trained and evaluated on a mix of synthetic and real-world datasets:

  • City Scene: 20,000 LDR/HDR image pairs featuring diverse indoor and outdoor environments.
  • HDR-Synth & HDR-Real: A combined dataset of approximately 10,000 pairs.
  • HDR-Eye: Used specifically for cross-dataset evaluation to test the model's ability to generalize to unseen data.

Key Insights and Ideas

  • Histogram Equalization as a "Hint": The most striking insight is that a classical computer vision technique like histogram equalization can significantly boost modern deep learning performance. It provides the network with a "cheat sheet" of details that might be buried in the original LDR signal.
  • Weber’s Law in Deep Learning: Integrating human vision physics (Weber’s Law) into the loss function proves highly effective. The authors found that $L_W$ can actually serve as a viable alternative to standard VGG perceptual losses, achieving better scores in some metrics.
  • Late Fusion Wins: The ablation studies showed that fusing features after the encoder (late fusion) is significantly more effective than "early fusion" (stacking the original and equalized images at the input layer).

Key Results

HistoHDR-Net demonstrates superior performance in perceptual metrics compared to state-of-the-art (SOTA) methods like ArtHDR-Net and Diffusion-based models.

  • Perceptual Quality: In within-dataset tests (Table 1), HistoHDR-Net achieved the highest SSIM (0.94) and HDR-VDP-2 (69.32) scores on the City Scene dataset.
  • Generalization: In cross-dataset evaluations (Table 2), it maintained its lead in SSIM and HDR-VDP-2, proving it isn't just memorizing the training data.
  • Qualitative Recovery: As seen in Figure 1, HistoHDR-Net is uniquely capable of recovering legible text on signs that are completely washed out in the original LDR and blurry in other SOTA reconstructions.
Fig. 1: Our method HistoHDR-Net (right) can recover the text on the notice board better than the state-of-the-art [6] (middle) given an extremely over-exposed LDR image (left) as input.

Limitations and Future Work

While HistoHDR-Net excels in perceptual metrics (SSIM, HDR-VDP-2), it was occasionally outperformed by diffusion-based models in terms of raw PSNR (Peak Signal-to-Noise Ratio). However, the authors argue that PSNR often fails to capture the "naturalness" of an image compared to perceptual metrics.

For future work, the team plans to explore histogram matching, which could allow for even finer control over the shape of the input histograms, potentially further improving detail recovery in extreme lighting conditions.

Summary updated

BibTeX
@misc{barua2024histohdr,
  author = {Hrishav Bakul Barua and Ganesh Krishnasamy and KokSheik Wong and Abhinav Dhall and Kalin Stefanov},
  title = {{HistoHDR-Net: Histogram Equalization for Single LDR to HDR Image Translation}},
  year = {2024},
  eprint = {2402.06692},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.06692},
}
Figure