All Projects → Mukosame → Anime2Sketch

Mukosame / Anime2Sketch

Licence: MIT license
A sketch extractor for anime/illustration.

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to Anime2Sketch

AODA
Official implementation of "Adversarial Open Domain Adaptation for Sketch-to-Photo Synthesis"(WACV 2022/CVPRW 2021)
Stars: ✭ 44 (-97.29%)
Mutual labels:  sketch, image-generation, gans, wacv
Selectiongan
[CVPR 2019 Oral] Multi-Channel Attention Selection GAN with Cascaded Semantic Guidance for Cross-View Image Translation
Stars: ✭ 366 (-77.45%)
Mutual labels:  generative-adversarial-network, image-generation, gans
Data Efficient Gans
[NeurIPS 2020] Differentiable Augmentation for Data-Efficient GAN Training
Stars: ✭ 682 (-57.98%)
Mutual labels:  generative-adversarial-network, image-generation, gans
Anycost Gan
[CVPR 2021] Anycost GANs for Interactive Image Synthesis and Editing
Stars: ✭ 367 (-77.39%)
Mutual labels:  generative-adversarial-network, image-generation, gans
Contrastive Unpaired Translation
Contrastive unpaired image-to-image translation, faster and lighter training than cyclegan (ECCV 2020, in PyTorch)
Stars: ✭ 822 (-49.35%)
Mutual labels:  generative-adversarial-network, image-generation, gans
Cyclegan
Software that can generate photos from paintings, turn horses into zebras, perform style transfer, and more.
Stars: ✭ 10,933 (+573.63%)
Mutual labels:  generative-adversarial-network, image-generation, gans
Gesturegan
[ACM MM 2018 Oral] GestureGAN for Hand Gesture-to-Gesture Translation in the Wild
Stars: ✭ 136 (-91.62%)
Mutual labels:  generative-adversarial-network, image-generation, gans
Pytorch Cyclegan And Pix2pix
Image-to-Image Translation in PyTorch
Stars: ✭ 16,477 (+915.22%)
Mutual labels:  generative-adversarial-network, image-generation, gans
Finegan
FineGAN: Unsupervised Hierarchical Disentanglement for Fine-grained Object Generation and Discovery
Stars: ✭ 240 (-85.21%)
Mutual labels:  generative-adversarial-network, image-generation, gans
Kitsu Server
🚂 Rails API server for Kitsu
Stars: ✭ 145 (-91.07%)
Mutual labels:  anime, manga
Kitsu Web
🔥 Ember.js app for Kitsu
Stars: ✭ 158 (-90.26%)
Mutual labels:  anime, manga
pytorch-gans
PyTorch implementation of GANs (Generative Adversarial Networks). DCGAN, Pix2Pix, CycleGAN, SRGAN
Stars: ✭ 21 (-98.71%)
Mutual labels:  generative-adversarial-network, gans
Malgraph4
MALgraph: statistics service for MyAnimeList.net users.
Stars: ✭ 143 (-91.19%)
Mutual labels:  anime, manga
Onepiece Kg
a knowledge graph project for ONEPIECE /《海贼王》知识图谱
Stars: ✭ 123 (-92.42%)
Mutual labels:  anime, manga
pynocchio
🚀 A minimalist comic reader
Stars: ✭ 72 (-95.56%)
Mutual labels:  comic, manga
Kitsu Mobile
📱 Kitsu mobile app for iOS and Android
Stars: ✭ 95 (-94.15%)
Mutual labels:  anime, manga
Awesome Anime Sources
A curated list of everything anime.
Stars: ✭ 164 (-89.9%)
Mutual labels:  anime, manga
Kitsu Tools
🔨 The tools we use to build Kitsu, the coolest platform for anime and manga
Stars: ✭ 2,055 (+26.62%)
Mutual labels:  anime, manga
Linedistiller
A data-driven line extractor for 2D anime, manga and illustration using Keras.
Stars: ✭ 87 (-94.64%)
Mutual labels:  anime, manga
Anime Face Gan Keras
A DCGAN to generate anime faces using custom mined dataset
Stars: ✭ 161 (-90.08%)
Mutual labels:  anime, generative-adversarial-network

Anime2Sketch

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

By Xiaoyu Xiang

teaser demo

Updates

  • 2022.1.14: Add Docker environment by kitoria
  • 2021.12.25: Update README. Merry Christmas!
  • 2021.5.24: Fix an interpolation error and a GPU inference error.
  • 2021.5.12: Web Demo by AK391 gradio_web_demo
  • 2021.5.2: Upload more example results of anime video.
  • 2021.4.30: Upload the test scripts. Now our repo is ready to run!
  • 2021.4.11: Upload the pretrained weights, and more test results.
  • 2021.4.8: Create the repo.

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

  • Linux, macOS, Docker
  • Python 3 (Recommend to use Anaconda)
  • CPU or NVIDIA GPU + CUDA CuDNN
  • Pillow, PyTorch

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/

Docker

If you want to run on Docker, you can easily do so by customizing the input/output images directory.
Build docker image

make docker-build

Setting input/output directory
You can customize mount volumes for input/output images by Makefile. Please setting your target directory.

docker run -it --rm --gpus all -v `pwd`:/workspace -v {your_input_dir}:/input -v {your_output_dir}:/output anime2sketch

example:

docker run -it --rm --gpus all -v `pwd`:/workspace -v `pwd`/test_samples:/input -v `pwd`/output:/output anime2sketch

Run

make docker-run

if you want to run cpu only, you will need to fix two things (remove gpu options).

  • Dockerfile CMD line to CMD [ "python", "test.py", "--dataroot", "/input", "--load_size", "512", "--output_dir", "/output" ]
  • Makefile docker-run line to docker run -it --rm -v `pwd`:/workspace -v `pwd`/images/input:/input -v `pwd`/images/output:/output anime2sketch

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 demo demo1 Turn handrawn photos to clean linearts: demo2 Simplify freehand sketches: demo3 And more anime results: demo4 demo5

Contact

Xiaoyu Xiang.

You can also leave your questions as issues in the repository. I will be glad to answer them!

License

This project is released under the MIT License.

Citations

@misc{Anime2Sketch,
  author = {Xiaoyu Xiang, Ding Liu, Xiao Yang, Yiheng Zhu, Xiaohui Shen},
  title = {Anime2Sketch: A Sketch Extractor for Anime Arts with Deep Networks},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/Mukosame/Anime2Sketch}}
}

@inproceedings{xiang2022adversarial,
  title={Adversarial Open Domain Adaptation for Sketch-to-Photo Synthesis},
  author={Xiang, Xiaoyu and Liu, Ding and Yang, Xiao and Zhu, Yiheng and Shen, Xiaohui and Allebach, Jan P},
  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
  year={2022}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].