Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


The official PyTorch implementation of paper "LHDR: HDR Reconstruction for Legacy Content using a Lightweight DNN" (paper (ArXiv), paper, supplementary material) in ACCV2022.

  title={LHDR: HDR Reconstructionfor Legacy Content using a Lightweight DNN}, 
  author={Guo, Cheng and Jiang Xiuhua},
  booktitle={Proceedings of the 16th Asian Conference on Computer Vision},

1. Overview

1.1 Our scope

This method belongs to computer vision (CV) -> image-to-image (I2I) -> low-level vision -> high dynamic range (HDR) related.

NOTE THAT this method DONNOT belong to multi-exposure HDR imaging which takes merge multiple images into HDR, it belongs to single-image reconstruction (SI-HDR) who predict HDR from single image.

1.2 Key features

Our LHDR tackles 2 issues of current methods:

  • The first L: current methods could not well process Legacy content with degradations e.g. camera noise, JPEG compression and over-exposure etc.
  • The second L: current methods are too bulky for real application, so we have to design a more Lightweight network.

2. Getting Started

2.1 Prerequisites

  • Python
  • PyTorch
  • OpenCV
  • NumPy
  • NVIDIA GPU, cnDNN, CUDA (only for training)

2.2 How to test

Run with below configuration(s):

python imgName.jpg

When batch processing, use wildcard *:

python imgPath/*.jpg

Add below configuration(s) for specific propose:

Propose Configuration
Specify output path -out resultDir/
Resize image before inference -resize True -height newH -width newW
Add filename tag -tag yourTag
Force CPU processing -use_gpu False
Change precision to half (when GRAM OMM) -half True
Save result in another format (defalut .hdr) -out_format suffix
png as 16bit .png
exr require extra package openEXR
Donnot linerize the output HDR -linearize False

2.3 How to train

Put our under your own PyTorch scheme, e.g. BasicSR, and change the dataloader etc., remember to:

  • Normalize input SDR (img) by dividing 255.0. Note that the input to network is a tuple [img,s_cond,c_cond], see line145 in for detail.
  • Transfer the normalized label HDR to non-linear domain by 0.45 exponent (as our pre-processing specified in paper).
  • Change channel order BGR (if so) to RGB.


Guo Cheng (Andre Guo)

  • State Key Laboratory of Media Convergence and Communication (MCC), Communication University of China (CUC), Beijing, China.
  • Peng Cheng Laboratory (PCL), Shenzhen, China.


The official PyTorch implementation of paper 'LHDR: HDR Reconstruction for Legacy Content using a Lightweight DNN' in ACCV2022.






No releases published


No packages published