vitoralbiero / img2pose

The official PyTorch implementation of img2pose: Face Alignment and Detection via 6DoF, Face Pose Estimation - CVPR 2021
Other
588 stars 109 forks source link

Question about changing the focal length #57

Closed dimfot3 closed 2 years ago

dimfot3 commented 2 years ago

Hello, really great work on 6d head pose estimation. I have a question about the focal length. I read previous questions and i am not sure yet for how to use my camera's focal length wihtout retraining and relabelling your network and data. If i use your weights and i find a pose for an image captured from my camera with focal length = f how can i propagate to the real translation and rotation? Is it ok if i use the formula : [R|t]_real = K_real^(-1).K_t.[R|t]_temp, where [R|t]_real is the real transformation that i am looking for, K_real is the real camera matrix and K_t and [R|t] are the temporary camera matrix and transformation matrix that are used and found in your network? And also in what measurement units, will be the output translation? Thank you in advance for the help!

vitoralbiero commented 2 years ago

Hello @dimfot3,

Thank you for your interest in our work! The translation units are arbitrary measurements relative to the 3D model, so there is not a simple way to convert them to understandable metrics.

Hope this helps.

dimfot3 commented 2 years ago

The model is normalized to 0-1. If we use dimensions of a mean face and rescale both the model and the translation vector, the projection remains the same. So we could assume that the new translation can be almost true for a mean face.

vitoralbiero commented 2 years ago

Yes, you could try that.