Skip to content

Latest commit

 

History

History
 
 

psgan

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PSGAN : Pose and Expression Robust Spatial-Aware GAN for Customizable Makeup Transfer

input

  • input image (1x3x256x256)

  • style image (1x3x256x256)

(These images from https://github.com/wtjiang98/PSGAN/tree/master/assets/images)

output (1x3x256x256)

usage

Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.

For the sample image,

$ python3 psgan.py

If you want to specify the input image, put the image path after the --input option.
Style image can be specified with the --reference_dir option.
You can use --savepath option to change the name of the output file to save.

$ python3 psgan.py --input IMAGE_PATH --reference_dir STYLE_DIRECTORY_PATH --savepath SAVE_IMAGE_PATH

By adding the --video option, you can input the video and convert it by the style image. If you pass 0 as an argument to VIDEO_PATH, you can use the webcam input instead of the video file.

$ python3 psgan.py --video VIDEO_PATH --style STYLE_IMAGE_PATH

By adding the --use_dlib option, you can use original version of face and landmark detection.

Reference

PSGAN : Pose and Expression Robust Spatial-Aware GAN for Customizable Makeup Transfer

Framework

PyTorch

Model Format

ONNX opset = 11

Netron