Skip to content

Latest commit

 

History

54 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About headpose

Process camera feed for head pose estimation is a Python application for computer vision live face parameterization

Using dlib's face landmark predictor, I added my implementation of a real-time by building a graphics pipeline to support the 2D to 3D head pose estimation method built by Satya Mallick in the referenced code below.


Referenced Code

Dependencies

You need to have Python 2.6+ as a minimum and:

Structure

python/ the code.

models/ contains the models used in this example we use Facial Landmark detection 68 points. *one must download shape_detector_68_facial_landmarks.dat because it is too large a file to host here.

media/ contains images and video.

Installation

Open a terminal in the headpose directory and run (with sudo if needed on your system):

pip install -r requirements.txt

Now you should have installed the necessary packages

You still need to download dlib model file: "shape_predictor_68_face_landmarks.dat"

This is a location where that file is hosted: https://github.com/AKSHAYUBHAT/TensorFace/blob/master/openface/models/dlib/shape_predictor_68_face_landmarks.dat

Put this model file "shape_predictor_68_face_landmarks.dat" located in YOUR_MODEL_DOWNLOAD_PATH into the model folder headpose/models

cp YOUR_MODEL_DOWNLOAD_PATH/shape_predictor_68_face_landmarks.dat headpose/models/shape_predictor_68_face_landmarks.dat

Give privilages to run the shell script to start application

chmod +x run.sh

Then run the shell script

./run.sh

in your Python session or script. Try one of the sample code examples to check that the installation works.

For good resources on these topics see:

Detecting face landmarks: Adrian Rosebrock implementation of dlib's shape_predictor's for face landmark detection *Face Landmark Detection

Pose estimation: Satya Mallick's implementation of OpenCV's PnP function *Pose Estimation

Using this and this to get this information

and this to take that information which would produce this output.

I wanted to write a graphics pipeline that would produce this in th I did this

License

All code in this project is provided as open source under the MIT license


-Ross Mauck

About

Process camera feed for real-time face based pose estimation

Resources

Stars

18 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages