Giter Club home page Giter Club logo

beautygan-pytorch-reimplementation's Introduction

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 ๐Ÿ™๐Ÿ™๐Ÿ™

beautygan-pytorch-reimplementation's People

Contributors

thaoshibe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.