• Stars
    star
    388
  • Rank 110,031 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created about 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pytorch implementation of CartoonGAN (CVPR 2018)

pytorch-CartoonGAN

Pytorch implementation of CartoonGAN [1] (CVPR 2018)

  • Parameters without information in the paper were set arbitrarily.
  • I used face-cropped celebA (src) and anime (tgt) collected from the web data because I could not find the author's data.

Tensorflow version

CartoonGAN-tensorflow

Usage

1.Download VGG19

VGG19

2.Train

python CartoonGAN.py --name your_project_name --src_data src_data_path --tgt_data tgt_data_path --vgg_model pre_trained_VGG19_model_path

Folder structure

The following shows basic folder structure.

β”œβ”€β”€ data
β”‚   β”œβ”€β”€ src_data # src data (not included in this repo)
β”‚   β”‚   β”œβ”€β”€ train 
β”‚   β”‚   └── test
β”‚   └── tgt_data # tgt data (not included in this repo)
β”‚       β”œβ”€β”€ train 
β”‚       └── pair # edge-promoting results to be saved here
β”‚
β”œβ”€β”€ CartoonGAN.py # training code
β”œβ”€β”€ edge_promoting.py
β”œβ”€β”€ utils.py
β”œβ”€β”€ networks.py
└── name_results # results to be saved here

Resutls

paper results

celebA2anime face

Initialization phase (reconstruction)

Input - Result (this repo)

Cartoonization

Input - Result (this repo) Author's pre-trained model (Hayao) Author's pre-trained model (Hosoda)

Development Environment

  • NVIDIA GTX 1080 ti
  • cuda 8.0
  • python 3.5.3
  • pytorch 0.4.0
  • torchvision 0.2.1
  • opencv 3.2.0

Reference

[1] Chen, Yang, Yu-Kun Lai, and Yong-Jin Liu. "CartoonGAN: Generative Adversarial Networks for Photo Cartoonization." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2018.

(Full paper: http://openaccess.thecvf.com/content_cvpr_2018/papers/Chen_CartoonGAN_Generative_Adversarial_CVPR_2018_paper.pdf)

More Repositories

1

pytorch-generative-model-collections

Collection of generative models in Pytorch version.
Python
2,588
star
2

UGATIT-pytorch

Official PyTorch implementation of U-GAT-IT: Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation
Python
2,508
star
3

pytorch-MNIST-CelebA-GAN-DCGAN

Pytorch implementation of Generative Adversarial Networks (GAN) and Deep Convolutional Generative Adversarial Networks (DCGAN) for MNIST and CelebA datasets
Python
507
star
4

pytorch-MNIST-CelebA-cGAN-cDCGAN

Pytorch implementation of conditional Generative Adversarial Networks (cGAN) and conditional Deep Convolutional Generative Adversarial Networks (cDCGAN) for MNIST dataset
Python
482
star
5

tensorflow-MNIST-GAN-DCGAN

Tensorflow implementation of Generative Adversarial Networks (GAN) and Deep Convolutional Generative Adversarial Netwokrs for MNIST dataset.
Python
175
star
6

tensorflow-MNIST-cGAN-cDCGAN

Tensorflow implementation of conditional Generative Adversarial Networks (cGAN) and conditional Deep Convolutional Adversarial Networks (cDCGAN) for MANIST dataset.
Python
147
star
7

pytorch-pix2pix

Pytorch implementation of pix2pix for various datasets.
Python
119
star
8

pytorch-Conditional-image-to-image-translation

Pytorch implementation of Conditional image-to-image translation (CVPR 2018)
Python
48
star
9

pytorch-apex-experiment

Simple experiment of Apex (A PyTorch Extension)
Python
47
star
10

pytorch-CycleGAN

Pytorch implementation of CycleGAN.
Python
40
star
11

FUNIT-pytorch

Pytorch implementation of "Few-Shot Unsupervised Image-to-Image Translation" (ICCV 2019)
Python
36
star
12

tensorflow-pix2pix

Tensorflow implementation of pix2pix for various datasets.
Python
6
star