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.81k stars 5.18k forks source link

do not draw the face connections #2033

Closed dagap closed 3 years ago

dagap commented 3 years ago

Is there a way to filter out the connections? For example, in my app, I am not interested in the facial connections. Would it be at all possible to filter those out? Currently, with the drawing routine, when I use something like:

 mp_drawing.draw_landmarks(image, results.pose_landmarks, mp_holistic.POSE_CONNECTIONS)

It draws all pose connections. Would it be possible to filter out the ones pertaining to the face?

sgowroji commented 3 years ago

Hi @dagap, You can use Holistic. by removing the FACEMESH_CONTOURS. Thanks!

jiuqiant commented 3 years ago

If you are only interested in drawing landmarks, you just need to ignore the "connections" parameter. For example, you can do the following:

mp_drawing.draw_landmarks(image=image, landmark_list=face_landmarks)
google-ml-butler[bot] commented 3 years ago

Are you satisfied with the resolution of your issue? Yes No