GithubHelp home page GithubHelp logo

zstarpak / photosketch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mtli/photosketch

0.0 1.0 0.0 208 KB

Code for Photo-Sketching: Inferring Contour Drawings from Images :dog:

Home Page: http://www.cs.cmu.edu/~mengtial/proj/sketch/

License: Other

Python 95.94% Shell 2.02% Batchfile 2.04%

photosketch's Introduction

Photo-Sketching: Inferring Contour Drawings from Images

Teaser

This repo contains the training & testing code for our sketch generator. We also provide a [pre-trained model].

For technical details and the dataset, please refer to the [paper] and the [project page].

Setting up

The code is now updated to use PyTorch 0.4 and runs on Windows, Mac and Linux. For the obsolete version with PyTorch 0.3 (Linux only), please check out the branch pytorch-0.3-obsolete.

Windows users should find the corresponding .cmd files instead of .sh files mentioned below.

One-line installation (with Conda environments)

conda env create -f environment.yml

Then activate the environment (sketch) and you are ready to go!

See here for more information about conda environments.

Manual installation

See environment.yml for a list of dependencies.

Using the pre-trained model

  • Download the pre-trained model
  • Modify the path in scripts/test_pretrained.sh
  • From the repo's root directory, run scripts/test_pretrained.sh

It supports a folder of images as input.

Train & test on our contour drawing dataset

  • Download the images and the rendered sketch from the project page
  • Unzip and organize them into the following structure:

File structure

  • Modify the path in scripts/train.sh and scripts/test.sh
  • From the repo's root directory, run scripts/train.sh to train the model
  • From the repo's root directory, run scripts/test.sh to test on the val set or the test set (specified by the phase flag)

Citation

If you use the code or the data for your research, please cite the paper:

@article{LIPS2019,
  title={Photo-Sketching: Inferring Contour Drawings from Images},
  author={Li, Mengtian and Lin, Zhe and M\v ech, Radom\'ir and and Yumer, Ersin and Ramanan, Deva},
  journal={WACV},
  year={2019}
}

Acknowledgement

This code is based on an old version of pix2pix.

photosketch's People

Contributors

mtli avatar

Watchers

James Cloos 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.