我遇到了 MTCNN
这个网络能够检测我们的头部在三个轴上的运动,称为偏航、横滚和俯仰。
以下是关键要素:
bbox, points = detector.detect_faces(frame)
``` `points` 给我网络制作的关键点列表,例如:
![](https://i.stack.imgur.com/bgbK5.png)
绘图功能:
def draw_landmarks(frame, bb, points):
# draw rectangle and landmarks on face
cv2.rectangle(frame,(int(bb[0]),int(bb[1])),(int(bb[2]),int(bb[3])),green,2)
cv2.circle(frame, (points[0], points[5]), 2, (255,0,0), 2)# eye
cv2.circle(frame, (points[1], points[6]), 2, (255,0,0), 2)
cv2.circle(frame, (points[2], points[7]), 2, (255,0,0), 2)# nose
cv2.circle(frame, (points[3], points[8]), 2, (255,0,0), 2)# mouth
cv2.circle(frame, (points[4], points[9]), 2, (255,0,0), 2)
现在为了检测头部在不同轴上的运动,定义了偏航和侧倾功能。
def Roll(points):
return points[6] - points[5]
def Yaw(points):
le2n = points[2] - points[0]
re2n = points[1] - points[2]
return le2n - re2n
现在已经说过:
"Roll is the rotation about the x axis (between -180 and 180 deg) `Yaw is the rotation about the z axis (between -180 and 180)."` 偏航函数到底是怎么工作的?
github:https://github.com/fisakhan/face_pose/blob/master/pose_detection_mtcnn.py
暂无答案!
目前还没有任何答案,快来回答吧!