vladmandic / face-api

FaceAPI: AI-powered Face Detection & Rotation Tracking, Face Description & Recognition, Age & Gender & Emotion Prediction for Browser and NodeJS using TensorFlow/JS
https://vladmandic.github.io/face-api/demo/webcam.html
MIT License
850 stars 151 forks source link

Fix face angles (yaw, pitch, & roll) accuracy #130

Closed TheSohaibAhmed closed 2 years ago

TheSohaibAhmed commented 2 years ago

1) Previouly derived angles seemed inaccurate and somewhat counter-intuitive (given their output was in radians). This update uses the a person's mesh positions (as were used before), and chooses specific points for more accurate results (which are rounded to the nearest deg). It also adds directionality of the movements (_e.g. pitching head backwards is a negative result, as is rolling head to the left).

2) The webcam.js file has also been updated to showcase the correct output in degrees (reducing potential user confusion)

3) Stylistic changes made to avoid errors arising from prev. commits to the same file (e.g. double quotes were used instead of single quotes)

Author: Sohaib Ahmed sohaibi.ahmed@icloud.com

vladmandic commented 2 years ago

looks good, i'll probably merge tomorrow.