Skip to content

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

Notifications You must be signed in to change notification settings

ainize-bot/Unpaired-Portrait-Drawing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Run on Ainize

Our Proposed Framework

architecture

Sample Results

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

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.

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 75.5%
  • HTML 22.0%
  • CSS 1.0%
  • MATLAB 0.6%
  • JavaScript 0.6%
  • Dockerfile 0.2%
  • Shell 0.1%