Skip to content

A re-implementation of BeautyGAN: Instance-level Facial Makeup Transfer with Deep Generative Adversarial Network (ACM MM'18)

License

Notifications You must be signed in to change notification settings

thaoshibe/BeautyGAN-PyTorch-reimplementation

Repository files navigation

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:

  • Dataloaders
  • Identities Loss (VGG)
  • Add Tensorboard

🌿 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:

  • Via pip: pip install -r requirements.txt
  • Via conda: conda env create -f environment.yml (then conda activate beautygan)

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/

  • For Tensorboard: tensorboard --logdir runs, then open http://localhost:6006/

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 🙏🙏🙏

About

A re-implementation of BeautyGAN: Instance-level Facial Makeup Transfer with Deep Generative Adversarial Network (ACM MM'18)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages