Git Product home page Git Product logo

unpaired-portrait-drawing's Introduction

Unpaired Portrait Drawing Generation via Asymmetric Cycle Mapping

We provide PyTorch implementations for our CVPR 2020 paper "Unpaired Portrait Drawing Generation via Asymmetric Cycle Mapping".

This project generates artistic portrait drawings from face photos using a GAN-based model.

Our Proposed Framework

Sample Results

From left to right: input, output(style1), output(style2), output(style3)

Citation

If you use this code for your research, please cite our paper.

paper, suppl.

@inproceedings{YiLLR20,
  title     = {Unpaired Portrait Drawing Generation via Asymmetric Cycle Mapping},
  author    = {Yi, Ran and Liu, Yong-Jin and Lai, Yu-Kun and Rosin, Paul L},
  booktitle = {{IEEE} Conference on Computer Vision and Pattern Recognition (CVPR '20)},
  year      = {2020}
}

Prerequisites

  • Linux or macOS
  • Python 3
  • CPU or NVIDIA GPU + CUDA CuDNN

Installation

pip install -r requirements.txt

Apply a Pre-trained Model

  • Download a pre-trained model from BaiduYun(extract code:c9h7) or GoogleDrive and put it in checkpoints/pretrained.

  • Then generate artistic portrait drawings for example photos in examples using

python test_seq_style.py

The test results will be saved to a html file here: ./results/pretrained/test_200/indexstylex-x-x.html.

  • You could also test on your photos. The photos need to be square since the program will load it and resized as 512x512. An optional preprocess is here. Modify the 5th line in test_seq_style.py to your test folder and run the above command again.

You can contact email [email protected] for any questions.

Colab

A colab demo is here.

Acknowledgments

Our code is inspired by pytorch-CycleGAN-and-pix2pix.

unpaired-portrait-drawing's People

Contributors

yiranran avatar

Watchers

 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.