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.
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.
- download
all_data.csv
from safebooru dataset [2] - point to
all_data.csv
inPATH_TO_SAFEBOORU_ALL_DATA_CSV
ofcartoon_image_downloader.py
- run
make install
to install necessary libraries - run
make cartoons
to download configurable amount of medium size images
- run
make cartoons-smooth
to create the images
- download and unzip coco annotations from [3]
- configure annotations dir location in
PATH_TO_COCO_ANNOTATIONS_ROOT_FOLDER
ofphoto_downloader.py
- run
make photos
to download configurable amount of photos of persons
All the steps are described in a jupyter notebook on colab, please see here for details.
- run
make install-transform
- download pre-trained weights, they are available for download as part of the release here..
- run
make transform IMAGE=some_example_image_path
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/ .
Thanks to the authors [Chen et al., CVPR18] of the paper for their great work.
[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