Skip to content

Latest commit

 

History

History
67 lines (51 loc) · 3.1 KB

README.md

File metadata and controls

67 lines (51 loc) · 3.1 KB

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

  • 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

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: [email protected] or [email protected]