Coder Social home page Coder Social logo

s-bei / tp-gan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hrlty/tp-gan

0.0 0.0 0.0 57.22 MB

Official TP-GAN Tensorflow implementation for paper "Beyond Face Rotation: Global and Local Perception GAN for Photorealistic and Identity Preserving Frontal View Synthesis"

Home Page: http://www.andrew.cmu.edu/user/ruih2/

License: Other

Python 95.11% MATLAB 4.89%

tp-gan's Introduction

TP-GAN

Official TP-GAN Tensorflow implementation for the ICCV17 paper "Beyond Face Rotation: Global and Local Perception GAN for Photorealistic and Identity Preserving Frontal View Synthesis" by Huang, Rui and Zhang, Shu and Li, Tianyu and He, Ran.

The goal is to recover a frontal face image of the same person from a single face image under any poses.

Here are some examples from the paper.image

Testing images

Synthesized testing images of all poses, corresponding illumination in Setting 2 (and its cropped input) in MultiPIE can be obtained here Google Drive.

FAQ: Synthesized(not the original) images for other illumination condition and/or training set can be obtained upon request. Unfortunately, I cannot redistribute the original dataset due to copyright. If you would like to access the original MultiPIE dataset, please contact MultiPIE.

Random examples

Here are random examples of 10 testing image pairs for each degree.

15 and 30 degrees:

45 and 60 degrees:

75 and 90 degrees:

Note

It was initially written in Tensorflow 0.12. If you have implemented another version, I'll be happy to reference it here.

This is an initial release of code, which may not be fully tested. Refinement, input data example, pre-trained models, and precomputed testing image features will come later.

The input is cropped with the Matlab script face_db_align_single_custom.m, which accepts 5 keypoints and outputs a cropped image and transformed keypoints.

Some example cropping outputs is shown in folder data-example.

Our 90-degree model only used 45-90 degree images for training. Other models we trained didn't use 90 degree images. 90 degree images' left and right eye patches coincide.

The 5 keypoints can be extracted from off-the-shelf landmark detectors, e.g. 'Zhang et al. Combining Data-driven and Model-driven Methods for Robust Facial Landmark Detection, 2016'. The synthesis performance is similar to using manually labelled keypoints. See released keypoint files below.

We thank Xiang Wu for providing the face feature network. We load it as DeepFace in the code, the weights are from a custom Light-CNN cafeemodel file. Our implementation borrowed code from the dcgan repo.

Update 0.11:

  • Releasing 5 keypoint locations for MultiPIE Session 1-4 dataset. Please download from here. Most of the 60-90 degrees images are labelled manually, others come from MTCNNv2 detector. If you like it, please consider citing our paper.
  • Adding DeepFace168.pickle weights file for Light-CNN. Please note this is an improved version than the one originally used in the experiment.

Citation and Contact

If you like our work or find our code useful, welcome to cite our paper!

Any suggestion and/or comment would be valuable. Please send an email to Rui at [email protected] or other authors.

  @InProceedings{Huang_2017_ICCV,
  author = {Huang, Rui and Zhang, Shu and Li, Tianyu and He, Ran},
  title = {Beyond Face Rotation: Global and Local Perception GAN for Photorealistic and Identity Preserving Frontal View Synthesis},
  booktitle = {The IEEE International Conference on Computer Vision (ICCV)},
  month = {Oct},
  year = {2017}
  }

License

This code is freely available for free non-commercial use, and may be redistributed under the conditions set by the license. Please, see the license for further details. For commercial queries, please contact Rui Huang and Ran He.

tp-gan's People

Contributors

hrlty avatar mountainone 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.