PyTorch
implementations of CHAN for Image-to-Image Translation.Fei Gao, Xingxin Xu, Jun Yu, Meimei Shang, Xiang Li, and Dacheng Tao, Complementary, Heterogeneous and Adversarial Networks for Image-to-Image Translation, IEEE Transactions on Image Processing, 2021. (Accepted)
- Linux or similar environment
- Python 2.7
- NVIDIA GPU + CUDA CuDNN
- clone this repo:
git clone https://github.com/fei-hdu/chan.git
cd chan
- install PyTorch 0.4+
- Download a dataset
- CUFS splits of training and testing: files
- CityScapes, Facades, Google Map, Edge2Shoes, Edge2Handbags: Pix2Pix bash
-
Train:
python train.py --dataroot {dataset path} --datalist {datalist path} --pre_netG {coarse model path} --gpuid {your gpu ids}
-
Test:
python test.py --dataroot {dataset path} --datalist {datalist path} --pre_netG {final model path} --gpuid {your gpu ids}
A face photo-to-sketch model pre-trained on the CUSF dataset: Google Drive
The pre-trained model need to be save at ./checkpoint
Then you can test this imodel.
Our final results can be downloaded here
Our Quantitative performance in a variety of image-to-image translation tasks are shown below. We assign a score of +1, 0, or -1 to the best, mediate, and worst model according to each performance index. For each method, the total score on each dataset and that across all these datasets, are reported.
Best practice for training and testing your models. Feel free to ask any questions about coding. Xingxin Xu, [email protected]
If you find this useful for your research, please cite our paper as:
Fei Gao, Xingxin Xu, Jun Yu, Meimei Shang, Xiang Li, and Dacheng Tao, Complementary, Heterogeneous and Adversarial Networks for Image-to-Image Translation, IEEE Transactions on Image Processing, 2021. (Accepted)
@article{gao2021chan,
title = {Complementary, Heterogeneous and Adversarial Networks for Image-to-Image Translation},
author = {Fei Gao and Xingxin Xu and Jun Yu and Meimei Shang and Xiang Li and Dacheng Tao},
journal = {IEEE Transactions on Image Processing},
year = {2021},
url = {https://github.com/fei-hdu/chan},
}
Our code is inspired by pytorch-CycleGAN-and-pix2pix