Git Product home page Git Product logo

facefit's Introduction

Implementation of Cascaded-Regression based Methods for Facial Feature Points Detection

** I no longer have time to maintain this, feel free to file pull requests with any improvements/fixes. I'll try to review them ASAP. **

This repository contains the implementation of my final individual project at Imperial College London. Its objective was to study and implement the following methods for facial feature point detection ("face alignment"):

  • Face Alignment by Explicit Shape Regression by Cao et al from CVPR 2012 (ESR)
  • One millisecond face alignment with an ensemble of regression trees by Kazemi et al from CVPR 2014 (ERT)
  • Face Alignment at 3000 FPS via Regressing Local Binary Features by Ren et al from CVPR 2014 (LBF)

All three methods (ESR, ERT and LBF) are implemented in in the facefit Python package.

Installation

Install conda.

curl -s https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh | bash

# Create and activate a new conda environment
conda create -n face-alignment python -y
source activate face-alignment

# Install dependencies.
conda install -y -c menpo menpo menpofit menpodetect 
conda install -y matplotlib numpy opencv python=2.7.9=1 pyzmq scikit-learn scipy zlib
apt-get install libhdf5-dev -y
pip install hickle

# Build liblinear.
cd beng/facefit/external/liblinear/python
make

Example usage

Training and testing a model

It is possible to train and test models using the IPython notebooks included in the experiments/ directory. Note that for all three methods, training currently takes at least a couple of hours.

Serialized (hickled) models can be found here: https://www.dropbox.com/s/rsrq37bl4h254f4/models_lfpw_helen.zip?dl=0 All three models are trained on a dataset consiting of training images from a combination of the LFPW and Helen datasets. For more information on usage, consult the notebooks in experiments/.

(Almost) Real-time webcam face fitting

python clients/webcam_fitter.py path_to_hickled_model

e.g.

python clients/webcam_fitter.py models/ert_lfpw_helen.hkl

facefit's People

Contributors

andrejmaris avatar

Watchers

Yukata 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.