Cartoon-GAN
Paper: https://arxiv.org/abs/2005.07702
Description
This project takes on the problem of transferring the style of cartoon images to real-life photographic images by implementing previous work done by CartoonGAN. We trained a Generative Adversial Network(GAN) on over 60 000 images from works by Hayao Miyazaki at Studio Ghibli.
To the people asking for the dataset, im sorry but as the material is copyright protected i cannot share the dataset.
Dependencies
-
Install Anaconda from https://www.anaconda.com/
-
Install pytorch at: https://pytorch.org/get-started/locally/
-
Install dependencies:
python -m pip install tqdm pillow numpy matplotlib opencv-python
-
For predicting videos you will also need ffmpeg
Weights
Weights for the presented models can be found here
Training
All training code can be found in experiment.ipynb
Predict
Predict by running predict.py
.
Example:
python predict.py -i C:/folder/input_image.png -o ./output_folder/output_image.png
Predictions can be made on images, videos or a folder of images/videos.
Demonstration
Image # | Original | CartoonGAN | GANILLA | Our implementation |
---|---|---|---|---|
1 | ||||
2 | ||||
3 | ||||
4 | ||||
5 | ||||
6 | ||||
7 | ||||
8 | ||||
9 | ||||
10 | ||||
11 | ||||
12 | ||||
13 | ||||
14 | ||||
15 | ||||
16 | ||||
17 | ||||
18 | ||||
19 | ||||
20 |
Citation
@misc{andersson2020generative,
title={Generative Adversarial Networks for photo to Hayao Miyazaki style cartoons},
author={Filip Andersson and Simon Arvidsson},
year={2020},
eprint={2005.07702},
archivePrefix={arXiv},
primaryClass={cs.GR}
}