thohemp / 6DRepNet

Official Pytorch implementation of 6DRepNet: 6D Rotation representation for unconstrained head pose estimation.
MIT License
550 stars 72 forks source link

Query regarding face pose axis visualisation #21

Open shubhamwagh opened 2 years ago

shubhamwagh commented 2 years ago

I see that to construct rotation matrix(R) from yaw, pitch and roll angle values, you use zyx order i.e Rz Ry Rx, where Rz is rotation about z-axis, Ry is rotation about the y-axis, and Rx is rotation about the x-axis.

But for visualisation, it looks like the order you use is xyz i.e Rx Ry Rz and then use column vectors of this resulting matrix as axis coordinates (https://github.com/thohemp/6DRepNet/blob/master/utils.py#L54). May I know why this is done? Am I missing something?

Thanks.

thohemp commented 2 years ago

The order of the rotation matrix is actually XYZ: https://github.com/thohemp/6DRepNet/blob/master/utils.py#L207

chwoong commented 2 years ago

Dear @thohemp Thank you very much for providing a great demo :) It was very helpful.

https://github.com/thohemp/6DRepNet/blob/master/utils.py#L207 I think you got the rotation matrix using pitch-yaw-roll order. However, https://github.com/thohemp/6DRepNet/blob/master/utils.py#L54 It looks like roll-yaw-pitch order. (see how x3 and y3 are defined. They are independent on roll).

Did I think something wrong? (@shubhamwagh) Thank you.

shubhamwagh commented 2 years ago

@chwoong yes exactly.