问题描述
dlib https://towardsdatascience.com/facial-mapping-landmarks-with-dlib-python-160abcf7d672 中使用的 68 个地标点是否是 JD 挑战 https://facial-landmarks-localization-challenge.github.io/ 中使用的 106 个地标点的子集?如果它是一个子集,转换的索引是什么?
解决方法
landmark106to68=[1,10,12,14,16,3,5,7,23,21,19,32,30,28,26,17,# 脸颊17点
43,48,49,51,50,# 左眉毛5点
102,103,104,105,101,# 右眉毛5点
72,73,74,86,78,79,80,85,84,# 鼻子9点
35,41,42,39,37,36,# 左眼睛6点
89,95,96,93,91,90,# 右眼睛6点
52,64,63,71,67,68,61,58,59,53,56,55,65,66,62,70,69,57,60,54 # 嘴巴20点
]
...
pt68 = []
if len(pt106) != 106:
continue
for i in range(68):
index = landmark106to68[i]
pt68.append(pt106[index])