Coder Social home page Coder Social logo

facefrontalisation's Introduction

facefrontalisation

This code implements a face frontalisation method given the landmarks This is the python code as a re-implementation of the matlab code from: http://www.openu.ac.il/home/hassner/projects/frontalize/ Tal Hassner, Shai Harel*, Eran Paz* and Roee Enbar, Effective Face Frontalization in Unconstrained Images, IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), Boston, June 2015 The algorithm credit belongs to them.

I implement it as I dislike reading matlab code--you In order to make the code run you need:

  1. compile the dlib python code: http://dlib.net/

  2. download the shape_predictor_68_face_landmarks.dat file from: http://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2

  3. install python dependencies

facefrontalisation's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

facefrontalisation's Issues

Problem when loading pickle file with Python 3.4

Hello Yang,
I got this error when runing the code with Python 3.4:

Traceback (most recent call last):
File "facefrontal.py", line 143, in
fronter = frontalizer('ref3d.pkl')
File "facefrontal.py", line 41, in init
ref = pkl.load(f)
TypeError: 'str' does not support the buffer interface

Could you upload a new version of pickle file ref3d.pkl for Python 3.x. Thank you.

Why does the framework differ when using different image formats?

I don't fully understand why, but when using .png format, the frontalization doesn't work. Nevertheless, when converting the same image with gimp to .jpg, the frontalization works great.

For instance, when using this:

alexemma_004117920_00000105

Throws error name 'det' is not defined, mainly because dlib's face detector doesn't detect any faces and the loop in the main method of facefrontal.py is not executed.

When using the same image in .jpg format:

test

The output is correct.

screenshot from 2017-04-30 09-19-16

Any ideas?

Thanks,
Dani

Sample test image

Hi,

Can you give the instructions to use this code on a sample test image ??
How to generate ref3d.pkl for a new image?

Thanks

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.