Need help with Unpaired-Portrait-Drawing?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

yiranran
137 Stars 26 Forks 8 Commits 3 Opened issues

Description

Code for Unpaired Portrait Drawing Generation via Asymmetric Cycle Mapping (CVPR 2020)

Services available

!
?

Need anything else?

Contributors list

# 87,541
MATLAB
Shell
image-s...
image-g...
7 commits

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

  • Install PyTorch 1.1.0 and torchvision from http://pytorch.org and other dependencies (e.g., visdom and dominate). You can install all the dependencies by
    bash
    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
    bash
    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 testseqstyle.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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.