google-ar / arcore-android-sdk

ARCore SDK for Android Studio
https://developers.google.com/ar
Other
4.91k stars 1.2k forks source link

Off centre face pose accuracy and consistency (Augmented Faces) #1658

Open dylanmenzies opened 1 week ago

dylanmenzies commented 1 week ago

Face center and region pose error increases significantly with distance from the camera field centre. For regions this is immediately obvious, for example the nose in the augmented face demo is pushed out to the sides in landscape mode (see images attached). Objects based on the face mesh and center pose register well across the field however (see images). The region and center pose orientations remain fixed relative to each other, however the mesh is changing in local coordinates (See the remaining images - the mesh is rendered with a fixed pose so the rotation of the mesh can be clearly seen for the off centre images). The mesh change in combination with the center pose produces the global registration, not the centre pose alone.

VERSIONS USED

STEPS TO REPRODUCE THE ISSUE

The errors are always present, and do not require special conditions.

The images are produced from the augmented faces demo, modified to render the canonical_face_texture.png from the sdk, or the nose object. The fixed orientation pose is generated using float[] modelMatrix = { 0,-1f,0,0, 1f,0,0,0, 0,0,1f,0, 0,0,-0.5f,1f };

WORKAROUNDS (IF ANY)

  1. Apply heuristic rotation offsets as a function of face position relative to camera.

  2. Calculate a local pose based on eye and nose mesh vertices, then apply current face pose to get more accurate face pose for region poses and tracking.

ADDITIONAL COMMENTS

The error is frustrating for accurate render of region objects, and also for accurate head tracking with translation, which has good uses besides graphic rendering.

It appears that since face registration is achieved very well, the gross change in the face mesh coordinates could be shifted to the center pose (and to correct the region poses), so that a much more accurate physical head pose is given for non central positions.

Screenshot_20240620-165837 Screenshot_20240620-165927 Screenshot_20240620-170006 Screenshot_20240620-171424 Screenshot_20240620-171449 Screenshot_20240620-171511 Screenshot_20240621-105335 Screenshot_20240621-105352