High Dynamic Range (HDR) imaging is a cornerstone of modern computational photography, yet it faces a persistent challenge: "ghosting" artifacts. These occur when objects move between the multiple exposures required to construct an HDR scene. This paper introduces the HDR-Transformer, a hierarchical network designed to eliminate these artifacts while preserving fine-grained local details.
Overview
The HDR-Transformer leverages a dual-branch Context-Aware Vision Transformer (CA-ViT). By modeling both long-range dependencies to address large-scale motion and local image correlations to maintain texture, the model achieves state-of-the-art performance with significantly lower computational costs than previous methods.
The Challenge of Multi-Exposure Merging
Standard HDR techniques merge several Low Dynamic Range (LDR) images taken at different exposure levels. However, if the camera or subjects move during the capture sequence, the resulting image often contains semi-transparent "ghosts" of the moving objects.
Existing solutions typically rely on:
- CNNs: Excellent at local texture but limited by a small receptive field, making them prone to errors with large-scale motion.
- Vision Transformers (ViTs): Effective at global context but often lacking the inductive bias needed for fine-grained pixel reconstruction, especially on smaller datasets.
Methodology: Context-Aware Vision Transformer (CA-ViT)
The core of the HDR-Transformer is the CA-ViT, which employs a dual-branch architecture to capture complementary information:
- Global Branch: Utilizes a window-based Transformer encoder to model long-range object movements and intensity variations across frames, effectively "solving" the ghosting problem.
- Local Branch: Employs a Local Context Extractor (LCE) with convolutional blocks and channel attention to recover fine textures that standard Transformers might miss.
The pipeline is further enhanced by a hierarchical structure of Context-aware Transformer Blocks (CTBs) and dilated convolutions, which expand the receptive field without drastically increasing the parameter count. Training is guided by a $\mu$-law loss, combining $L_1$ and perceptual (VGG-16) losses in the tonemapped domain to better align with human visual perception.
Evaluation and Results
The model was rigorously tested on the Kalantari et al. (2017) benchmark, as well as real-world scenes from Sen et al. (2012) and Tursun et al. (2016).
Quantitative Performance
On the Kalantari dataset, the HDR-Transformer achieved a PSNR-$\mu$ of 44.32, surpassing the previous state-of-the-art (43.92). It also recorded a higher HDR-VDP-2 score of 66.03, indicating superior perceptual quality.
Qualitative Comparison
Visual results demonstrate the model's ability to reconstruct realistic details in saturated or high-motion regions where other methods fail.
Efficiency
Despite its performance, the HDR-Transformer is remarkably efficient:
- Parameters: 1.22M (vs. 2.56M for HDR-GAN).
- Inference Time: 0.15s for a 1.5MP image, nearly twice as fast as its closest competitors.
Conclusion
The HDR-Transformer represents a significant step forward in ghost-free HDR imaging. By combining the global modeling power of Transformers with the local precision of convolutions, it offers a robust and efficient solution for high-quality image reconstruction. Future work may extend this context-aware approach to video HDR, where temporal consistency across many frames is paramount.
Summary updated