Home

Awesome

Photo-Sketching: Inferring Contour Drawings from Images

<p align="center"><img alt="Teaser" src="doc/teaser.jpg"></p>

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

It supports a folder of images as input.

Train & test on our contour drawing dataset

<p align="center"><img alt="File structure" src="doc/file_structure.png"></p>

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.