This repository contains official implementation of Unsupervised HDR Image and Video Tone Mapping via Contrastive Learning in TCSVT 2023, by Cong Cao, Huanjing Yue, Xin Liu, and Jingyu Yang. [arxiv] [journal]
You can download our dataset from Google Drive or MEGA or Baidu Netdisk (key: 6jl2).
- Python >= 3.5
- Pytorch >= 1.10
For image tone mapping, you can download the training data from Google Drive or MEGA or Baidu Netdisk (key: hesn), and download the HDR Survey, HDRI Haven, and LVZ-HDR dataset as test data. We also provide preprocessed test data that can be downloaded from Google Drive or Baidu Netdisk (key: xrhp), the LVZ-HDR data has been multiplied by a gain of 100. For video tone mapping, you need to add the UVTM dataset for training and testing.
You can download pretrained weights from Google Drive or Baidu Netdisk (key: b6jm), then run the following commands for image and video TMO testing:
cd activate_trained_model
sh run_imageTMO_test_on_HDRSurveyDataset.sh
sh run_videoTMO_test_on_UVTMTestDataset.sh
For image TMO, we test the 1/4 resolution of the HDR Survey dataset and the full resolution of the preprocessed HDRI Haven and LVZ-HDR datasets. You can modify lines 224,225,303,304 in the code of 'utils/model_save_util.py' to switch these two modes.
Run the following commands for image and video TMO training
bash run_imageTMO_train.sh
bash run_videoTMO_train.sh
If you find our dataset or code helpful in your research or work, please cite our paper:
@article{cao2023unsupervised,
title={Unsupervised HDR Image and Video Tone Mapping via Contrastive Learning},
author={Cao, Cong and Yue, Huanjing and Liu, Xin and Yang, Jingyu},
journal={IEEE Transactions on Circuits and Systems for Video Technology},
year={2023},
publisher={IEEE}
}