Skip to content

Commit 5ae8671

Browse files
authored
Update readme.
1 parent 1e66826 commit 5ae8671

File tree

1 file changed

+41
-11
lines changed

1 file changed

+41
-11
lines changed

README.md

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,37 @@ This repo shows how to estimate human head pose from videos using TensorFlow and
55
![demo](https://github.com/yinguobing/head-pose-estimation/raw/master/demo.gif)
66
![demo](https://github.com/yinguobing/head-pose-estimation/raw/master/demo1.gif)
77

8-
## Dependence
9-
- TensorFlow 1.4
10-
- OpenCV 3.3
11-
- Python 3
8+
## Getting Started
9+
10+
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
11+
12+
### Prerequisites
13+
14+
- TensorFlow 1.4. It seems v1.12 also works.
15+
- OpenCV 3.3 or higher.
16+
- Python 3.5
1217

1318
The code is tested under Ubuntu 16.04.
1419

20+
### Installing
21+
22+
This repository comes with a pre-trained model for facial landmark detection. Just git clone than you are good to go.
23+
24+
```bash
25+
# From the directory where you want to put this project:
26+
git clone https://github.com/yinguobing/head-pose-estimation.git
27+
```
28+
29+
### Running
30+
The entrance file is `estimate_head_pose.py`. This will use your usb camera as the video source for demonstration.
31+
32+
```bash
33+
# From the project directory, run:
34+
python3 estimate_head_pose.py
35+
```
36+
37+
You can change the video source to any video file that OpenCV supports.
38+
1539
## How it works
1640

1741
There are three major steps:
@@ -22,15 +46,14 @@ There are three major steps:
2246

2347
3. Pose estimation. Once we got the 68 facial landmarks, a mutual PnP algorithms is adopted to calculate the pose.
2448

25-
## Miscellaneous
26-
- The marks is detected frame by frame, which result in small variance between adjacent frames. This makes the pose unstaible. A Kalman filter is used to solve this problem, you can draw the original pose to observe the difference.
49+
The marks is detected frame by frame, which result in small variance between adjacent frames. This makes the pose unstable. A Kalman filter is used to solve this problem, you can draw the original pose to observe the difference.
2750

28-
- The 3D model of face comes from OpenFace, you can find the original file [here](https://github.com/TadasBaltrusaitis/OpenFace/blob/master/lib/local/LandmarkDetector/model/pdms/In-the-wild_aligned_PDM_68.txt).
29-
30-
- The build in face detector comes from OpenCV. https://github.com/opencv/opencv/tree/master/samples/dnn/face_detector
3151

3252
## License
33-
The code is licensed under the MIT license. However, the pre-trained TensorFlow model file is trained with various public data sets which have their own licenses. Please refer to them before using this code.
53+
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
54+
55+
## Acknowledgments
56+
The pre-trained TensorFlow model file is trained with various public data sets which have their own licenses. Please refer to them before using this code.
3457

3558
- 300-W: https://ibug.doc.ic.ac.uk/resources/300-W/
3659
- 300-VW: https://ibug.doc.ic.ac.uk/resources/300-VW/
@@ -39,4 +62,11 @@ The code is licensed under the MIT license. However, the pre-trained TensorFlow
3962
- AFW: https://www.ics.uci.edu/~xzhu/face/
4063
- IBUG: https://ibug.doc.ic.ac.uk/resources/facial-point-annotations/
4164

42-
(Currently we are trying to empower embeded devices to be more powerful with deep learning, please get in touch if you are interested and would like to join us.)
65+
The 3D model of face comes from OpenFace, you can find the original file [here](https://github.com/TadasBaltrusaitis/OpenFace/blob/master/lib/local/LandmarkDetector/model/pdms/In-the-wild_aligned_PDM_68.txt).
66+
67+
The build in face detector comes from OpenCV. https://github.com/opencv/opencv/tree/master/samples/dnn/face_detector
68+
69+
To reproduce the facial landmark detection model, you can refer to this series of posts(in Chinese only).
70+
71+
## Finally
72+
If you are interested in Deep Learning and happened to be seeking for a job opportunity, feel free to get in touch.

0 commit comments

Comments
 (0)