/PSGAN

PyTorch code for "PSGAN: Pose and Expression Robust Spatial-Aware GAN for Customizable Makeup Transfer" (CVPR 2020 Oral)

Primary LanguagePython

PSGAN

This project is forked from the official implementation of PSGAN: "PSGAN: Pose and Expression Robust Spatial-Aware GAN for Customizable Makeup Transfer".

I have added GPU inference, multiple-gpu support and optimized training and inference speed.

Checklist

  • more results
  • video demos
  • partial makeup transfer example
  • interpolated makeup transfer example
  • inference on GPU
  • training code

Requirements

The code was tested on Ubuntu 16.04, with Python 3.6 and PyTorch 1.5.

Test

  1. python3 demo.py or python3 demo.py --device cuda for gpu inference.

NOTE: You need dlib gpu support for fully gpu inference.

Train

  1. Download dataset from here.
  2. Check config.py to modify default.data_path to your data path.

More Results

MT-Dataset (frontal face images with neutral expression)

MWild-Dataset (images with different poses and expressions)

Video Makeup Transfer (by simply applying PSGAN on each frame)

Citation

Please consider citing this project in your publications if it helps your research. The following is a BibTeX reference. The BibTeX entry requires the url LaTeX package.

@inproceedings{jiang2019psgan,
  title={PSGAN: Pose and Expression Robust Spatial-Aware GAN for Customizable Makeup Transfer},
  author={Jiang, Wentao and Liu, Si and Gao, Chen and Cao, Jie and He, Ran and Feng, Jiashi and Yan, Shuicheng},
  booktitle={CVPR},
  year={2020}
}

Acknowledge

Some of the codes are built upon face-parsing.PyTorch and BeautyGAN.