Skip to content

Commit ddb377b

Browse files
committed
update readme
TensorFlow 2 is the default version now
1 parent 798fab9 commit ddb377b

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

README.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
# Head pose estimation
22

3-
This repo shows how to estimate human head pose from videos using TensorFlow and OpenCV.
3+
Real time human head pose estimation using TensorFlow and OpenCV.
44

55
![demo](doc/demo.gif)
66
![demo](doc/demo1.gif)
77

88
## Getting Started
99

10-
The following packages are required:
10+
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
1111

12-
- TensorFlow 2.2
13-
- OpenCV 4.3
14-
- Python 3.6
12+
### Prerequisites
1513

16-
The code is tested in Ubuntu 18.04.
14+
![TensorFlow](https://img.shields.io/badge/TensorFlow-v2.4-brightgreen)
15+
![OpenCV](https://img.shields.io/badge/OpenCV-v4.5-brightgreen)
16+
![Numpy](https://img.shields.io/badge/Numpy-v1.19-brightgreen)
1717

18-
## Installing
18+
The code was tested on Ubuntu 20.04.
1919

20-
This repository comes with a pre-trained model for facial landmark detection. Just git clone then you are good to go.
20+
### Installing
21+
22+
This repository already provided a pre-trained model for facial landmarks detection. Just git clone then you are good to go.
2123

2224
```bash
2325
# From your favorite development directory:
@@ -26,19 +28,19 @@ git clone https://github.com/yinguobing/head-pose-estimation.git
2628

2729
## Running
2830

29-
A video file or a webcam index should be assigned through arguments. If no source provided, the default webcam will be used.
31+
A video file or a webcam index should be assigned through arguments. If no source provided, the built in webcam will be used by default.
3032

31-
### For video file
33+
### With video file
3234

33-
For any video format that OpenCV supported (`mp4`, `avi` etc.):
35+
For any video format that OpenCV supports (`mp4`, `avi` etc.):
3436

3537
```bash
3638
python3 estimate_head_pose.py --video /path/to/video.mp4
3739
```
3840

39-
### For webcam
41+
### With webcam
4042

41-
The webcam index should be assigned:
43+
The webcam index should be provided:
4244

4345
```bash
4446
python3 estimate_head_pose.py --cam 0
@@ -48,17 +50,18 @@ python3 estimate_head_pose.py --cam 0
4850

4951
There are three major steps:
5052

51-
1. Face detection. A face detector is adopted to provide a face box containing a human face. Then the face box is expanded and transformed to a square to suit the needs of later steps.
53+
1. Face detection. A face detector is introduced to provide a face bounding box containing a human face. Then the face box is expanded and transformed to a square to suit the needs of later steps.
5254

53-
2. Facial landmark detection. A custom trained facial landmark detector based on TensorFlow is responsible for output 68 facial landmarks.
55+
2. Facial landmark detection. A pre-trained deep learning model take the face image as input and output 68 facial landmarks.
5456

55-
3. Pose estimation. Once we got the 68 facial landmarks, a mutual PnP algorithms is adopted to calculate the pose.
57+
3. Pose estimation. After getting 68 facial landmarks, the pose could be calculated by a mutual PnP algorithm.
5658

57-
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.
59+
The marks are detected frame by frame that makes the pose unstable. A Kalman filter is used to solve this problem, you can draw the original pose to observe the difference.
5860

5961
## Retrain the model
6062

61-
To reproduce the facial landmark detection model, you can refer to this [series](https://yinguobing.com/deeplearning/) of posts(in Chinese only). And the training code is also open sourced: https://github.com/yinguobing/cnn-facial-landmark
63+
To retrain the facial landmark detection model please refer to this series of [posts]((https://yinguobing.com/deeplearning/) (in Chinese only). The training code is also open sourced:
64+
https://github.com/yinguobing/cnn-facial-landmark
6265

6366

6467
## License

0 commit comments

Comments
 (0)