Skip to content

Commit a49a905

Browse files
committed
Adding 3 missing points to chin face landmarks
1 parent 13f3b2f commit a49a905

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

face_recognition/api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def face_landmarks(face_image, face_locations=None):
122122

123123
# For a definition of each point index, see https://cdn-images-1.medium.com/max/1600/1*AbEg31EgkbXSQehuNJBlWg.png
124124
return [{
125-
"chin": points[0:14],
125+
"chin": points[0:17],
126126
"left_eyebrow": points[17:22],
127127
"right_eyebrow": points[22:27],
128128
"nose_bridge": points[27:31],

tests/test_face_recognition.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ def test_face_landmarks(self):
8686
face_landmarks[0]['chin'],
8787
[(369, 220), (372, 254), (378, 289), (384, 322), (395, 353),
8888
(414, 382), (437, 407), (464, 424), (495, 428), (527, 420),
89-
(552, 399), (576, 372), (594, 344), (604, 314)])
89+
(552, 399), (576, 372), (594, 344), (604, 314), (610, 282),
90+
(613, 250), (615, 219)])
9091

9192
def test_face_encodings(self):
9293
img = api.load_image_file(os.path.join(os.path.dirname(__file__), 'test_images', 'obama.jpg'))

0 commit comments

Comments
 (0)