All Projects → yinguobing → Head Pose Estimation

yinguobing / Head Pose Estimation

Licence: mit
Head pose estimation by TensorFlow and OpenCV

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Head Pose Estimation

Intelegent lock
lock mechanism with face recognition and liveness detection
Stars: ✭ 134 (-80.8%)
Mutual labels:  opencv, convolutional-neural-networks
Sign Language
Sign Language Recognition for Deaf People
Stars: ✭ 65 (-90.69%)
Mutual labels:  opencv, convolutional-neural-networks
Person Detection And Tracking
A tensorflow implementation with SSD model for person detection and Kalman Filtering combined for tracking
Stars: ✭ 193 (-72.35%)
Mutual labels:  opencv, convolutional-neural-networks
Deepway
This project is an aid to the blind. Till date there has been no technological advancement in the way the blind navigate. So I have used deep learning particularly convolutional neural networks so that they can navigate through the streets.
Stars: ✭ 118 (-83.09%)
Mutual labels:  opencv, convolutional-neural-networks
Abnormal event detection
Abnormal Event Detection in Videos using SpatioTemporal AutoEncoder
Stars: ✭ 139 (-80.09%)
Mutual labels:  opencv, convolutional-neural-networks
Sign Language Interpreter Using Deep Learning
A sign language interpreter using live video feed from the camera.
Stars: ✭ 157 (-77.51%)
Mutual labels:  opencv, convolutional-neural-networks
Deeppicar
Deep Learning Autonomous Car based on Raspberry Pi, SunFounder PiCar-V Kit, TensorFlow, and Google's EdgeTPU Co-Processor
Stars: ✭ 242 (-65.33%)
Mutual labels:  opencv, convolutional-neural-networks
Emotion Recognition
Real time emotion recognition
Stars: ✭ 624 (-10.6%)
Mutual labels:  convolutional-neural-networks
Pytorch Cnn Finetune
Fine-tune pretrained Convolutional Neural Networks with PyTorch
Stars: ✭ 653 (-6.45%)
Mutual labels:  convolutional-neural-networks
Ofxcv
Alternative approach to interfacing with OpenCv from openFrameworks.
Stars: ✭ 614 (-12.03%)
Mutual labels:  opencv
Dll
Fast Deep Learning Library (DLL) for C++ (ANNs, CNNs, RBMs, DBNs...)
Stars: ✭ 605 (-13.32%)
Mutual labels:  convolutional-neural-networks
Opencv
OpenCV projects: Face Recognition, Machine Learning, Colormaps, Local Binary Patterns, Examples...
Stars: ✭ 624 (-10.6%)
Mutual labels:  opencv
Makeup
让你的“女神”逆袭,代码撸彩妆(画妆)
Stars: ✭ 655 (-6.16%)
Mutual labels:  opencv
Cvui
A (very) simple UI lib built on top of OpenCV drawing primitives
Stars: ✭ 619 (-11.32%)
Mutual labels:  opencv
Captainblackboard
船长关于机器学习、计算机视觉和工程技术的总结和分享
Stars: ✭ 693 (-0.72%)
Mutual labels:  convolutional-neural-networks
Faceswap
Real-time FaceSwap application built with OpenCV and dlib
Stars: ✭ 611 (-12.46%)
Mutual labels:  opencv
3d Convolutional Speaker Recognition
🔈 Deep Learning & 3D Convolutional Neural Networks for Speaker Verification
Stars: ✭ 697 (-0.14%)
Mutual labels:  convolutional-neural-networks
Ufldl tutorial
Stanford Unsupervised Feature Learning and Deep Learning Tutorial
Stars: ✭ 689 (-1.29%)
Mutual labels:  convolutional-neural-networks
Tensorflow 101
TensorFlow 101: Introduction to Deep Learning for Python Within TensorFlow
Stars: ✭ 642 (-8.02%)
Mutual labels:  convolutional-neural-networks
Mvision
机器人视觉 移动机器人 VS-SLAM ORB-SLAM2 深度学习目标检测 yolov3 行为检测 opencv PCL 机器学习 无人驾驶
Stars: ✭ 6,140 (+779.66%)
Mutual labels:  opencv

Head pose estimation

Real time human head pose estimation using TensorFlow and OpenCV.

demo demo

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

TensorFlow OpenCV Numpy

The code was tested on Ubuntu 20.04.

Installing

This repository already provided a pre-trained model for facial landmarks detection. Just git clone then you are good to go.

# From your favorite development directory:
git clone https://github.com/yinguobing/head-pose-estimation.git

Running

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.

With video file

For any video format that OpenCV supports (mp4, avi etc.):

python3 estimate_head_pose.py --video /path/to/video.mp4

With webcam

The webcam index should be provided:

python3 estimate_head_pose.py --cam 0

How it works

There are three major steps:

  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.

  2. Facial landmark detection. A pre-trained deep learning model take the face image as input and output 68 facial landmarks.

  3. Pose estimation. After getting 68 facial landmarks, the pose could be calculated by a mutual PnP algorithm.

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.

Retrain the model

To retrain the facial landmark detection model please refer to this series of posts (in Chinese only). The training code is also open sourced: https://github.com/yinguobing/cnn-facial-landmark

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Authors

Yin Guobing (尹国冰) - yinguobing

Acknowledgments

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.

The build in face detector comes from OpenCV. https://github.com/opencv/opencv/tree/master/samples/dnn/face_detector

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].