RawHDR: High Dynamic Range Image Reconstruction from a Single Raw Image

July 21, 2025 · View on GitHub

​This is the dataset and code for RawHDR: High Dynamic Range Image Reconstruction from a Single Raw Image, ICCV 2023, by Yunhao Zou, Chenggang Yan, and Ying Fu.


Code

Training

To train the RawHDR model:

python train.py

Key training settings:

  • Training data should be placed in /data1/HDR/MAT_train/
  • Model checkpoints will be saved in ./saved_model/canon_logl2/
  • Training results/samples will be saved in ./train_results/canon_logl2/

Testing

To evaluate the trained model:

python test.py

Key testing settings:

  • Test data should be placed in /data/HDR/MAT_test/
  • The model evaluates patches of size 2048x2048

Pretrained Model

You can download the pretrained model from OneDrive.


Dataset Description

We capture a real paired Raw-to-HDR dataset for HDR reconstruction from a single Raw image. The captured dataset covers a large range of HDR scenarios, including modern/ancient buildings, art districts, tourist attractions, street shops and restaurants, abandoned factories, city views and so on. Those images are captured at different times of the day, including daytime and nighttime, which further guarantees the diversity of the paired Raw-to-HDR dataset.


Capturing Process

  • Carefully choose HDR scenes
  • Fix the camera (Canon 5D Mark IV) on a tripod
  • Use bracket exposure mode to capture different exposures of the same scene including -3EV, 0EV, and +3EV
  • 0EV Raw images are served as input images, ground truth images are fused by HDR merging method (Debevec etal., 2008)

Dataset Details

In total, we collect 324 pairs of Raw/HDR images using Canon 5D Mark IV camera. For each scene, images are with a high resolution of $4480\times 6720$, and the final dataset is carefully checked and filtered to exclude misaligned pairs. The input Raw images of our dataset are recorded in 14-bit Raw format, and the corresponding HDR images are 20-bit, with additional image profiles (white balance, color correction matrix) recorded in the file.


You can download both the training data and testing data of this dataset at [OneDrive][BaiduDisk](Extraction Code: 4fxm).


Representitive Example Scenes

Daytime part

Nighttime part

Citation

@inproceedings{zou2023rawhdr,
  title={RawHDR: High Dynamic Range Image Reconstruction from a Single Raw Image},
  author={Zou, Yunhao and Yan, Chenggang and Fu, Ying},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  year={2023}
}

contact

If you have any problems, please feel free to contact me at zouyunhao@bit.edu.cn