Debug head pose estimation with Google Mediapipe

Job ID: 34726953

Budget: $30 – $250 USD

I am using Google Mediapipe facemesh for head pose estimation in still images. I have code that can place facemesh accurately, but it is inconsistent in determining pose. Half of the images the angle (X,Y,Z) is correct, but of of the time it is very wrong.

The head pose estimation code is based off of this video:
https://www.youtube.com/watch?v=-toNMaS4SeQ
https://github.com/niconielsen32/ComputerVision/blob/master/headPoseEstimation.py

The pose estimation works consistently when the image is coming off the webcam, but not when it is from jpgs. I don’t know if there is an error in the rotational vector math, if images function differently than a webcam (something about calibrating the webcam?), or something else.

GOAL: Get the head pose estimation to output correctly.

I have included examples, as well as the code. I will provide a sample set of images to work with. I may have other future requests, but for now, I just need the correct pose angle.
Related categories: Python Face Recognition OpenCV