Skip to content

kmribti/attention-tracker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attention Tracker

Face tracking for head pose estimation

Head pose estimation

This library (libhead_pose_estimation.so) performs 3D head pose estimation based on the fantastic dlib face detector and a bit of OpenCV's solvePnP magic (it uses adult male anthropometric data to match a real 3D head to the projected image).

The library returns a 4x4 transformation matrix.

It supports detection and tracking of multiple faces at the same time, and runs on-line, but it does not feature face identification.

Installation

Note: The library has only been tested on Linux. We can only provide limited support for other operating systems!

Pre-requisites

You need to download and extract Dlib somewhere. This application has been tested with dlib-18.16.

Important: due to a bug in dlib, you must manually modify dlib's CMakeLists.txt before compiling: open it ($DLIB_ROOT/dlib/CMakelists.txt) and add add_definitions(-fPIC) near the top (around line 20).

Installation

The library uses a standard CMake workflow:

$ mkdir build && cd build
$ cmake -DDLIB_PATH=<path to dlib> ..
$ make

Note that the first time you compile the project, dlib will compile as well. It takes a few minutes. This won't happen the next times.

Run head_pose_test ../share/shape_predictor_68_face_landmarks.dat to test the library. You should get something very similar to the picture above.

Finally, to install the library:

$ make install

ROS support

The ROS wrapper provides a convenient node that exposes each detected face as a TF frame.

Enable the compilation of the ROS wrapper with:

cmake -DWITH_ROS=ON

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 80.7%
  • CMake 11.3%
  • Python 8.0%