How to convert 106 into 68 landmark points

1k views Asked by At

Are 68 landmark points used in dlib https://towardsdatascience.com/facial-mapping-landmarks-with-dlib-python-160abcf7d672 a subset of 106 landmark points used in JD challenge https://facial-landmarks-localization-challenge.github.io/? If it is a subset what are the indices for conversion?

1

There are 1 answers

1
zhusun On BEST ANSWER

      landmark106to68=[1,10,12,14,16,3,5,7,0,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])