A simplified and concise implementation of Contrastive Learning for Unpaired Image-to-Image Translation (ECCV 2020)
Please refer to the official implementation here. This code is a simplified version revised from wilbertcaine's implementation.
Suppose you would like to transfer image from source domain X to the target domain Y.
- Please split your data
Xinto training and testing set. Namely, splitXintoX_trainandX_test. - Put
X_traininto./data/trainX. - Put
X_testinto./data/testX. - Put
Yinto./data/trainY. - Modify
./config.yamlif you would like to adjust some setting, or just keep the default setting. - Execute
python3 train.py. You can usepython3 train.py --verboseto see more info during training. - Some transfered examples will be generated during training. Please check the
./experiments/$experiment_name/train/folder.
python3 inference.py
The transfered images will be stored in ./experiments/$experiment_name/test/ folder.
- Python 3.8.6
- All the required packages are listed in the
requirements.txt.