face mesh depth coordinate

693 views
Skip to first unread message

menashe soffer

unread,
May 12, 2023, 7:02:54 AM5/12/23
to MediaPipe
Hello

mediapipe face mesh detect 468 key-points ("landmarks") quite successfully.
It provides 3 coordinates, X, Y and Depth.
X and Y are actual placement IN THE IMAGE plane.

In order to understand "real world" coordinates, one have to project back using depth information.
The meaning of the 3rd coordinates in mediapipe mesh is not clear to me. is it on the same scale? where is the origin? iz it z coordinate or distance from the viewpoint to the landmark?

thanks

Yisrael Harris

unread,
Jul 12, 2023, 9:18:12 AM7/12/23
to MediaPipe
Facial surface represented as 478 3D landmarks
flattened into a 1D tensor: (x1, y1, z1), (x2, y2, z2), …
x- and y-coordinates follow the image pixel
coordinates; z-coordinates are relative to the
face center of mass and are scaled propoionally
to the face width.


Hope this helps.

Yisrael Harris

unread,
Jul 12, 2023, 10:16:12 AM7/12/23
to MediaPipe
More:  Normalized Landmark represents a point in 3D space with x, y, z coordinates. x and y are normalized to [0.0, 1.0] by the image width and height respectively. z represents the landmark depth, and the smaller the value the closer the landmark is to the camera. The magnitude of z uses roughly the same scale as x.

יפי קולפ

unread,
Jan 26, 2025, 10:05:32 AMJan 26
to MediaPipe
איך אני ניגשת לנקודות עצמם?
באיזה מבנה נתונים הם נשמרים?

ב-יום רביעי, 12 ביולי 2023 בשעה 17:16:12 UTC+3, Yisrael Harris כתב/ה:

יפי קולפ

unread,
Jan 27, 2025, 4:29:52 AMJan 27
to MediaPipe
האינדקסים של הנקודות נשאר תמיד אותו הדבר ורק הערכים של הנקודות משתנה
למשל הנקודה הראשונה מייצגת תמיד את פינת העין ורק הערכים שלה משתנים או שכל המיקום של הנקודות משתנה גם הוא בין פנים לפנים?
אני פשוט עושה פרויקט של אבחון לפי תווי פנים ואני צריכה לעשות בדיקות על מקומות מסויימים בפנים
אני אשמח לתשובה מהירה 
תודה רבה!!!!

ב-יום ראשון, 26 בינואר 2025 בשעה 17:05:32 UTC+2, יפי קולפ כתב/ה:
Reply all
Reply to author
Forward
0 new messages