Skip to content

Latest commit

 

History

History

elegant

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

EleGANt: Exquisite and Locally Editable GAN for Makeup Transfer

input

  • input image (1x3x361x361)

Input

(These images from https://github.com/Chenyu-Yang-2000/EleGANt/blob/main/assets/images/non-makeup/source_1.png)

  • style image (1x3x361x361)

Reference

(These images from https://github.com/Chenyu-Yang-2000/EleGANt/tree/main/assets/images/makeup/reference_1.png)

output (1x3x361x361)

Output

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 elegant.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 option.
You can use --savepath option to change the name of the output file to save.

$ python3 elegant.py --input IMAGE_PATH --reference STYLE_IMAGE_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 elegant.py --video VIDEO_PATH --reference STYLE_IMAGE_PATH

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

Reference

EleGANt: Exquisite and Locally Editable GAN for Makeup Transfer

Framework

PyTorch = 2.2.0

Model Format

ONNX opset = 16

Netron