mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

Issue with Object Placement on Face in tasks-vision.facelandmarker web

Open soroushmadani opened this issue 1 year ago • 1 comments

I'm writing to report an issue I've encountered while working with the tasks-vision.facelandmarker in MediaPipe. I am trying to overlay virtual glasses on a user's face, and while everything works perfectly when the face is in the center of the camera view, I'm experiencing problems with the glasses' rotation when the face moves to the sides.

I suspect that the issue might be related to the facialTransformationMatrixes or some configuration settings, possibly with the perspective camera. To illustrate this problem, I've prepared a set of images that demonstrate the glasses' misalignment issue. You can view these images here: Screenshot 1402-06-17 at 12 58 20 Screenshot 1402-06-17 at 12 57 43

Additionally, I noticed that this problem also exists in your example on CodePen, which can be accessed via the following URL: https://codepen.io/mediapipe-preview/pen/oNPKmEy. Screenshot 1402-06-17 at 12 55 04 I wanted to note that I have made a modification to the scale of the avatar in the CodePen example, changing it from 40 to 20. This adjustment is intended to help clearly showcase the difference in angles between my face and the object.

Could you please provide guidance on how I can address this issue? I'm keen to ensure that the glasses' placement remains accurate, even when the user's face is not in the center of the camera view.

Thank you for your time and assistance in resolving this matter. I appreciate your dedication to the MediaPipe project and look forward to your guidance on resolving this issue.

soroushmadani avatar Sep 08 '23 09:09 soroushmadani