Skip to content
/ GMNet Public

[ICLR2025] Learning Gain Map for Inverse Tone Mapping

License

Notifications You must be signed in to change notification settings

qtlark/GMNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 

Repository files navigation

[ICLR2025] Learning Gain Map for Inverse Tone Mapping

Yinuo Liao, Yuanshen Guan, Ruikang Xu, Jiacheng Li, Shida Sun, Zhiwei Xiong*

[Paper Link]  [Datasets]  [Codes]  [Scripts]  [Contact]

@inproceedings{Liao_2025_ICLR,
    title     = {Learning Gain Map for Inverse Tone Mapping},
    author    = {Yinuo Liao and Yuanshen Guan and Ruikang Xu and Jiacheng Li and Shida Sun and Zhiwei Xiong},
    booktitle = {The Thirteenth International Conference on Learning Representations},
    month     = {April},
    year      = {2025}
}

1. Datasets

We provide Synthetic Dataset and Real-world Dataset, which are organized by following four parts:

  • image: The input SDR Images
  • gainmap: The Gourd-turth Gain Maps
  • metadata: The metadata for restore HDR form SDR-GM pair (Only Qmax here)
  • thumbnail: The down-sampled SDR Images in resolution 256×256 (Bicubic interpolation)

The data structure in dataset will be like:

synthetic_dataset
├── train
|   ├── image
|   |   └── *.png
|   ├── gainmap
|   |   └── *.png
|   ├── metadata
|   |   └── *.npy
|   └── thumbnail
|       └── *.png
└── test
    ├── image
    |   └── *.png
    ├── gainmap
    |   └── *.png
    ├── metadata
    |   └── *.npy
    └── thumbnail
        └── *.png

and more information can be found in the paper and the table below:

Synthetic Dataset Real-world Dataset
Source HDR video frames taken photos
Volume ㅤㅤㅤ900 trainset & 100 testsetㅤㅤㅤ ㅤㅤㅤ900 trainset & 100 testsetㅤㅤㅤ
SDR White Level 100 nit 203 nit
HDR Peak Level 800 nit 1015 nit
ㅤㅤQmax Rangeㅤㅤ [0, 3] ([0, log8]) [0, 2.32] ([0,log5])
Input SDR Image 3840×2160 8bit RGB 4096×3072 8bit RGB
Gourd-turth Gain Map 3840×2160 8bit Gray 2048×1536 8bit Gray
ㅤㅤDownload Linkㅤㅤ [BaiduNetDisk] [OneDrive]  [BaiduNetDisk] [OneDrive]

2. Codes

2.1 How to test

Please download our dataset first, then modify the dataroot in ./codes/options/test/gmnet_test.yml to the path you store dataset, and you can modify pretrain_model_G to choose the pretrained model. When the configuration in gmnet_test.yml is ready, you can run the conmand:

cd codes
python test.py -opt options/config/test_real.yml

The test results will be saved to ./results/test_name, and you can evaluate the quantitative metrics by matlab_evaluation in [Scripts].

2.2 How to train

To facilitate the training process, please modify the data path in crop_training_patch.py in [Scripts] and run it to crop the images to patches:

cd scripts
python crop_training_patch.py

It will generate pathes of image to image_sub folder, and the pathes of gainmap to gainmap_sub folder. After that, please modify the dataroot in ./codes/options/train/gmnet_train.yml to the sub-folder, then tun:

cd codes
python train.py -opt options/config/train_real.yml

The checkpoints and training states can be found ./experiments/train_name.

3. Scripts

We provide several practical scripts in ./scripts and the details are as following:

  • matlab_evaluation: This folder stores matlab scripts for evaluation. Please first download and install HDRVDP3 and HDR_Toolbox and place two folders into ./scripts/matlab_evaluate folder. The modify the PD and GT path in evaluation.m and run it to get quantitative metrics.
  • crop_training_patch.py: This script crop the images to patches for training. (from HDRTVNet)
  • gm_hdr_decode.py: The double-layer HDR image are store in one single file. This script extracts image, gainmap and qmax from double-layer file.
  • pq_visualize.py: This script convert the linear HDR image in nit unit to HDR image by PQ-OETF for visualization. The PQ-EOTF are also provided.

4. Contact

If you have any questions, please submit issue or contact [email protected]

5. Acknowledgment

We appreciate the following github repositories for their valuable work:

About

[ICLR2025] Learning Gain Map for Inverse Tone Mapping

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published