thaoshibe / BeautyGAN-PyTorch-reimplementation

A re-implementation of BeautyGAN: Instance-level Facial Makeup Transfer with Deep Generative Adversarial Network (ACM MM'18)
MIT License
76 stars 16 forks source link
color-matching computer-vision computervision deep-learning gan makeup-transfer pytorch

BeautyGAN

BeautyGAN: Instance-level Facial Makeup Transfer with Deep Generative Adversarial Network

intro.png
This image is from BeautyGAN

This is a modification of Offical Pytorch code for BeautyGAN. The main differences are:

🌿 If you have trouble running this code, feel free to send me an issue. I'll try my best to help you πŸ‘.

NOTE:: I got serveral checkpoint in Google Drive. The results are not good as stated in the main paper, but check it if you like.

For the best results, I recommend original tensorflow pre-trained model


Requirements

First, clone this repo:

git clone https://github.com/thaoshibe/BeautyGAN-pytorch-reimplementation.git

&

cd BeautyGAN-pytorch-reimplementation

Install all required python packages:


Datasets

Please download the Makeup Transfer Dataset.

Training Code

python train.py --data_path /path/to/dataset

For example: I downloaded Makeup Transfer Dataset to /home/ubuntu/makeup_dataset/. So the command will be python train.py --data_path /home/ubuntu/makeup_dataset/


Results Snapshot
result.png
Results at epoch 80. From left to right: Original Image, Makeup Reference, Result
Tensorboard Snapshot

Tensorboard captured at epoch 0. The results are unpleasant at this time. Don't worry πŸ”₯. To get the final model, I trained the model until epoch 200 (about ONE WEEEK in RTX 1080Ti)

tensorboard_loss.png
Tensorboard Loss
tensorboard_images.png
Tensorboard Image. First rows are fake images (results). Second are original images (inputs). Third are recycle images (reconstructed images)

Acknowledgement

This code is heavily based on BeautyGAN - Offical Pytorch Implementation. Thanks wtjiang98 so much to make his work available πŸ™πŸ™πŸ™