Home

Awesome

Hierarchical Dynamic Image Harmonization

PWC

PWC

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

Preparation

1. Clone this repo:

git clone https://github.com/chenhaoxing/HDNet
cd HDNet

2. Requirements

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

3. Prepare the data

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.

Training and validation

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 

Results

Citing HDNet

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}
}

Acknowledgement

Many thanks to the nice work of RainNet. Our codes and configs follow RainNet.

Contacts

Please feel free to contact us if you have any problems.

Email: haoxingchen@smail.nju.edu.cn or hx.chen@hotmail.com