Open stephahn0916 opened 1 month ago
@stephahn0916 In the original MediaPipe repository, they use the Eigen library to get the projected points. I wanted to keep the dependency as simple as possible in this library. We can create a new repository with Eigen for the face mesh example, or rewrite Eigen with the Unity Burst.
I developed a procruste code based on Eigen and integrated it into Unity as a plugin (it was a few years ago, so I can search for it if needed). However, I am wondering how the procruste could help improve the alignment. When I look at this code:
It means that the predictions are between 0 and 1 and you scale them to the real size of the image displayed. The Procrustes solver (if I am right) finds the transformation between the source (canonical face mesh?) and target (predicted face mesh?), but it doesn't take into account the face's deformation.
For my alignment problem, I solved it by increasing the face scaling factor which seemed too small for my face (increase to 2.0). And also modified few parameters as I moved to the last face landmaker model. It works smoothly ;) thank you for the time you put on this project.
Keep me posted about the procruste. I am curious to see how that could improve the precision.
Environment (please complete the following information):
Describe the bug When projecting the face mesh landmarks/detection, the position are wrongly placed.
To Reproduce Steps to reproduce the behavior:
Expected behavior The mesh should be aligned on the face.
Additional context In the face mesh sample cs script, there is a notice // TODO: projection is incorrect, which means that the problem was already identified.