head-pose-estimation icon indicating copy to clipboard operation
head-pose-estimation copied to clipboard

Inaccuracy when yaw is over around 80 degrees

Open dl-maxwang opened this issue 6 years ago • 4 comments

The pose estimation seems to work fine in -45-45 degree, however it seems accuracy is keep going down when yaw is over 80 degrees, when yaw is 90 degrees, the estimated yaw is 0...

is this caused by inaccuracy of facial landmark?(I spotted a lot of misplaced landmark in my own test image sets)

dl-maxwang avatar Jan 10 '19 06:01 dl-maxwang

I'm afraid so. The pose is derived from the landmarks. Extreme pose makes it very difficulty to obtain accuracy landmarks.

yinguobing avatar Mar 06 '19 03:03 yinguobing

Hi, @dl-maxwang, I want to know how u can calculate yaw and pitch in this code. thanks

pirate-lofy avatar Apr 25 '20 16:04 pirate-lofy

Hi, @dl-maxwang, I want to know how u can calculate yaw and pitch in this code. thanks

You can find these code in estimate_head_pose.py

which use cv2.solvePnP to calculate rotation vector and transaltion vector. the parameter is:

object_points = all model points # all model points is save in assets/model.txt
image_points = detected face points
camera_matrix = 
             [
               [img_size, 0, camera_center[0]],
               [0, img_size, camera_center[1]],
               [0, 0, 1]
             ]
distCoeffs = np.zeros((4, 1)) #assume no distortion

dl-maxwang avatar Apr 27 '20 06:04 dl-maxwang

sorry, but I'm not that good at these stuff, can u explain more

pirate-lofy avatar Apr 28 '20 22:04 pirate-lofy