CartoonGAN(in CVPR2018) implementation code with pytorch.
- python : 3.6.10
- pytorch : 1.6.0
- torchvision : 0.7.0
- k80 (Microsoft Azure VM server)
- Your GPU card must have at least 11GB of VRAM.
- Ubuntu 18.04-LTS
.
├── Data
│ └── train
│ ├── cartoon
│ │ └── 1
│ ├── edge_smoothing
│ │ └── 0
│ └── real
│ └── 0
├── Saved_model
├── src
└── Train
├── Pretraining
└── Training
The directory to save cartoon image set to train models.
The directory to save edge smoothed cartoon image set to train models. You don't have to do anything to this directory.
The directory to save real image set to train models.
After the training process is over, the generated weight files are saved in this directory.
Only used for other tasks.
The intermediate results and weight files created during the pre-training process are saved.
The intermediate validation results and weight files(every 5 epoch) created during the main-training process are saved.
- If you want to train models, put the cartoon image set in "Data/cartoon/1/" directory. and put the real image set in "Data/real/0" directory.
- Open the Train.py and edit the parameters at line 20-41.
- Excute command
python Train.py
We used cartoon image set from Tom and Jerry animation to train models. And Flickr 30k dataset was used for real image set. Each label contains about 20,000 images.
Original | Epoch 1 | Epoch 5 | Epoch 10 |
---|---|---|---|
Original | Converted |
---|---|