Giter Site home page Giter Site logo

frankycao / decompose-distill-beautygan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jian-danai/decompose-distill-beautygan

0.0 1.0 0.0 1.51 MB

Official implementation of VCIP 2020 paper: "Compressing Facial Makeup Transfer Networks by Collaborative Distillation and Kernel Decomposition". In this project, we compressed facial makeup transfer networks (BeautyGAN) with collaborative distillation and kernel decomposition.

Home Page: https://jian-danai.github.io/

License: MIT License

Python 100.00%

decompose-distill-beautygan's Introduction

Introduction

Official implementation of VCIP 2020 paper (Oral): "Compressing Facial Makeup Transfer Networks by Collaborative Distillation and Kernel Decomposition". In this project, we compressed facial makeup transfer networks (BeautyGAN) with collaborative distillation and kernel decomposition.

See our framework below.

If there are bugs, pls open an issue.

Dependencies

  • Python3 libs in requirements.txt, we recommend you to create and activate a virtual environment using Anaconda before install the packages. According to our experience, the versions are not strictly constrained. If you have any questions about the versions of the libs, pls open an issue.
  • The code is tested on Ubuntu16.04

Training

  • Download shape_predictor_68_face_landmarks.dat from: http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 , and uncompress it.

  • Download pretrained vgg16 model from https://download.pytorch.org/models/vgg16-397923af.pth.

  • We recommend you to create and activate a virtual environment using Anaconda

    • for python 3.*
    conda create -n py3 python==3.*
    source activate py3
  • Install python dependencies using command:

    pip install -r requirements.txt
  • Download the MT dataset and divide the training and testing image. Thanks to the authors of the BeautyGAN, you can reference the data preparing process from https://github.com/wtjiang98/BeautyGAN_pytorch .

  • We recommend you to organize your own directories for code, data , models and logs storage. So pls modify the code based on your directories and path.

  • We only provide the single-GPU mode code for training. However, we recommend you to use multi-GPU mode to train the model with a higher speed. You can refer to the official documents of Pytorch for further info.

  • Run the beauty_res9.py to train an only decomposed model and run the beauty_gpu0.py based on the trained model of beauty_res9 (i.e., the teacher network) to train the student network.

    python MobileNet_BeautyGAN/beauty_res9.py
    python Distill_BeautyGAN/beauty_gpu0.py

We would add more details about the training and testing process if needed...If you have any questions, pls open an issue.

Results

Voting Results

Decompose only vs Decompose+Distill

Acknowledgment

This work was done in VipaiLab, you may find some useful code from the lab.

We refered to the following implementations: Collaborative-Distillation, BeautyGAN_pytorch.

Reference

Please cite this in your publication if our work helps your research.

@inproceedings{yang2020compressing,
  title={Compressing Facial Makeup Transfer Networks by Collaborative Distillation and Kernel Decomposition},
  author={Yang, Bianjiang and Hui, Zi and Hu, Haoji and Hu, Xinyi and Yu, Lu},
  booktitle={2020 IEEE International Conference on Visual Communications and Image Processing (VCIP)},
  pages={46--49},
  year={2020},
  organization={IEEE}
}

If you have any advice, you may access my homepage or directly contact me at [email protected] , thanks.

decompose-distill-beautygan's People

Contributors

jian-danai avatar

Watchers

James Cloos 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.