Anime2Sketch

Anime2Sketch: A sketch extractor for illustration, anime art, manga

By Xiaoyu Xiang

vinland_saga

Introduction

The repository contains the testing codes and pretrained weights for Anime2Sketch.

Anime2Sketch is a sketch extractor that works well on illustration, anime art, and manga. It is an application based on the paper "Adversarial Open Domain Adaption for Sketch-to-Photo Synthesis".

Prerequisites

Get Started

Installation

Install the required packages: pip install -r requirements.txt

Download Pretrained Weights

Please download the weights from GoogleDrive, and put it into the weights/ folder.

Test

python3 test.py --dataroot /your_input/dir --load_size 512 --output_dir /your_output/dir

The above command includes three arguments:

  • dataroot: your test file or directory
  • load_size: due to the memory limit, we need to resize the input image before processing. By default, we resize it to 512x512.
  • output_dir: path of the output directory

Run our example:

python3 test.py --dataroot test_samples/madoka.jpg --load_size 512 --output_dir results/

Train

This project is a sub-branch of AODA. Please check it for the training instructions.

More Results

Our model works well on illustration arts:
madoka_in_out

demo1_in_out
Turn handrawn photos to clean linearts:
demo2_in_out
Simplify freehand sketches:
demo3_in_out
And more anime results:
vinland_1

Anime2Sketch

GitHub

https://github.com/Mukosame/Anime2Sketch