You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
+
15
39
## How it works
16
40
17
41
There are three major steps:
@@ -22,17 +46,30 @@ There are three major steps:
22
46
23
47
3. Pose estimation. Once we got the 68 facial landmarks, a mutual PnP algorithms is adopted to calculate the pose.
24
48
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.
50
+
51
+
## Retrain the model
52
+
53
+
To reproduce the facial landmark detection model, you can refer to this [series](https://yinguobing.com/deeplearning/) of posts(in Chinese only).
27
54
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
55
30
56
## License
31
-
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.
57
+
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
58
+
59
+
## Acknowledgments
60
+
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.
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).
0 commit comments