Skip to main content

Purpose

This package offers classes and methods for pose estimation on images. This can be done either with deep learning based facial landmark detection or by detecting ArUco markers.

Installation

Get the latest published version: pip install headpose
or install directly from GitHub: pip install git+https://github.com/OleBialas/headpose.git To use landmark detection you additionally have to install pytorch and torchvision

Example

import cv2
from headpose.detect import PoseEstimator

est = PoseEstimator()  #load the model
# take an image using the webcam (alternatively, you could load an image)
cam = cv2.VideoCapture(0)
for i in range(cv2.CAP_PROP_FRAME_COUNT):
    cam.grab()
ret, image = cam.retrieve()
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cam.release()

est.detect_landmarks(image, plot=True)  # plot the result of landmark detection
roll, pitch, yawn = est.pose_from_image(image)  # estimate the head pose

Sources & Further Reading

This blog post nicely explained the concepts and mathematics behind pose estimation and this tutorial walks through the single steps of detecting facial landmarks with pytorch

Metadata

Release files for headpose 1.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for headpose 1.1.8
File Size Uploaded Provenance Actions
headpose-1.1.8.tar.gz 8.3 kB Without provenance Details for headpose-1.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for headpose 1.1.8
File Interpreter ABI Platform Actions
headpose-1.1.8-py3-none-any.whl Python 3 none any Details for headpose-1.1.8-py3-none-any.whl

Total release size: 153.3 kB

Release files / headpose-1.1.8.tar.gz

Download URL headpose-1.1.8.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e47619e88a6ad6d55cd967f63544b940d860e21a2154233118697babecb2a355
BLAKE2b-256 checksum
How to use checksums
53c4d50d76b8b71d9842ed8cb4af9237f4a73a2a442e49428f171efe6db00da4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / headpose-1.1.8-py3-none-any.whl

Download URL headpose-1.1.8-py3-none-any.whl
Size 145.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68859c9557f4b647ead2651ee7fb66e99c71e5c7b2177dd904be790a73032304
BLAKE2b-256 checksum
How to use checksums
f33689bd1b515a81a046825a424ce5c4f5e1408a86269472b798645d33c10115
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Security for headpose 1.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page