Dsrn: an Efficient Deep Network for Image Relighting

Sourya Dipta Das, Nisarg Shah, Saikat Dutta, Himanshu Kumar · DOI

Abstract

Image relighting allows for the post-capture emulation of custom and natural lighting conditions, enabling automatic photo enhancement through illumination-specific retouching. While deep learning frameworks have shown extraordinary capabilities in this domain, most state-of-the-art methods remain computationally intensive and memory-inefficient. In this paper, we propose the Deep Stacked Relighting Network (DSRN), a lightweight, real-time framework that utilizes aggregated features at multiple scales. DSRN is highly efficient, with a total size of approximately 42 MB and an average inference time of 0.0116s for $1024 \times 1024$ resolution images. Our results demonstrate robustness in translating color temperature and generating light gradients, with further performance gains achieved through multi-illumination input strategies.

Introduction

Image relighting—the process of changing illumination direction or color temperature after a photo is taken—is a complex task requiring a deep understanding of scene geometry, surface textures, and light interaction. While professional editing tools exist, they often struggle with significant directional changes. Conversely, existing deep learning models that handle these tasks are typically too slow for real-time use and too large for mobile deployment. DSRN addresses this gap by providing a high-quality, efficient solution for low-resource computing environments.

Methodology

The DSRN architecture is built on three core strategies designed to balance performance and efficiency:

  1. Multi-scale Image Pyramid: The network processes images at three resolutions simultaneously. This allows the model to capture global contextual information at lower resolutions while preserving fine details at higher resolutions.
  2. Stacked Architecture: Rather than simply increasing depth, DSRN "cascades" the base network twice. The output of the first stage is refined by the second, avoiding the diminishing returns often seen in ultra-deep networks.
  3. Two-Stage Training: The model is first trained using $L_2$ loss to establish basic structure and brightness, followed by a refinement stage using a "Combined Loss" ($L_{CL}$) that incorporates Mean Absolute Error, SSIM, Perceptual Loss, and Total Variation loss.
The DSRN architecture featuring two cascaded stages and multi-scale processing.

Additionally, the paper explores a Multi-illumination Approach. By fusing two images of the same scene illuminated from opposite directions, the model can recover details that might otherwise be lost in deep shadows, providing a superior starting point for reconstruction.

Experimental Setup

The researchers utilized the VIDIT (Virtual Image Dataset for Illumination Transfer), which contains 15,600 images across 390 scenes. Each scene is captured in 40 different illumination settings, covering five color temperatures and eight light directions. The model was trained on 300 scenes at $512 \times 512$ resolution and tested on resolutions up to $1024 \times 1024$.

Key Results

DSRN achieves a significant speedup over existing multi-scale models, clocking in at 0.0116 seconds for a 1MP image—nearly 80x faster than models like Dense-GridNet.

Visual comparison of relighting results under different illumination settings and input configurations.
  • Accuracy: DSRN achieved a PSNR of 17.89 on the VIDIT dataset, outperforming Pix2Pix, SRN, and DRN.
  • Multi-illumination Boost: Utilizing the multi-illumination fusion technique increased the PSNR to 19.25, highlighting the benefit of multiple views in resolving lighting discrepancies.
  • Portability: At 42 MB, the model is small enough for seamless mobile integration.

Conclusion and Future Work

DSRN demonstrates that real-time, high-quality image relighting is possible on lightweight hardware. However, limitations remain. The current model focuses primarily on diffuse reflection and does not explicitly account for specular highlights. Furthermore, while the model handles light gradients effectively, generating perfectly sharp, geometrically accurate shadows remains a challenge for future iterations. Future work will aim to incorporate more complex scene relighting scenarios and improve the handling of specular components.

Summary updated

BibTeX
@misc{das2021dsrn,
  author = {Sourya Dipta Das and Nisarg Shah and Saikat Dutta and Himanshu Kumar},
  title = {{Dsrn: an Efficient Deep Network for Image Relighting}},
  year = {2021},
  eprint = {2102.09242},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.09242},
}
Figure