Using FaceMesh's refine_landmarks=True to detect irises #23
Open
Description
At present iris.py
first uses FaceMesh
to find the eyes and then uses another model to find (refine) the irises:
mediapipeDemos/custom/iris_lm_depth.py
Lines 50 to 72 in 47c6330
However, per this comment, google-ai-edge/mediapipe#2605 (comment) when FaceMesh
is run with refine_landmarks=True
, it directly returns the irises. Is there a reason to not just use that directly?
The indices for the iris landmarks can then be found using these constants:
mp_face_mesh = mp.solutions.face_mesh
mp_face_mesh.FACEMESH_IRISES
For reference, this is how the mediapipe example code then plots these:
mp_drawing.draw_landmarks(
image=annotated_image,
landmark_list=face_landmarks,
connections=mp_face_mesh.FACEMESH_IRISES,
landmark_drawing_spec=None,
connection_drawing_spec=mp_drawing_styles
.get_default_face_mesh_iris_connections_style())
Metadata
Assignees
Labels
No labels