This commit is contained in:
yinguobing 2018-01-26 08:57:21 +08:00
commit 2fcf19c723

View file

@ -1,23 +1,17 @@
# Head pose estimation
Use CNN and OpenCV to estimate head poses.
This repo shows how to estimate human head pose from images using TensorFlow and OpenCV.
![demo](https://github.com/yinguobing/head-pose-estimation/raw/master/demo.gif)
![demo](https://github.com/yinguobing/head-pose-estimation/raw/master/demo1.gif)
## How it works
This repo shows how to detect human head pose from image.
There are three major steps:
There are three major steps in the code, listed below.
1. Face detection. A face detector is adopted to provides a box containing a human face. The box is expanded and transformed to a square to suit the need of later steps.
1. Face detection. I use an face detector in OpenCV which provides a box contains a human face. The box is expanded and transformed to a square to suit the need of later step.
2. Facial landmark detection. In this step, a custom trained facial landmark detector based on TensorFlow is responsible for output 68 facial landmarks from face image of step 1.
2. Facial landmark detection. In this step, a custom trained facial landmark detector based on TensorFlow is responsible for output 68 facial landmarks.
3. Pose estimation. Once we got the 68 facial landmarks, a mutual PnP algorithms is adopted to calculate the pose.
## Other important techniques
A Kalman filter is used to stabilize the facial landmarks.
A optical flow tracker is used to detect head motion, which is useful for setting kalman filter parameters.