google-ai-edge / mediapipe

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

Is face_landmark_with_attention.tflite equivalent to face_landmark.tflite + iris_landmark.tflite? #2935

Closed tri-bao closed 1 year ago

tri-bao commented 2 years ago

In the iris_tracking graph, face_landmark.tflite is firstly used to have 468 facial landmarks and then iris_landmark.tflite is used to produce 10 more landmarks for irises. However, I notice that face_landmark_with_attention.tflite already produces 478 facial landmarks including iris ones. Are they same? In another word, can I just modify the iris_tracking graph to only use face_landmark_with_attention.tflite and still have the same result with the same accuracy?

Thanks

tri-bao commented 2 years ago

@gkarpiak do you have any advice?

Meanwhile, I tried both and the accuracy of lips&eyes landmarks produce by the landmark_with_attention model is less than the combination of the model face_landmark (without attention) and iris_landmark. By "accuracy", I mean the sensitive of landmarks position to the movement of lips and eyes.

I thought that landmark_with_attention alone will perform faster than face_landmark + iris_landmark with the trade off of accuracy and I used it. Everything works fine in 4 different Android phone models until I tried it on Samsung A12. On that phone, the predicted landmarks fluctuate a lot between frames. If we draw a facial bounding box, we can clearly see the fluctuation. If we calculate the overlap of the facial bounding box in 2 consecutive frames, they don't overlap each other although the face and the phone (hence the camera) stand still.

Samsung A12 phone has:

For more information, Android phone models that the landmark_with_attention works well are:

kuaashish commented 1 year ago

Hello @tri-bao,

Are you still looking for resolution on this Or the issue has been resolved? Thank you!!

tri-bao commented 1 year ago

hello @kuaashish It hasn't been resolved but I give up looking for the resolution. I don't use face_landmark_with_attention instead I use face_landmark + iris_landmark

google-ml-butler[bot] commented 1 year ago

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