asus4 / tf-lite-unity-sample

TensorFlow Lite Samples on Unity
861 stars 252 forks source link

Face try-on #200

Closed anshulAgarrwal closed 2 years ago

anshulAgarrwal commented 2 years ago

I am looking for a face try-on using facemesh sample. I want to use a 3d head to transform[Position, rotation, scale] with face landmark points. As much I have read about this I got to know that this can be solved with PnP algorithm can solve. But I am not sure with implementation. So is there any other way or can you help me on with this?

asus4 commented 2 years ago

@anshulAgarrwal Yeah if you have OpenCV for Unity or other such plugins, You can call the SolvePnP.

Here is an example to estimate the 3D head pose using Dlib FaceLandmark Detector plugin.

https://github.com/EnoxSoftware/DlibFaceLandmarkDetector/blob/ad1a1b21aab86b6f87fce53d91808f03674d3805/Assets/DlibFaceLandmarkDetectorWithOpenCVExample/ARHeadExample/ARHeadVideoCaptureExample.cs#L631

anshulAgarrwal commented 2 years ago

@asus4 Yeah I have used this plugin But I am wondering if we can do something directly with the examples you have provided? also can help me with any approach to full body cloth try on ?

asus4 commented 2 years ago

@anshulAgarrwal No, I'm afraid I will port only official examples from the TensorFlow team (including MadiaPipe) in this repository. Also, I don't have any experience with full-body cloth try on.

anshulAgarrwal commented 2 years ago

Ok Sure Thanks @asus4