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.25k stars 5.13k forks source link

How to draw a 3D mask on the face? #3828

Closed ducanh3005 closed 1 year ago

ducanh3005 commented 1 year ago

After I get 468 points ( x, y ,z) from tflite model by Java, how can I draw a mask (use .obj file)on my face, please give me some tutorial make a mask in face by Java

image

image

kuaashish commented 1 year ago

Hi @ducanh3005, Please refer to this closed issue #3553 for better understanding of your query. Thank you!

ducanh3005 commented 1 year ago

Hi @ducanh3005, Please refer to this closed issue #3553 for better understanding of your query. Thank you!

Thanks for your answer. This example depends on the Mediapipe's MainActivity class so is there a way without using them and still be able to draw the mask on the camera? I recognized faces and landmarks, this is the way i did

https://github.com/ducanh3005/face-ml

kostyaby commented 1 year ago

Hey @ducanh3005 and @NguyenDaoHuy,

Did you guys take a look at the Android faceeffect example shared in this repository? Link

The rendering there is done as a part of a MediaPipe calculator written in C++. If you'd like to do rendering in Java, then I'd suggest you take a look into jMonkeyEngine or Filament, but please note that you'd have to do the Java-level integration between MediaPipe and the chosen rendering library yourself

kuaashish commented 1 year ago

Hi @ducanh3005, Could you please go through the above comment. Thank you!

ducanh3005 commented 1 year ago

Yes i understand your mean. Thank you for your support!

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

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

Siziff commented 1 year ago

hello everyone, I'm trying to figure out how to transfer the texture to the face without marking the dots (as was done in the previous comments) ? For example, in Spark AR, it is enough to add a picture according to a template and it is automatically stretched to the points of the face, is it possible to do this in Mediapipe?

Is there some kind of template-scan in which you can put all 468 points of the face and immediately apply it as a texture? If so, how to do it in python?