3D的人脸对齐,能找到特征点:
https://github.com/cleardusk/3DDFA
这个也是,有2d和3d的:
https://github.com/1adrianb/face-alignment
用法:
import cv2
import face_alignment
import numpy as np
def get_position(size, padding=0.25):
x = [0.000213256, 0.0752622, 0.18113, 0.29077, 0.393397, 0.586856, 0.689483, 0.799124, 0.904991, 0.98004, 0.490127, 0.490127, 0.490127, 0.490127, 0.36688, 0.426036, 0.490127, 0.554217, 0.613373,
0.121737, 0.187122, 0.265825, 0.334606, 0.260918, 0.182743, 0.645647, 0.714428, 0.793132, 0.858516, 0.79751, 0.719335, 0.254149, 0.340985, 0.42885