pntt3011 / mediapipe_face_iris_cpp

Real-time Face and Iris Landmarks Detection using C++
GNU General Public License v3.0
80 stars 15 forks source link

Get the 3d coordinate output of the model #19

Open Youmimzy opened 1 year ago

Youmimzy commented 1 year ago

image image The output data seems to be different from python,where am i doing wrong?

pntt3011 commented 1 year ago

Hi @Youmimzy, did you rescale the coordinate like FaceLandmark::getFaceLandmarkAt ?

Youmimzy commented 1 year ago

你好@Youmimzy,您是否重新调整了坐标FaceLandmark::getFaceLandmarkAt

image This code they output is the pixel coordinates of the image, I want to know how to operate the output three-dimensional coordinates of the world。thanks。

pntt3011 commented 1 year ago

I think the official code does some post-processing with the output from tensorflowlite model. You can check my answer here

Youmimzy commented 1 year ago

我认为官方代码对 tensorflowlite 模型的输出进行了一些后处​​理。你可以在这里查看我的答案

Thanks for your guidance, I solved the problem。

Youmimzy commented 1 year ago

我认为官方代码对 tensorflowlite 模型的输出进行了一些后处​​理。你可以在这里查看我的答案

感谢您的指导,我解决了这个问题。

Sorry I found that I didn't seem to solve this problem. I modified my own code to get the normalized real world x, y, z coordinates through the following official code. image my code: image But the output doesn't seem to be correct, what am I doing wrong?

pntt3011 commented 1 year ago

I mentioned in the link above that using the model alone cannot give you the real-world coordinates. The normalize step just gives you the image coordinate (even z axis). According to the official doc, they use a geometry module to process the model output. Maybe the python wrapper has that module included.