Head pose estimation module
Project description
State of art the Head Pose Estimation in Tensorflow2
This repository includes:
-
"WHENet: Real-time Fine-Grained Estimation for Wide Range Head Pose" (BMVC 2020). adapted from the original source code.
-
RetinaFace: Single-stage Dense Face Localisation in the Wild adapted from https://github.com/StanislasBertrand/RetinaFace-tf2.
Install
You can install this repository with pip (requires python>=3.6);
pip install headpose_estimation
pip install git+https://github.com/geekysethi/headpose_estimation
You can also install with the setup.py
With Face Detection
To perform detection you can simple use the following lines:
import cv2
from headpose_estimation import Headpose
headpose = Headpose()
img = cv2.imread("path_to_im.jpg")
detections,image = headpose.run(img)
This will return a list of dictionary which looks like this [{'bbox': [xmin, ymin, xmax, ymax], 'yaw': yaw_value, 'pitch': pitch_value, 'roll': roll_value}
Without Face Detection
To perform detection you can simple use the following lines:
import cv2
from headpose_estimation import Headpose
headpose = Headpose(face_detection=False)
imgcrop = cv2.imread("path_to_im.jpg")
detections,image = headpose.run(imgcrop)
In this case it will return a list of dictionary which looks like this [{'yaw': yaw_value, 'pitch': pitch_value, 'roll': roll_value}
Dependncies
- EfficientNet https://github.com/qubvel/efficientnet
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for headpose_detection-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ae2349882109f0164e340b43cf447cc635149910aad6376f3f8413e450c751b |
|
MD5 | 66395c85325c15509595a972f4ab1429 |
|
BLAKE2b-256 | e19bb0cd1bb5bfc6a5943965e5280818eb34b75525976efa294cf00ee06399c8 |