All Projects → qyzdao → Shadesketch

qyzdao / Shadesketch

Licence: mit
Implementation of "Learning to Shadow Hand-drawn Sketches" CVPR 2020 (Oral)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Shadesketch

ganslate
Simple and extensible GAN image-to-image translation framework. Supports natural and medical images.
Stars: ✭ 17 (-93.54%)
Mutual labels:  image-translation
Splice
Official Pytorch Implementation for "Splicing ViT Features for Semantic Appearance Transfer" presenting "Splice" (CVPR 2022)
Stars: ✭ 126 (-52.09%)
Mutual labels:  image-translation
Rawpy
📷 RAW image processing for Python, a wrapper for libraw
Stars: ✭ 256 (-2.66%)
Mutual labels:  image-processing
BicycleGAN-pytorch
Pytorch implementation of BicycleGAN with implementation details
Stars: ✭ 99 (-62.36%)
Mutual labels:  image-translation
CoMoGAN
CoMoGAN: continuous model-guided image-to-image translation. CVPR 2021 oral.
Stars: ✭ 139 (-47.15%)
Mutual labels:  image-translation
Menyoki
Screen{shot,cast} and perform ImageOps on the command line 🌱 🏞️
Stars: ✭ 255 (-3.04%)
Mutual labels:  image-processing
pytorch-CycleGAN
Pytorch implementation of CycleGAN.
Stars: ✭ 39 (-85.17%)
Mutual labels:  image-translation
High Quality Ellipse Detection
A high-quality ellipse detector based on arc-support line segments which can both accurately and efficiently detect ellipses in images.
Stars: ✭ 261 (-0.76%)
Mutual labels:  image-processing
TriangleGAN
TriangleGAN, ACM MM 2019.
Stars: ✭ 28 (-89.35%)
Mutual labels:  image-translation
Noaa Apt
NOAA APT weather satellite image decoder, for Linux, Windows, RPi 2+ and OSX
Stars: ✭ 257 (-2.28%)
Mutual labels:  image-processing
pix2pix
PyTorch implementation of Image-to-Image Translation with Conditional Adversarial Nets (pix2pix)
Stars: ✭ 36 (-86.31%)
Mutual labels:  image-translation
IrwGAN
Official pytorch implementation of the IrwGAN for unaligned image-to-image translation
Stars: ✭ 33 (-87.45%)
Mutual labels:  image-translation
Photoeditor
A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
Stars: ✭ 3,105 (+1080.61%)
Mutual labels:  image-processing
BicycleGAN
Tensorflow implementation of the NIPS paper "Toward Multimodal Image-to-Image Translation"
Stars: ✭ 30 (-88.59%)
Mutual labels:  image-translation
Popsift
PopSift is an implementation of the SIFT algorithm in CUDA.
Stars: ✭ 259 (-1.52%)
Mutual labels:  image-processing
overlord
Official pytorch implementation of "Scaling-up Disentanglement for Image Translation", ICCV 2021.
Stars: ✭ 35 (-86.69%)
Mutual labels:  image-translation
Pytorch-Image-Translation-GANs
Pytorch implementations of most popular image-translation GANs, including Pixel2Pixel, CycleGAN and StarGAN.
Stars: ✭ 106 (-59.7%)
Mutual labels:  image-translation
Opencv Python Blueprints
M. Beyeler (2015). OpenCV with Python Blueprints: Design and develop advanced computer vision projects using OpenCV with Python, Packt Publishing Ltd., ISBN 978-178528269-0.
Stars: ✭ 262 (-0.38%)
Mutual labels:  image-processing
Photoflare
Quick, simple but powerful Cross Platform image editor.
Stars: ✭ 260 (-1.14%)
Mutual labels:  image-processing
Ai Job Notes
AI算法岗求职攻略(涵盖准备攻略、刷题指南、内推和AI公司清单等资料)
Stars: ✭ 3,191 (+1113.31%)
Mutual labels:  image-processing

ShadeSketch

Official Implementation of "Learning to Shadow Hand-drawn Sketches".

Project Site | Paper | Online Demo

Learning to Shadow Hand-drawn Sketches

IEEE Conference on Computer Vision and Pattern Recognition CVPR 2020 (Oral)

Qingyuan Zheng, Zhuoru Li (Hepesu), Adam W. Bargteil

Overview

Image of flowchart

We present a fully automatic method to generate detailed and accurate artistic shadows from pairs of line drawing sketches and lighting directions. We also contribute a new dataset of one thousand examples of pairs of line drawings and shadows that are tagged with lighting directions. Remarkably, the generated shadows quickly communicate the underlying 3D structure of the sketched scene. Consequently, the shadows generated by our approach can be used directly or as an excellent starting point for artists. We demonstrate that the deep learning network we propose takes a hand-drawn sketch, builds a 3D model in latent space, and renders the resulting shadows. The generated shadows respect the hand-drawn lines and underlying 3D space and contain sophisticated and accurate details, such as self-shadowing effects. Moreover, the generated shadows contain artistic effects, such as rim lighting or halos appearing from back lighting, that would be achievable with traditional 3D rendering methods.

Prerequisites

  • python3
  • numpy
  • scipy
  • matplotlib
  • opencv-python
  • tensorflow

Usage

Training

Download models and dataset to build data.npy SEE BELOW. We recommend using batch size of 8 or 4. The model becomes converged after 25k iterations.

For Tensorflow 1

python ./train_tf1.py

For Tensorflow 2

python ./train_tf2.py

Evaluating

Download models SEE BELOW.

For Single Light Direction, run:

python ./predict.py --use-smooth --use-norm --direction 810 --input-dir YOUR_DIR

--direction choice: 001, 002 or xy0, where x={1, 2, 3, 4, 5, 6, 7, 8} and y={1, 2, 3}.

For Changing Light Direction, run:

python ./predict_anim.py --use-smooth --use-norm --light-depth front --input YOUR_IMAGE

Models

Download models from following:

There are 3 models: linenorm.pb, linesmoother.pb and lineshader.pb . Place models in the models folder.

Dataset

Our dataset comprises 1,160 sketch/shadow pairs and includes a variety of lighting directions and subjects. Specifically, 372 front-lighting, 506 side-lighting, 111 back-lighting, 85 center-back, and 86 center-front. With regard to subjects there are 867 single-person, 56 multi-person, 177 body-part, and 60 mecha.

Download models and ShadeSketchDataset HERE then unzip into ShadeSketchDataset folder. Run the following to get data.npy:

python ./utils.py

Gallery

Community Applications

Unofficial Demo in Japanese

Draftify

License

Pre-trained models and datasets are available under Creative Commons BY-NC 4.0 license. You can use or redistribute the models and datasets only for non-commercial purposes.

Citation

If you use our work or dataset, please cite our paper.

@InProceedings{Zheng2020LSHS,
title = {Learning to Shadow Hand-drawn Sketches},
author = {Zheng, Qingyuan and Li, Zhuoru and Bargteil, Adam},
booktitle = {Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2020}
}

Credits

  • Sketches were collected from nico-opendata and web. animation sketches (c) Yoshinari Yo.

  • For training line normalization model, please see LineNormalizer.

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].