TobiasSunderdiek / cartoon-gan

Implementation of cartoon GAN [Chen et al., CVPR18] with pytorch
https://tobiassunderdiek.github.io/cartoon-gan/
MIT License
61 stars 22 forks source link
ai artificial-intelligence cartoongan convolutional-neural-network deep-learning gan generative-adversarial-network neural-networks python3 pytorch real-to-cartoon-translation

CartoonGAN - my attempt to implement it

Within this repo, I try to implement a cartoon GAN [Chen et al., CVPR18].

I created a github page for detailed documentation, please see https://tobiassunderdiek.github.io/cartoon-gan/ for details.

result.png

Usage

Step 1: Generate datasets

All scripts to create the images are resumeable. It is possible to run make cartoons and make photos in parallel by calling them manually in separate terminals.

Cartoon images

Edge-smoothed version of cartoon images

Photos

Step 2: Train model

All the steps are described in a jupyter notebook on colab, please see here for details.

Step 3: Test

Additional information about how to load the pre-trained weights and transform images can be found in the project documentation here: https://tobiassunderdiek.github.io/cartoon-gan/ .

Credits

Thanks to the authors [Chen et al., CVPR18] of the paper for their great work.

References

[Chen et al., CVPR18] http://openaccess.thecvf.com/content_cvpr_2018/papers/Chen_CartoonGAN_Generative_Adversarial_CVPR_2018_paper.pdf

[2] https://www.kaggle.com/alamson/safebooru/download

[3] http://images.cocodataset.org/annotations/annotations_trainval2017.zip