This is the official code of the ACM MM'23 oral paper: Hierarchical Dynamic Image Harmonization.
Hierarchical Dynamic Image Harmonization
Haoxing Chen, Zhangxuan Gu, Yaohui Li, Jun Lan, Changhua Meng, Weiqiang Wang, Huaxiong Li, ACM Multimedia 2023
git clone https://github.com/chenhaoxing/HDNet
cd HDNet
- Both Linux and Windows are supported, but Linux is recommended for compatibility reasons.
- We have tested on PyTorch 1.8.1+cu11.
install the required packages using pip:
pip3 install -r requirement.txt
or conda:
conda create -n rainnet python=3.8
conda activate rainnet
pip install -r requirement.txt
Download iHarmony4 dataset in dataset folder and run data/preprocess_iharmony4.py
to resize the images (eg, 512x512, or 256x256) and save the resized images in your local device.
We provide the code in train_evaluate.py, which supports the model training, evaluation and results saving in iHarmony4 dataset.
python train_evaluate.py --dataset_root <DATA_DIR> --save_dir results --batch_size 12 --device cuda
If you use HDNet in your research, please use the following BibTeX entry.
@inproceedings{MM23_HDNet,
title={Hierarchical Dynamic Image Harmonization},
author={Chen, Haoxing and Gu, Zhangxuan and Yaohui Li and Lan, Jun and Meng, Changhua and Wang, Weiqiang and Li, Huaxiong},
booktitle={ACM Multimedia},
year={2023}
}
Many thanks to the nice work of RainNet. Our codes and configs follow RainNet.
Please feel free to contact us if you have any problems.