yinguobing / head-pose-estimation

Realtime human head pose estimation with ONNXRuntime and OpenCV.
MIT License
1.24k stars 288 forks source link

not an issue. Need help in translating the angles. #36

Closed 0xinit closed 4 years ago

0xinit commented 4 years ago

Hi,

Thanks to your model I was able to get angles and head pose of the person in the videos. I was also able to get pitch, yaw, and roll. For example: pitch: -5.14, yaw: -0.35, roll: 2.94 However I am not able to understand this. How do we define how much pitch makes the face look down or how much roll makes the person's face tilt to left or right? The numbers above dont make sense to begin with because but I used your code from pts_tool.py to get pitch, yaw and roll.

Can you please clarify a bit?

Thanks.

yinguobing commented 4 years ago

The OpenCV documentation had provided a really good explanation of this topic here: https://docs.opencv.org/4.4.0/d9/d0c/group__calib3d.html

Pay attention to the chapter: Detailed Description

0xinit commented 4 years ago

Oh okay. I'll read it. Also, Can you please explain why you have divided pitch, roll, and yaw by 180 here

0xinit commented 4 years ago

Also, what research paper have you used? I wanted to go through that and understand how the values of pitch and roll work if that makes sense.

yinguobing commented 4 years ago

The angles are normalized before saving. What do you mean "how the values of pitch and roll work"? I don’t get it.

0xinit commented 4 years ago

"How the values of pitch and roll work" --- Let me explain my question. I mean to say when do we consider a head to make a significant movement?

For example- Let say, we get value of roll to be 5 degrees at a time "t." Now is that 5 degrees enough to make a statement saying that head nodded towards the left side? If the value of roll is 20 degrees then it's a significant difference and we can consider that head tilted to the left, but should insignificant angles like 5-10 degrees should mean the same?

yinguobing commented 4 years ago

I think a lot of experiments are required before we make this decision. Those angles are not very accurate as they are rough estimation from the face landmarks and a general 3D model. Higher value means larger pose, but it is up to the application to set the threshold of these values. Also, nodding, is a series of head movement and brings in another variable time. I currently do not have a good idea of how to define nod. Sorry about that.

0xinit commented 4 years ago

No problem! Thanks a lot for replying!

youjin-c commented 3 years ago

The angles are normalized before saving. What do you mean "how the values of pitch and roll work"? I don’t get it.

Hello @yinguobing,

does that mean actual degrees are the ones before normalized?

yinguobing commented 3 years ago

@youjinChung Yes, if I still remember it right.