TadasBaltrusaitis / OpenFace

OpenFace – a state-of-the art tool intended for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation.
Other
6.94k stars 1.85k forks source link

Face-centric pose vector? #883

Open watercatsnake opened 4 years ago

watercatsnake commented 4 years ago

I'd like to generate pose vectors with respect to the head (i.e., without translation) to label images by whether the person is looking to their left, right, or straight ahead (or up or down). However, the code outputs pose as RPY relative to the camera, not the person. Is there a simple equation or matrix I can apply to convert the output of the pose (Tx,Ty,Tz,Rx,Ry,Rz) to get a head-centric pose estimate?

Apologies if the answer is straightforward, but grad school was 10 years ago and that part of my brain has grown quite rusty.

TadasBaltrusaitis commented 4 years ago

What mean head-centric pose? The pose represents orientation of the head. Do you mean the pose of head with respect to the shoulders?

watercatsnake commented 4 years ago

Sorry - pose of head with respect to world coordinates. I'm trying to extract the blue vectors in this image, but I believe the code is returning the angle between those vectors and the camera: https://imgur.com/a/EbItbpw

TadasBaltrusaitis commented 4 years ago

The pose is already in world coordinate space. There is a call to convert them to the angle between camera and head pose, but by default world coordinates are returned. There may be an accuracy issue, especially for highly off-center-axis faces and when the camera intrinsic parameters are not accurate.