Git Product home page Git Product logo

cartoon-gan's Introduction

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

  • download all_data.csv from safebooru dataset [2]
  • point to all_data.csv in PATH_TO_SAFEBOORU_ALL_DATA_CSV of cartoon_image_downloader.py
  • run make install to install necessary libraries
  • run make cartoons to download configurable amount of medium size images

Edge-smoothed version of cartoon images

  • run make cartoons-smooth to create the images

Photos

  • download and unzip coco annotations from [3]
  • configure annotations dir location in PATH_TO_COCO_ANNOTATIONS_ROOT_FOLDER of photo_downloader.py
  • run make photos to download configurable amount of photos of persons

Step 2: Train model

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

Step 3: Test

  • 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/ .

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

cartoon-gan's People

Contributors

tobiassunderdiek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.