Open zoeleesss opened 5 years ago
Hello!
I also encounter the same problem and resolve it by reading the codes in face_recognition/api.py
. In L177~L192, it invokes the Dlib landmark detector and obtains the 68 landmarks at first. Afterward, it processes them into 72 landmarks. Therefore I simply extract 68 landmarks by:
from face_recognition.api import _raw_face_landmarks
...
landmarks = _raw_face_landmarks(img_frame)
face_landmark_list = [[(p.x, p.y) for p in landmark.parts()] for landmark in landmarks]
However, from my evaluation results, I found that it's about 6x slower than directly using Dlib=19.23.1
.
Description
How to get the results of landmarks with 68 points as dlib. I don't wanna use
import dlib; etc..
. Cause it takes too much time. When i was trying to get landmarks, i usedapi.face_landmarks(image)
. But what i got is 72 points. And i tried to manually changed the results to 68 points according to the results used by dlib.What i did was transforming 72 points to 68 points:
But it didnt work tho. Cause the project that i needed to work with is
deepfakes
and tried the conversion part afterwards, but it says wrong aligened.shapes (2,51) and (55,2) not aligned: 51 (dim 1) != 55 (dim 0)
And i tried to replace the landmarks by the landmarks created by dlib. And it works.So what i want to know is how to get the same aligned results of 68-point landmarks as dlib by only using this repo - face_recognition ?
Thanks so much!!