- Clone this repo:
git clone https://github.com/amaha7984/KAN-CUT
cd KAN-CUT
- Download the horse2zebra dataset from CycleGAN github page: https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix/blob/master/datasets/download_cyclegan_dataset.sh
The dataset downloaded should be placed in the ./datasets/horse2zebra/
.
- Train the KAN-CUT model:
python train.py --dataroot ./datasets/horse2zebra --name horse2zebra_KANCUT --CUT_mode kancut
The checkpoints will be stored at ./checkpoints/ horse2zebra_KANCUT/web
.
- Test the trained KAN-CUT model:
python test.py --dataroot ./datasets/ horse2zebra --name horse2zebra_KANCUT --CUT_mode kancut
The test results will be saved to an HTML file located at: ./results/horse2zebra_KANCUT/latest_train/index.html
.
KAN-CUT is trained with identity preservation loss and with lambda_NCE=1
, closely aligning with the CUT approach
- The Horse2Zebra dataset can be downloaded from CycleGAN repository. Please visit this link https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix
- The Cat2Dog dataset is a subset of the AFHQ dataset. Please visit https://github.com/clovaai/stargan-v2 and download the AFHQ dataset.
If you use this code for your research, please cite our paper.
Our code is developed based on CUT and efficient-kan. We appreciate the great work provided by CUT. We thank pytorch-fid for facilitating the computation of FID scores.