venture-anime / cartoongan-pytorch

Experimental CartoonGAN (Chen et.al.) implementation for quicker background generation for posters and new episodes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CartoonGAN (PyTorch)

This is a modified version of Yijunmaverick's implementation of CartoonGAN [Chen et al., CVPR18]. This repo was created due to lack of activity in original repo.

This model is normally used for poster POCs and Blender3D->2D background tests and pre-processing, more like a Photoshop filter for visualising characters with the background before post-processing with light rays, additional shadows, among others.

Hugging Face Spaces Demo

You can check out the demo here: Demo in Hugging Face Spaces

Contribute to the demo repository here: https://github.com/venture-anime/anime-background-gan-hf-space

Requirements

  • Unix-based OS
  • python 3.9.9 (other 3.x versions may work as well)
    • NOTE: This also works with M1 Macbooks
  • wget (brew install wget) (if you don't have it)
  • (optional, will default to CPU if no GPU/CUDA detected) NVIDIA GPU

Setup

  1. pip install -r requirements.txt
  2. Download the pretrained models with sh pretrained_model/download_pth.sh

Running

python main.py --input_dir test_img --style Hosoda

Contributing

Create a pull request with your changes and assign it to Sho. Make sure to tag your commits using the numpy commit guidelines for easier review.

About

Experimental CartoonGAN (Chen et.al.) implementation for quicker background generation for posters and new episodes


Languages

Language:Python 95.8%Language:Shell 4.2%