Fixes #144: Corrected lip alignment for facemesh keypoints#238
Fixes #144: Corrected lip alignment for facemesh keypoints#238coding-jaguar wants to merge 3 commits intoml5js:mainfrom
Conversation
|
Thank you so much for looking into this and proposing such a thoughtful and elegant solution! The example you edited is designed to introduce beginners to the basic concept of iterating over keypoints with I wonder if it could work well as a separate example, tailored specifically on the lips, or perhaps as an addition to the documentation or wiki? I’d love to hear your thoughts on this! Maybe @MOQN has ideas regarding the website? As nother reference, when I created a video tutorial for the FaceMesh model, I used custom lists of keypoints. You can check out the example here: FaceMesh - Custom List (Lips). Looking around the issue discussions, it looks like the root might be related to this TensorFlow.js issue: tensorflow/tfjs#8221. I wonder if addressing it there could resolve the need for changes to this example. What do you think? |
|
mate i think you have solved it in already by separating inner and outer lips, one other way could be to manipulate lips face["lips"] manually in src/FaceMesh/index.js and separating inner and outer lips there or adding these points like i did here, feels good to contribute man, its my first |
|
admittedly it may not look elegant, feel free to let me know what you think |
Before
After
Problem
The facemesh model had an issue with the lips. The upper lips had more keypoints than the lower lips, which caused:
Solution
To fix this, I added the missing extreme left points for the lower lips:
20) and added it to the lower lip at position10.32.This ensures the upper and lower lips now have the same number of keypoints and align perfectly.
Code Changes
I added the following lines: