google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.76k stars 5.18k forks source link

Face Mesh - no z coordinate #1422

Closed LucaJunge closed 3 years ago

LucaJunge commented 3 years ago

Hello,

I got the javascript example for the face mesh to work, but inside of the landmarks are only x and y coordinates (and a visibility that is always "undefined")

How can i get the z coordinate for the landmarks?

sunrisemoment commented 3 years ago

Hello, Same problem here. "multiFaceLandmarks" contains 2D coordinates array. There is no z coordinate value from onResults callback in FaceMesh javascript.

@mediapipe/face_mesh 0: {x: 0.6552373170852661, y: 0.7516689300537109, visibility: undefined} 1: {x: 0.6646785140037537, y: 0.6616325974464417, visibility: undefined} 2: {x: 0.6567336916923523, y: 0.698333203792572, visibility: undefined}

But @tensorflow-models/face-landmarks-detection@0.0.1/dist/face-landmarks-detection.js landmarks contains z coordinates. How can I get z coordinate from mediapipe-facemesh?

delebash commented 3 years ago

I think this is a problem with the javascript version as mediapipe hands has the same problem. https://github.com/google/mediapipe/issues/1429. The python version does produce the z axis.

aarushi-mittal commented 3 years ago

Any updates on the coordinate availability yet ?

ivan-grishchenko commented 3 years ago

Hi @LucaJunge,

You are right, Z coordinate is predicted by the model but need to be propagated to the API. @mhays-google Could you please provide an estimation on that?

lostfictions commented 3 years ago

hey there, just saw v0.8.6 added 3D landmarks for Pose and Holistic -- any updates for this issue?

mhays-google commented 3 years ago

This should be a thing now. I demo the 3d landmarks in Pose, but there are some issues making the demo work well for holistic (namely, the face and hands landmarks aren't real 3d coordinates). But in both solutions, the landmarks are there and are exposed in the results as poseWorldLandmarks.

On Tue, Jul 6, 2021 at 2:10 AM s @.***> wrote:

hey there, just saw v0.8.6 https://github.com/google/mediapipe/releases/tag/v0.8.6 added 3D landmarks for Pose and Holistic -- any updates for this issue?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/google/mediapipe/issues/1422#issuecomment-874595605, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHKQBFJA5BCQPAEBQXPYVKLTWLCAZANCNFSM4VF66AOQ .

sgowroji commented 3 years ago

Hi @LucaJunge, Did you get a chance to go through the above comment. Thanks!

google-ml-butler[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

google-ml-butler[bot] commented 3 years ago

Closing as stale. Please reopen if you'd like to work on this further.