GithubHelp home page GithubHelp logo

ningyu1991 / im2pencil Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yijunmaverick/im2pencil

0.0 3.0 0.0 49.07 MB

The source code of CVPR19 'Im2Pencil: Controllable Pencil Illustration from Photographs'.

License: MIT License

MATLAB 46.59% C++ 8.82% C 1.96% HTML 41.50% CSS 0.06% Python 1.06% Shell 0.02%

im2pencil's Introduction

Im2Pencil

Pytorch implementation of our CVPR19 paper on controllable pencil illustration from photographs. More results and comparisons are shown here.

A line input (left) and two pencil outline results (middle: clean, right: rough)

A photo input (left) and four pencil shading results (right: [hatching, crosshatching; blending, stippling])

Getting started

git clone https://github.com/Yijunmaverick/Im2Pencil
cd Im2Pencil

Preparation

  • Download the pretrained models:
sh pretrained_models/download_models.sh
  • Extract the outline and tone image from the input photo (in MATLAB):
cd extract_edge_tone
Im2Pencil_get_edge_tone.m

Testing

  • Test with different outline and shading styles:
python test.py  --outline_style 1  --shading_style 1

Outline style: 0 for rough and 1 for clean

Shading style: 0, 1, 2, 3 for hatching, crosshatching, stippling, and blending respectively

For other controllable parameters, check options/test_options.py

Citation

@inproceedings{Im2Pencil-CVPR-2019,
    author = {Li, Yijun and Fang, Chen and Hertzmann, Aaron and Shechtman, Eli and Yang, Ming-Hsuan},
    title = {Im2Pencil: Controllable Pencil Illustration from Photographs},
    booktitle = {IEEE Conference on Computer Vision and Pattern Recognition},
    year = {2019}
}

Acknowledgement

  • We express gratitudes to the great work XDoG and Pix2Pix as we benefit a lot from both their paper and code.

im2pencil's People

Contributors

yijunmaverick avatar

Watchers

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