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
X
into training and testing set. Namely, splitX
intoX_train
andX_test
. - Put
X_train
into./data/trainX
. - Put
X_test
into./data/testX
. - Put
Y
into./data/trainY
. - Modify
./config.yaml
if you would like to adjust some setting, or just keep the default setting. - Execute
python3 train.py
. You can usepython3 train.py --verbose
to 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
.