对应landmark201个点的顺序,序号从0-200,且每个关键点有对应的英文命名作为参数名; 关键点名称对应关系如下图
如果您对文档内容有任何疑问,可以通过以下几种方式联系我们:
支持人脸 72关键点、150关键点、201 关键点检测,关键点包括人脸、眼睛、眉毛、嘴唇以及鼻子轮廓等,此服务具有如下三个业务功能:
您可以在 示例代码中心 中调试该接口,可进行签名验证、查看在线调用的请求内容和返回结果、示例代码的自动生成。
请求URL数据格式
向API服务地址使用POST发送请求,必须在URL中带上参数access_token,可通过后台的API Key和Secret Key生成,具体方式请参考“Access Token获取”。
示例代码
#!/bin/bash curl -i -k 'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&cli
ent_id=【百度云应用的AK】&client_secret=【百度云应用的SK】'
注意:access_token的有效期为30天,切记需要每30天进行定期更换,或者每次请求都拉取新token;
例如此接口,使用HTTPS POST发送:
https://aip.baidubce.com/rest/2.0/face/v1/landmark?access_token=24.f9ba9c5341b67688ab4a
dded8bc91dec.2592000.1485570332.282335-8574074
POST中Body的参数,按照下方请求参数说明选择即可。
提示:如果您为百度云老用户,正在使用其他非AI的服务,可以参考百度云AKSK鉴权方式发送请求,虽然请求方式和鉴权方法和本文所介绍的不同,但请求参数和返回结果一致。
注意事项 :
请求示例:
HTTP方法:POST
请求URL:https://aip.baidubce.com/rest/2.0/face/v1/landmark
URL参数:
参数 | 值 |
---|---|
access_token | 通过API Key和Secret Key获取的access_token,参考“Access Token获取” |
Header:
参数 | 值 |
---|---|
Content-Type | application/json |
Body中放置请求参数,参数详情如下:
请求参数
参数 | 必选 | 类型 | 说明 |
---|---|---|---|
image | 是 | string | 图片信息(数据大小应小于10M 分辨率应小于1920*1080) |
image_type | 是 | string |
图片类型 BASE64:图片的base64值; URL:图片的 URL( 下载图片时可能由于网络等原因导致下载图片时间过长) FACE_TOKEN: 人脸标识 |
max_face_num | 否 | uint32 | 最多处理人脸的数目. 默认值为1(仅检测图片中面积最大的那个人脸) 最大值10 |
face_field | 否 | string | 包括age,gender,landmark4,landmark72,landmark150,landmark201信息,用逗号分隔. 默认只返回face_token、人脸框、概率和旋转角度 |
示例代码 :
提示一:使用示例代码前,请记得替换其中的示例Token、图片地址或Base64信息。
提示二:部分语言依赖的类或库,请在代码注释中查看下载地址。
# encoding:utf-8 import requests import json, base64 ''' 人脸检测与关键点检测 ''' request_url = "https://aip.baidubce.com/rest/2.0/face/v1/landmark" filename = '[输入图片路径]'
file = open(filename, 'rb') image = file.read() file.close() img_base64 = base64.b64encode(image)
access_token = '[调用鉴权接口获取的token]' request_url = request_url + "?access_token=" + access_token headers = {'content-type': 'application/json'} req_data = json.dumps({'image': img_base64.decode(),
'image_type': 'BASE64', 'face_field': 'landmark150'}) response = requests.post(request_url, data=req
_data, headers=headers) if response: print (response.json())
返回参数
字段 | 必选 | 类型 | 说明 |
---|---|---|---|
face_num | 是 | int | 图片中的人脸数量 |
face_list | 是 | array | 人脸信息列表 字段信息见下 |
face_token | 是 | string | 人脸标志 |
location | 是 | array | 人脸在图片中的位置 |
+left | 是 | double | 人脸区域离左边界的距离 |
+top | 是 | double | 人脸区域离上边界的距离 |
+width | 是 | double | 人脸区域的宽度 |
+height | 是 | double | 人脸区域的高度 |
+rotation | 是 | int64 | 人脸框相对于竖直方向的顺时针旋转角,[-180,180] |
face_probability | 是 | double | 人脸置信度,范围0-1 |
angle | 是 | array | 人脸旋转参数 具体说明参考人脸空间姿态角参考 |
+yaw | 是 | double | 三维旋转之左右旋转角[-90(左), 90(右)] |
+pitch | 是 | double | 三维旋转之俯仰角度[-90(上), 90(下)] |
+roll | 是 | double | 平面内旋转角[-180(逆时针), 180(顺时针)] |
age | 否 | double | 年龄 face_field包含age时返回 |
gender | 否 | array | 性别 face_field包含gender时返回 |
+type | 否 | string | male:男性 female:女性 |
+probability | 否 | double | 性别置信度,范围0~1 |
landmark72 | 否 | array | 72个特征点位置 face_field包含landmark72时返回 |
字段 | 必选 | 类型 | 说明 |
---|---|---|---|
face_num | 是 | int | 图片中的人脸数量 |
face_list | 是 | array | 人脸信息列表 字段信息见下 |
face_token | 是 | string | 人脸标志 |
location | 是 | array | 人脸在图片中的位置 |
+left | 是 | double | 人脸区域离左边界的距离 |
+top | 是 | double | 人脸区域离上边界的距离 |
+width | 是 | double | 人脸区域的宽度 |
+height | 是 | double | 人脸区域的高度 |
+rotation | 是 | int64 | 人脸框相对于竖直方向的顺时针旋转角,[-180,180] |
face_probability | 是 | double | 人脸置信度,范围0-1 |
angle | 是 | array | 人脸旋转参数 具体说明参考人脸空间姿态角参考 |
+yaw | 是 | double | 三维旋转之左右旋转角[-90(左), 90(右)] |
+pitch | 是 | double | 三维旋转之俯仰角度[-90(上), 90(下)] |
+roll | 是 | double | 平面内旋转角[-180(逆时针), 180(顺时针)] |
landmark150 | 否 | array | 150个特征点位置 face_field包含landmark150时返回 |
字段 | 必选 | 类型 | 说明 |
---|---|---|---|
face_num | 是 | int | 图片中的人脸数量 |
face_list | 是 | array | 人脸信息列表 字段信息见下 |
face_token | 是 | string | 人脸标志 |
location | 是 | array | 人脸在图片中的位置 |
+left | 是 | double | 人脸区域离左边界的距离 |
+top | 是 | double | 人脸区域离上边界的距离 |
+width | 是 | double | 人脸区域的宽度 |
+height | 是 | double | 人脸区域的高度 |
+rotation | 是 | int64 | 人脸框相对于竖直方向的顺时针旋转角,[-180,180] |
face_probability | 是 | double | 人脸置信度,范围0-1 |
angle | 是 | array | 人脸旋转参数 具体说明参考人脸空间姿态角参考 |
+yaw | 是 | double | 三维旋转之左右旋转角[-90(左), 90(右)] |
+pitch | 是 | double | 三维旋转之俯仰角度[-90(上), 90(下)] |
+roll | 是 | double | 平面内旋转角[-180(逆时针), 180(顺时针)] |
landmark201 | 否 | array | 201个特征点位置 face_field包含landmark201时返回 |
72点关键点返回示例
{ "error_code": 0, "error_msg": "SUCCESS", "log_id": 1928749930, "timestamp": 1587886328,
"cached": 0, "result": { "face_num": 1, "face_list": [ { "face_token": "d80fc864a9f11ca9
7f753b7fd6ef3092", "location": { "left": 148.2, "top": 207.76, "width": 293, "height": 265,
"rotation": 0 }, "face_probability": 1, "angle": { "yaw": 19.13, "pitch": 17.13, "roll":
-3.5 }, "landmark201": [ { "cheek_right_1": { "x": 152.91139221191, "y": 234.10575866699 },
"cheek_right_3": { "x": 153.21405029297, "y": 275.29922485352 }, "cheek_right_5": { "x":
159.1178894043, "y": 317.43710327148 }, "cheek_right_7": { "x": 171.67828369141, "y": 359.82891845703 },
"cheek_right_9": { "x": 187.34191894531, "y": 402.29333496094 }, "cheek_right_11":
{ "x": 209.47039794922, "y": 448.70611572266 }, "chin_2": { "x": 244.76583862305, "y":
480.13912963867 }, "cheek_left_11": { "x": 300.36502075195, "y": 472.90335083008 },
"cheek_left_9": { "x": 355.99075317383, "y": 439.84826660156 }, "cheek_left_7":
{ "x": 402.11898803711, "y": 393.20904541016 }, "cheek_left_5": { "x": 427.60656738281,
"y": 340.88400268555 }, "cheek_left_3": { "x": 442.78765869141, "y": 287.72296142578 },
"cheek_left_1": { "x": 453.259765625, "y": 234.46209716797 }, "eye_right_corner_right":
{ "x": 166.43855285645, "y": 245.62696838379 }, "eye_right_eyelid_upper_2": { "x": 178.73571777344,
"y": 233.48094177246 }, "eye_right_eyelid_upper_4": { "x": 194.54188537598, "y": 231.23136901855 },
"eye_right_eyelid_upper_6": { "x": 209.59561157227, "y": 238.01022338867 }, "eye_right_corner_left":
{ "x": 219.60101318359, "y": 252.86766052246 }, "eye_right_eyelid_lower_6": { "x": 206.45573425293,
"y": 256.78121948242 }, "eye_right_eyelid_lower_4": { "x": 191.26301574707, "y": 257.60192871094 },
"eye_right_eyelid_lower_2": { "x": 177.1402130127, "y": 253.22375488281 }, "eye_right_eyeball_center":
{ "x": 197.69207763672, "y": 242.78115844727 }, "eyebrow_right_corner_right": { "x": 152.5193939209,
"y": 218.0311126709 }, "eyebrow_right_upper_2": { "x": 166.62945556641, "y": 206.35087585449 },
"eyebrow_right_upper_3": { "x": 183.5559387207, "y": 209.04162597656 }, "eyebrow_right_upper_4":
{ "x": 200.37629699707, "y": 216.20118713379 }, "eyebrow_right_corner_left": { "x": 215.19021606445,
"y": 231.66654968262 }, "eyebrow_right_lower_3": { "x": 197.2017364502, "y": 226.71070861816 },
"eyebrow_right_lower_2": { "x": 180.5466003418, "y": 221.2080078125 }, "eyebrow_right_lower_1":
{ "x": 165.50422668457, "y": 217.85374450684 }, "eye_left_corner_right": { "x": 284.4423828125,
"y": 253.46418762207 }, "eye_left_eyelid_upper_2": { "x": 299.30715942383, "y": 238.99905395508 },
"eye_left_eyelid_upper_4": { "x": 316.24237060547, "y": 233.8639831543 }, "eye_left_eyelid_upper_6":
{ "x": 333.67279052734, "y": 238.54011535645 }, "eye_left_corner_left": { "x": 347.63455200195,
"y": 252.36630249023 }, "eye_left_eyelid_lower_6": { "x": 333.91830444336, "y": 257.90979003906 },
"eye_left_eyelid_lower_4": { "x": 316.63473510742, "y": 260.21624755859 }, "eye_left_eyelid_lower
_2": { "x": 299.55313110352, "y": 257.49395751953 }, "eye_left_eyeball_center": { "x": 320.768951
41602, "y": 244.34625244141 }, "eyebrow_left_corner_right": { "x": 275.39828491211, "y": 230.9055
9387207 }, "eyebrow_left_upper_2": { "x": 296.08618164062, "y": 216.02331542969 }, "eyebrow_left_
upper_3": { "x": 319.22418212891, "y": 210.38291931152 }, "eyebrow_left_upper_4": { "x": 345.153
50341797, "y": 209.21328735352 }, "eyebrow_left_corner_left": { "x": 372.05294799805, "y": 222.89
102172852 }, "eyebrow_left_lower_3": { "x": 345.80990600586, "y": 220.7686920166 },
"eyebrow_left_lower_2": { "x": 321.57382202148, "y": 223.06295776367 }, "eyebrow_left_lower_1":
{ "x": 298.73480224609, "y": 227.94213867188 }, "nose_right_contour_1": { "x": 229.40553283691,
"y": 257.50231933594 }, "nose_right_contour_2": { "x": 221.8087310791, "y": 283.46823120117 },
"nose_right_contour_3": { "x": 214.45086669922, "y": 309.3616027832 }, "nose_right_contour_4":
{ "x": 207.43621826172, "y": 334.99829101562 }, "nose_right_contour_6": { "x": 216.9593963623,
"y": 342.42492675781 }, "nose_left_contour_6": { "x": 253.02030944824, "y": 342.05941772461 },
"nose_left_contour_4": { "x": 276.26602172852, "y": 338.05661010742 }, "nose_left_contour_3":
{ "x": 267.28646850586, "y": 311.75662231445 }, "nose_left_contour_2": { "x": 265.51040649414,
"y": 285.46475219727 }, "nose_left_contour_1": { "x": 264.02905273438, "y": 258.85943603516 },
"nose_tip": { "x": 225.04518127441, "y": 328.64370727539 }, "mouth_corner_right_outer":
{ "x": 206.5617980957, "y": 385.76031494141 }, "mouth_lip_upper_outer_3": { "x": 219.67320251
465, "y": 375.18218994141 }, "mouth_lip_upper_outer_6": { "x": 239.92309570312, "y": 374.7697
7539062 }, "mouth_lip_upper_outer_9": { "x": 270.28350830078, "y": 376.16665649414 }, "mouth_
corner_left_outer": { "x": 303.98645019531, "y": 385.67404174805 }, "mouth_lip_lower_outer_9"
: { "x": 273.26431274414, "y": 404.86437988281 }, "mouth_lip_lower_outer_6": { "x": 240.915145
87402, "y": 410.22521972656 }, "mouth_lip_lower_outer_3": { "x": 219.5506439209, "y": 403.0101
0131836 }, "mouth_lip_upper_inner_3": { "x": 221.61395263672, "y": 384.23931884766 }, "mouth_lip
_upper_inner_6": { "x": 240.56512451172, "y": 385.11706542969 }, "mouth_lip_upper_inner_9": { "x
": 269.63024902344, "y": 384.37921142578 }, "mouth_lip_lower_inner_9": { "x": 269.86450195312,
"y": 391.81661987305 }, "mouth_lip_lower_inner_6": { "x": 241.16767883301, "y": 392.5026550293
}, "mouth_lip_lower_inner_3": { "x": 223.11337280273, "y": 390.59606933594 } } ] } ] } }
150点关键点返回示例
{ "error_code": 0, "error_msg": "SUCCESS", "log_id": 3069319197, "timestamp": 1584341469,
{ "error_code": 0, "error_msg": "SUCCESS", "log_id": 1928749930, "timestamp": 1587886328,
"cached": 0, "result": { "face_num": 1, "face_list": [ { "face_token": "d80fc864a9f11ca97f7
53b7fd6ef3092", "location": { "left": 148.2, "top": 207.76, "width": 293, "height": 265, "ro
tation": 0 }, "face_probability": 1, "angle": { "yaw": 19.13, "pitch": 17.13, "roll": -3.5 },
"landmark201": { "cheek_right_1": { "x": 42.31241607666, "y": 189.65449523926 }, "cheek_right_3"
: { "x": 44.54296875, "y": 197.21664428711 }, "cheek_right_5": { "x": 47.168300628662, "y": 204
.71488952637 }, "cheek_right_7": { "x": 51.103427886963, "y": 212.02030944824 }, "cheek_right_9":
{ "x": 58.585376739502, "y": 217.99108886719 }, "cheek_right_11": { "x": 66.981811523438, "y":
220.88842773438 }, "chin_2": { "x": 74.937934875488, "y": 221.29644775391 }, "cheek_left_11":
{ "x": 81.538116455078, "y": 218.27543640137 }, "cheek_left_9": { "x": 86.794311523438, "y":
212.35699462891 }, "cheek_left_7": { "x": 89.269142150879, "y": 205.04515075684 }, "cheek_left_5":
{ "x": 89.34553527832, "y": 198.01556396484 }, "cheek_left_3": { "x": 89.059379577637, "y": 191.
10192871094 }, "cheek_left_1": { "x": 88.503395080566, "y": 184.33065795898 }, "eye_right_corner_r
ight": { "x": 55.116683959961, "y": 190.61100769043 }, "eye_right_eyelid_upper_2": { "x": 56.738288
879395, "y": 188.59680175781 }, "eye_right_eyelid_upper_4": { "x": 59.01921081543, "y": 187.68321228027 },
"eye_right_eyelid_upper_6": { "x": 61.467914581299, "y": 188.02760314941 }, "eye_right_corner_left":
{ "x": 63.568134307861, "y": 189.63510131836 }, "eye_right_eyelid_lower_6": { "x": 61.694267272949,
"y": 190.69076538086 }, "eye_right_eyelid_lower_4": { "x": 59.454444885254, "y": 191.33895874023 },
"eye_right_eyelid_lower_2": { "x": 57.118618011475, "y": 191.25410461426 }, "eye_right_eyeball_cent
er": { "x": 58.797183990479, "y": 189.35336303711 }, "eyebrow_right_corner_right": { "x": 51.2167778
01514, "y": 188.38786315918 }, "eyebrow_right_upper_2": { "x": 53.870964050293, "y": 184.83016967773 },
"eyebrow_right_upper_3": { "x": 57.506542205811, "y": 183.5043182373 }, "eyebrow_right_upper_4":
{ "x": 61.183086395264, "y": 183.19314575195 }, "eyebrow_right_corner_left": { "x": 64.871238708496,
"y": 184.73831176758 }, "eyebrow_right_lower_3": { "x": 61.479015350342, "y": 185.56793212891 },
"eyebrow_right_lower_2": { "x": 58.032566070557, "y": 186.2632598877 }, "eyebrow_right_lower_1":
{ "x": 54.63260269165, "y": 187.36543273926 }, "eye_left_corner_right": { "x": 74.069404602051,
"y": 187.93475341797 }, "eye_left_eyelid_upper_2": { "x": 75.66828918457, "y": 186.65887451172 },
"eye_left_eyelid_upper_4": { "x": 77.592361450195, "y": 186.16188049316 }, "eye_left_eyelid_upper_6"
: { "x": 79.586471557617, "y": 186.45025634766 }, "eye_left_corner_left": { "x": 81.423141479492, "y
": 187.45210266113 }, "eye_left_eyelid_lower_6": { "x": 79.689315795898, "y": 188.07566833496 },
"eye_left_eyelid_lower_4": { "x": 77.799751281738, "y": 188.36500549316 }, "eye_left_eyelid_lower_2":
{ "x": 75.900672912598, "y": 188.30387878418 }, "eye_left_eyeball_center": { "x": 77.943511962891,
"y": 187.28001403809 }, "eyebrow_left_corner_right": { "x": 72.480133056641, "y": 183.96446228027 },
"eyebrow_left_upper_2": { "x": 75.453918457031, "y": 181.56910705566 }, "eyebrow_left_upper_3":
{ "x": 78.83179473877, "y": 181.00735473633 }, "eyebrow_left_upper_4": { "x": 82.155281066895, "y":
181.49905395508 }, "eyebrow_left_corner_left": { "x": 84.791572570801, "y": 184.30467224121 }, "
eyebrow_left_lower_3": { "x": 82.042182922363, "y": 184.03210449219 }, "eyebrow_left_lower_2":
{ "x": 79.002876281738, "y": 183.73754882812 }, "eyebrow_left_lower_1": { "x": 75.751091003418,
"y": 183.88179016113 }, "nose_right_contour_1": { "x": 66.593109130859, "y": 189.06278991699 },
"nose_right_contour_2": { "x": 66.620910644531, "y": 192.60729980469 }, "nose_right_contour_3":
{ "x": 66.599555969238, "y": 196.11846923828 }, "nose_right_contour_4": { "x": 65.618698120117,
"y": 200.2027130127 }, "nose_right_contour_6": { "x": 68.844802856445, "y": 200.28895568848 },
"nose_left_contour_6": { "x": 74.86922454834, "y": 199.59733581543 }, "nose_left_contour_4":
{ "x": 77.114517211914, "y": 198.64364624023 }, "nose_left_contour_3": { "x": 74.99666595459,
"y": 194.87409973145 }, "nose_left_contour_2": { "x": 73.466331481934, "y": 191.60952758789 },
"nose_left_contour_1": { "x": 71.929557800293, "y": 188.32957458496 }, "nose_tip": { "x": 72.
110206604004, "y": 197.61848449707 }, "mouth_corner_right_outer": { "x": 64.238929748535, "y":
208.59043884277 }, "mouth_lip_upper_outer_3": { "x": 68.34407043457, "y": 206.58200073242 }, "
mouth_lip_upper_outer_6": { "x": 72.647048950195, "y": 205.95881652832 }, "mouth_lip_upper_outer_9"
: { "x": 76.58984375, "y": 205.54756164551 }, "mouth_corner_left_outer": { "x": 80.137763977051,
"y": 206.63317871094 }, "mouth_lip_lower_outer_9": { "x": 77.228042602539, "y": 209.13989257812 },
"mouth_lip_lower_outer_6": { "x": 73.251800537109, "y": 210.38688659668 }, "mouth_lip_lower_outer_3":
{ "x": 68.685707092285, "y": 210.19580078125 }, "mouth_lip_upper_inner_3": { "x": 68.588790893555,
"y": 207.86560058594 }, "mouth_lip_upper_inner_6": { "x": 72.813514709473, "y": 207.4914855957 },
"mouth_lip_upper_inner_9": { "x": 76.605278015137, "y": 206.88005065918 }, "mouth_lip_lower_inner_9"
: { "x": 76.632255554199, "y": 207.44100952148 }, "mouth_lip_lower_inner_6": { "x": 72.939880371094,
"y": 208.07493591309 }, "mouth_lip_lower_inner_3": { "x": 68.787719726562, "y": 208.41091918945 },
"cheek_right_2": { "x": 43.467124938965, "y": 193.40245056152 }, "cheek_right_4": { "x": 45.808784484863,
"y": 200.98356628418 }, "cheek_right_6": { "x": 48.872074127197, "y": 208.6109161377 }, "cheek_right_8":
{ "x": 54.450130462646, "y": 215.4328918457 }, "cheek_right_10": { "x": 62.691562652588, "y": 219.77
143859863 }, "chin_1": { "x": 70.906677246094, "y": 221.53775024414 }, "chin_3": { "x": 78.58708190918,
"y": 220.25169372559 }, "cheek_left_10": { "x": 84.438705444336, "y": 215.54095458984 }, "cheek_left_8"
: { "x": 88.421768188477, "y": 208.86682128906 }, "cheek_left_6": { "x": 89.404579162598, "y": 201.582
8383789 }, "cheek_left_4": { "x": 89.226097106934, "y": 194.56100463867 }, "cheek_left_2": { "x": 88.77
6916503906, "y": 187.70640563965 }, "eyebrow_right_upper_1": { "x": 51.055225372314, "y": 187.4192810058
6 }, "eyebrow_right_upper_5": { "x": 64.620422363281, "y": 183.30424499512 }, "eyebrow_left_upper_1":
{ "x": 72.405311584473, "y": 182.5030670166 }, "eyebrow_left_upper_5": { "x": 84.738502502441, "y":
183.29322814941 }, "eye_right_eyelid_upper_1": { "x": 55.766471862793, "y": 189.49603271484 },
"eye_right_eyelid_upper_3": { "x": 57.783981323242, "y": 187.9764251709 }, "eye_right_eyelid_upper_5"
: { "x": 60.291412353516, "y": 187.6668548584 }, "eye_right_eyelid_upper_7": { "x": 62.610542297363,
"y": 188.70217895508 }, "eye_right_eyelid_lower_7": { "x": 62.647716522217, "y": 190.19287109375 },
"eye_right_eyelid_lower_5": { "x": 60.609279632568, "y": 191.1389465332 }, "eye_right_eyelid_lower_3
": { "x": 58.271293640137, "y": 191.43981933594 }, "eye_right_eyelid_lower_1": { "x": 56.100021362305,
"y": 190.99014282227 }, "eye_right_eyeball_right": { "x": 56.948715209961, "y": 189.78875732422 },
"eye_right_eyeball_left": { "x": 60.76294708252, "y": 189.30876159668 }, "eye_left_eyelid_upper_1":
{ "x": 74.795600891113, "y": 187.22235107422 }, "eye_left_eyelid_upper_3": { "x": 76.582481384277,
"y": 186.30328369141 }, "eye_left_eyelid_upper_5": { "x": 78.627487182617, "y": 186.19665527344 },
"eye_left_eyelid_upper_7": { "x": 80.57470703125, "y": 186.87817382812 }, "eye_left_eyelid_lower_
7": { "x": 80.591354370117, "y": 187.83154296875 }, "eye_left_eyelid_lower_5": { "x": 78.778724670
41, "y": 188.32012939453 }, "eye_left_eyelid_lower_3": { "x": 76.835243225098, "y": 188.4244079589
8 }, "eye_left_eyelid_lower_1": { "x": 74.967391967773, "y": 188.18258666992 }, "eye_left_eyeball
_right": { "x": 76.36678314209, "y": 187.48699951172 }, "eye_left_eyeball_left": { "x": 79.4850540
16113, "y": 187.31430053711 }, "nose_bridge_1": { "x": 69.695106506348, "y": 188.73384094238 },
"nose_bridge_2": { "x": 70.618003845215, "y": 192.09872436523 }, "nose_bridge_3": { "x": 71.55634
3078613, "y": 195.47486877441 }, "nose_right_contour_5": { "x": 67.552391052246, "y": 201.5517730
7129 }, "nose_right_contour_7": { "x": 68.642906188965, "y": 199.08920288086 }, "nose_left_contou
r_7": { "x": 74.935028076172, "y": 198.34973144531 }, "nose_left_contour_5": { "x": 75.97146606445
3, "y": 200.47100830078 }, "nose_middle_contour": { "x": 72.127105712891, "y": 201.73022460938 },
"mouth_corner_right_inner": { "x": 64.899894714355, "y": 208.53944396973 }, "mouth_corner_left_inn
er": { "x": 79.593727111816, "y": 206.72438049316 }, "mouth_lip_upper_outer_1": { "x": 65.4952011
1084, "y": 207.76577758789 }, "mouth_lip_upper_outer_2": { "x": 66.83455657959, "y": 207.093170166
02 }, "mouth_lip_upper_outer_4": { "x": 69.727005004883, "y": 206.0223236084 }, "mouth_lip_upper_o
uter_5": { "x": 71.136360168457, "y": 205.85467529297 }, "mouth_lip_upper_outer_7": { "x": 74.0091
78161621, "y": 205.50805664062 }, "mouth_lip_upper_outer_8": { "x": 75.26887512207, "y": 205.344
54345703 }, "mouth_lip_upper_outer_10": { "x": 77.930633544922, "y": 205.73402404785 }, "mouth_li
p_upper_outer_11": { "x": 79.06810760498, "y": 206.10731506348 }, "mouth_lip_lower_outer_11": { "x
": 79.310043334961, "y": 207.62538146973 }, "mouth_lip_lower_outer_10": { "x": 78.422233581543, "y
": 208.49403381348 }, "mouth_lip_lower_outer_8": { "x": 76.039436340332, "y": 209.91091918945 },
"mouth_lip_lower_outer_7": { "x": 74.759254455566, "y": 210.31077575684 }, "mouth_lip_lower_outer_5"
: { "x": 71.684158325195, "y": 210.71028137207 }, "mouth_lip_lower_outer_4": { "x": 70.194778442383,
"y": 210.64688110352 }, "mouth_lip_lower_outer_2": { "x": 67.074501037598, "y": 209.91828918457 },
"mouth_lip_lower_outer_1": { "x": 65.643745422363, "y": 209.32096862793 }, "mouth_lip_upper_
inner_1": { "x": 65.730621337891, "y": 208.26277160645 }, "mouth_lip_upper_inner_2": { "x": 67.
079795837402, "y": 208.03302001953 }, "mouth_lip_upper_inner_4": { "x": 70.023719787598, "y":
207.62254333496 }, "mouth_lip_upper_inner_5": { "x": 71.351684570312, "y": 207.49478149414 },
"mouth_lip_upper_inner_7": { "x": 74.106018066406, "y": 207.1644744873 }, "mouth_lip_upper_inner_
8": { "x": 75.296127319336, "y": 206.98078918457 }, "mouth_lip_upper_inner_10": { "x": 77.8560180
66406, "y": 206.71319580078 }, "mouth_lip_upper_inner_11": { "x": 78.921539306641, "y": 206.6403
1982422 }, "mouth_lip_lower_inner_11": { "x": 78.975936889648, "y": 207.04075622559 }, "mouth_li
p_lower_inner_10": { "x": 77.91145324707, "y": 207.22946166992 }, "mouth_lip_lower_inner_8":
{ "x": 75.387634277344, "y": 207.6734161377 }, "mouth_lip_lower_inner_7": { "x": 74.222236633301,
"y": 207.86814880371 }, "mouth_lip_lower_inner_5": { "x": 71.497695922852, "y": 208.21778869629 }
, "mouth_lip_lower_inner_4": { "x": 70.19393157959, "y": 208.31753540039 }, "mouth_lip_lower_inner_2
": { "x": 67.215522766113, "y": 208.55447387695 }, "mouth_lip_lower_inner_1": { "x": 65.80793762207
, "y": 208.67227172852 }, "iris_left_1": { "x": 58.5608253479, "y": 188.5970916748 }, "iris_left_2"
: { "x": 58.339405059814, "y": 186.68266296387 }, "iris_left_3": { "x": 57.866024017334, "y":
186.83006286621 }, "iris_left_4": { "x": 57.384708404541, "y": 187.18560791016 }, "iris_left_5":
{ "x": 57.09496307373, "y": 187.73175048828 }, "iris_left_6": { "x": 57.025074005127, "y": 188
.2507019043 }, "iris_left_7": { "x": 57.108268737793, "y": 188.8582611084 }, "iris_left_8":
{ "x": 57.340709686279, "y": 189.41612243652 }, "iris_left_9": { "x": 57.619876861572, "y"
: 189.85971069336 }, "iris_left_10": { "x": 57.992046356201, "y": 190.19557189941 }, "iris_le
ft_11": { "x": 58.506317138672, "y": 190.3910369873 }, "iris_left_12": { "x": 59.06840133667,
"y": 190.31591796875 }, "iris_left_13": { "x": 59.484573364258, "y": 190.00793457031 }, "ir
is_left_14": { "x": 59.801601409912, "y": 189.56636047363 }, "iris_left_15": { "x": 59.9374
00817871, "y": 189.02279663086 }, "iris_left_16": { "x": 59.994979858398, "y": 188.47799682617 },
"iris_left_17": { "x": 59.908092498779, "y": 187.91714477539 }, "iris_left_18": { "x":
59.693229675293, "y": 187.42846679688 }, "iris_left_19": { "x": 59.357315063477, "y":
186.98899841309 }, "iris_left_20": { "x": 58.83500289917, "y": 186.74018859863 }, "iris_right_1":
{ "x": 77.913948059082, "y": 186.52035522461 }, "iris_right_2": { "x": 77.751182556152, "y":
184.79627990723 }, "iris_right_3": { "x": 77.291893005371, "y": 184.87088012695 }, "iris_right_4"
: { "x": 76.81241607666, "y": 185.17738342285 }, "iris_right_5": { "x": 76.51399230957, "y":
185.63529968262 }, "iris_right_6": { "x": 76.399871826172, "y": 186.14614868164 }, "iris_right_7"
: { "x": 76.425010681152, "y": 186.71411132812 }, "iris_right_8": { "x": 76.59375, "y": 187.219
25354004 }, "iris_right_9": { "x": 76.89958190918, "y": 187.63000488281 }, "iris_right_10":
{ "x": 77.306015014648, "y": 187.93461608887 }, "iris_right_11": { "x": 77.76798248291, "y":
188.10162353516 }, "iris_right_12": { "x": 78.355964660645, "y": 188.07786560059 }, "iris_right_
13": { "x": 78.838737487793, "y": 187.83233642578 }, "iris_right_14": { "x": 79.188194274902,
"y": 187.45365905762 }, "iris_right_15": { "x": 79.389739990234, "y": 186.96867370605 }, "ir
is_right_16": { "x": 79.451263427734, "y": 186.44125366211 }, "iris_right_17": { "x": 79.354
81262207, "y": 185.87980651855 }, "iris_right_18": { "x": 79.112213134766, "y": 185.423355
10254 }, "iris_right_19": { "x": 78.747856140137, "y": 185.04452514648 }, "iris_right_20":
{ "x": 78.234527587891, "y": 184.81198120117 }, "forehead_center": { "x": 63.854957580566,
"y": 161.62615966797 }, "forehead_right_1": { "x": 56.716361999512, "y": 162.98860168457 },
"forehead_right_2": { "x": 50.169933319092, "y": 165.94499206543 }, "forehead_right_3":
{ "x": 45.235385894775, "y": 171.05480957031 }, "forehead_right_4": { "x": 42.774684906006,
"y": 177.78215026855 }, "forehead_right_5": { "x": 42.371360778809, "y": 185.02729797363 },
"forehead_left_1": { "x": 70.29483795166, "y": 161.40893554688 }, "forehead_left_2": { "x":
76.429832458496, "y": 163.07518005371 }, "forehead_left_3": { "x": 81.494247436523, "y":
166.90705871582 }, "forehead_left_4": { "x": 85.017692565918, "y": 172.2216796875 },
"forehead_left_5": { "x": 87.215446472168, "y": 178.24891662598 } } } ] } }
"cached": 0, "result": { "face_num": 1, "face_list": [ { "face_token": "46c7fb0776721b391
cc51c574095e2cd", "location": { "left": 30.95, "top": 121.14, "width": 88, "height": 84,
"rotation": -5 }, "face_probability": 1, "angle": { "yaw": -2.64, "pitch": 11.24, "roll":
-7.75 }, "landmark150": { "cheek_right_1": { "x": 31.09, "y": 135.51 }, "cheek_right_3":
{ "x": 33.85, "y": 150.02 }, "cheek_right_5": { "x": 37.83, "y": 164.53 }, "cheek_right_7"
: { "x": 44.83, "y": 178.83 }, "cheek_right_9": { "x": 58.79, "y": 191.43 }, "cheek_right_1
1": { "x": 73.89, "y": 198.59 }, "chin_2": { "x": 88.53, "y": 199.96 }, "cheek_left_11":
{ "x": 101.43, "y": 193.34 }, "cheek_left_9": { "x": 112.07, "y": 180.59 }, "cheek_left_7":
{ "x": 118.56, "y": 167.04 }, "cheek_left_5": { "x": 120.58, "y": 153.53 }, "cheek_left_3":
{ "x": 121.08, "y": 140.28 }, "cheek_left_1": { "x": 120.61, "y": 127.1 }, "eye_right_corne
r_right": { "x": 53.63, "y": 135.28 }, "eye_right_eyelid_upper_2": { "x": 57.74, "y": 132.45 },
"eye_right_eyelid_upper_4": { "x": 62.02, "y": 131.31 }, "eye_right_eyelid_upper_6": { "x":
66.21, "y": 131.8 }, "eye_right_corner_left": { "x": 69.98, "y": 134.82 }, "eye_right_eyelid_
lower_6": { "x": 66.31, "y": 135.75 }, "eye_right_eyelid_lower_4": { "x": 62.27, "y": 136.34 },
"eye_right_eyelid_lower_2": { "x": 57.86, "y": 136.13 }, "eye_right_eyeball_center": { "x":
62.39, "y": 133.52 }, "eyebrow_right_corner_right": { "x": 45.44, "y": 124.85 }, "eyebrow_
right_upper_2": { "x": 50.34, "y": 118.84 }, "eyebrow_right_upper_3": { "x": 56.93, "y": 117.58 }
, "eyebrow_right_upper_4": { "x": 63.4, "y": 118.4 }, "eyebrow_right_corner_left": { "x": 69.55,
"y": 122.35 }, "eyebrow_right_lower_3": { "x": 63.31, "y": 122.64 }, "eyebrow_right_lower_2":
{ "x": 57.22, "y": 122.76 }, "eyebrow_right_lower_1": { "x": 51.2, "y": 123.64 }, "eye_left_c
orner_right": { "x": 93.13, "y": 132.61 }, "eye_left_eyelid_upper_2": { "x": 96.34, "y": 129.04 },
"eye_left_eyelid_upper_4": { "x": 100.29, "y": 127.74 }, "eye_left_eyelid_upper_6": { "x": 104.52,
"y": 127.83 }, "eye_left_corner_left": { "x": 108.63, "y": 129.88 }, "eye_left_eyelid_lower_6":
{ "x": 105.2, "y": 131.28 }, "eye_left_eyelid_lower_4": { "x": 101.24, "y": 132.29 }, "eye_lef
t_eyelid_lower_2": { "x": 97.1, "y": 132.55 }, "eye_left_eyeball_center": { "x": 100.54, "y": 129.
79 }, "eyebrow_left_corner_right": { "x": 90.87, "y": 121.61 }, "eyebrow_left_upper_2": { "x":
96.07, "y": 116.47 }, "eyebrow_left_upper_3": { "x": 101.97, "y": 114.28 }, "eyebrow_left_upper_4"
: { "x": 108.55, "y": 113.94 }, "eyebrow_left_corner_left": { "x": 114.28, "y": 118.94 }, "eyebr
ow_left_lower_3": { "x": 108.78, "y": 118.93 }, "eyebrow_left_lower_2": { "x": 102.9, "y": 119.49 },
"eyebrow_left_lower_1": { "x": 97.04, "y": 120.66 }, "nose_right_contour_1": { "x": 76.06, "y":
134.79 }, "nose_right_contour_2": { "x": 74.9, "y": 142.66 }, "nose_right_contour_3": { "x": 73.
79, "y": 150.49 }, "nose_right_contour_4": { "x": 70.72, "y": 158.93 }, "nose_right_contour_6":
{ "x": 77.66, "y": 160.41 }, "nose_left_contour_6": { "x": 92.13, "y": 159.04 }, "nose_left_conto
ur_4": { "x": 97.49, "y": 156.25 }, "nose_left_contour_3": { "x": 93.15, "y": 148.51 }, "nose_lef
t_contour_2": { "x": 90.26, "y": 141.06 }, "nose_left_contour_1": { "x": 87.39, "y": 133.65 }, "no
se_tip": { "x": 85.25, "y": 155.76 }, "mouth_corner_right_outer": { "x": 67.23, "y": 172.68 }, "mo
uth_lip_upper_outer_3": { "x": 76.65, "y": 170.57 }, "mouth_lip_upper_outer_6": { "x": 85.6, "y":
169.93 }, "mouth_lip_upper_outer_9": { "x": 93.81, "y": 168.66 }, "mouth_corner_left_outer": { "x"
: 101.41, "y": 169.23 }, "mouth_lip_lower_outer_9": { "x": 96.02, "y": 176.86 }, "mouth_lip_lower_
outer_6": { "x": 87.07, "y": 180.42 }, "mouth_lip_lower_outer_3": { "x": 76.5, "y": 178.75 }, "mou
th_lip_upper_inner_3": { "x": 76.87, "y": 172.37 }, "mouth_lip_upper_inner_6": { "x": 85.87, "y":
172.12 }, "mouth_lip_upper_inner_9": { "x": 93.97, "y": 170.48 }, "mouth_lip_lower_inner_9": {
"x": 94.27, "y": 173.81 }, "mouth_lip_lower_inner_6": { "x": 86.45, "y": 176.01 }, "mouth_lip_l
ower_inner_3": { "x": 77.4, "y": 175.6 }, "cheek_right_2": { "x": 32.54, "y": 142.76 }, "cheek_r
ight_4": { "x": 35.73, "y": 157.36 }, "cheek_right_6": { "x": 40.79, "y": 172.17 }, "cheek_right
_8": { "x": 51.25, "y": 185.77 }, "cheek_right_10": { "x": 66.12, "y": 195.51 }, "chin_1": { "x":
81.12, "y": 200.23 }, "chin_3": { "x": 95.6, "y": 197.66 }, "cheek_left_10": { "x": 107, "y":
187.2 }, "cheek_left_8": { "x": 115.79, "y": 174.06 }, "cheek_left_6": { "x": 119.94, "y":
160.41 }, "cheek_left_4": { "x": 121, "y": 146.91 }, "cheek_left_2": { "x": 120.94, "y": 133.6 },
"eyebrow_right_upper_1": { "x": 45.19, "y": 123.14 }, "eyebrow_right_upper_5": { "x": 69.47, "y"
: 120.23 }, "eyebrow_left_upper_1": { "x": 90.45, "y": 119.31 }, "eyebrow_left_upper_5": { "x":
114.14, "y": 117.36 }, "eye_right_eyelid_upper_1": { "x": 55.53, "y": 133.66 }, "eye_right_ey
elid_upper_3": { "x": 59.77, "y": 131.68 }, "eye_right_eyelid_upper_5": { "x": 64.2, "y": 131.28 },
"eye_right_eyelid_upper_7": { "x": 68.28, "y": 132.99 }, "eye_right_eyelid_lower_7": { "x": 68.09,
"y": 135.3 }, "eye_right_eyelid_lower_5": { "x": 64.33, "y": 136.24 }, "eye_right_eyelid_lower_3":
{ "x": 60.03, "y": 136.49 }, "eye_right_eyelid_lower_1": { "x": 55.75, "y": 135.79 }, "eye_right_
eyeball_right": { "x": 58.72, "y": 134.1 }, "eye_right_eyeball_left": { "x": 65.72, "y": 133.6 },
"eye_left_eyelid_upper_1": { "x": 94.44, "y": 130.55 }, "eye_left_eyelid_upper_3": { "x": 98.16,
"y": 128.15 }, "eye_left_eyelid_upper_5": { "x": 102.44, "y": 127.55 }, "eye_left_eyelid_upper_7
": { "x": 106.7, "y": 128.58 }, "eye_left_eyelid_lower_7": { "x": 106.85, "y": 130.65 }, "eye_l
eft_eyelid_lower_5": { "x": 103.28, "y": 132.02 }, "eye_left_eyelid_lower_3": { "x": 99.17, "y"
: 132.65 }, "eye_left_eyelid_lower_1": { "x": 95.15, "y": 132.56 }, "eye_left_eyeball_right":
{ "x": 97.24, "y": 130.52 }, "eye_left_eyeball_left": { "x": 103.95, "y": 129.67 }, "nose_br
idge_1": { "x": 81.94, "y": 134.24 }, "nose_bridge_2": { "x": 83.08, "y": 141.89 }, "nose_brid
ge_3": { "x": 84.29, "y": 149.66 }, "nose_right_contour_5": { "x": 74.56, "y": 161.68 }, "nos
e_right_contour_7": { "x": 77.06, "y": 158.52 }, "nose_left_contour_7": { "x": 92.21, "y": 157.
05 }, "nose_left_contour_5": { "x": 94.67, "y": 159.82 }, "nose_middle_contour": { "x": 85.35,
"y": 163.03 }, "mouth_corner_right_inner": { "x": 68.55, "y": 172.8 }, "mouth_corner_left_inner
": { "x": 100.4, "y": 169.56 }, "mouth_lip_upper_outer_1": { "x": 70.25, "y": 171.58 }, "mouth_l
ip_upper_outer_2": { "x": 73.42, "y": 170.96 }, "mouth_lip_upper_outer_4": { "x": 79.66, "y":
169.94 }, "mouth_lip_upper_outer_5": { "x": 82.54, "y": 169.79 }, "mouth_lip_upper_outer_7":
{ "x": 88.39, "y": 169.16 }, "mouth_lip_upper_outer_8": { "x": 91.02, "y": 168.74 }, "mouth_l
ip_upper_outer_10": { "x": 96.49, "y": 168.52 }, "mouth_lip_upper_outer_11": { "x": 99.01, "y":
168.64 }, "mouth_lip_lower_outer_11": { "x": 100.04, "y": 172.11 }, "mouth_lip_lower_outer_10":
{ "x": 98.33, "y": 174.75 }, "mouth_lip_lower_outer_8": { "x": 93.52, "y": 178.89 }, "mouth_lip_
lower_outer_7": { "x": 90.48, "y": 180.17 }, "mouth_lip_lower_outer_5": { "x": 83.41, "y": 180.88 },
"mouth_lip_lower_outer_4": { "x": 79.76, "y": 180.32 }, "mouth_lip_lower_outer_2": { "x": 73.07,
"y": 177.29 }, "mouth_lip_lower_outer_1": { "x": 70.05, "y": 175.12 }, "mouth_lip_upper_inner_1":
{ "x": 70.62, "y": 172.43 }, "mouth_lip_upper_inner_2": { "x": 73.67, "y": 172.31 }, "mouth_lip_
upper_inner_4": { "x": 79.9, "y": 172.08 }, "mouth_lip_upper_inner_5": { "x": 82.79, "y": 171.97 },
"mouth_lip_upper_inner_7": { "x": 88.55, "y": 171.27 }, "mouth_lip_upper_inner_8": { "x": 91.2,
"y": 170.78 }, "mouth_lip_upper_inner_10": { "x": 96.53, "y": 169.86 }, "mouth_lip_upper_inner_11"
: { "x": 98.81, "y": 169.52 }, "mouth_lip_lower_inner_11": { "x": 99.1, "y": 171.05 }, "mouth_lip
_lower_inner_10": { "x": 96.9, "y": 172.53 }, "mouth_lip_lower_inner_8": { "x": 91.76, "y": 174.86 }
, "mouth_lip_lower_inner_7": { "x": 89.21, "y": 175.55 }, "mouth_lip_lower_inner_5": { "x": 83.42,
"y": 176.18 }, "mouth_lip_lower_inner_4": { "x": 80.45, "y": 176.03 }, "mouth_lip_lower_inner_2":
{ "x": 73.9, "y": 174.92 }, "mouth_lip_lower_inner_1": { "x": 70.65, "y": 173.95 } } } ] } }
姿态角分为Pitch、Roll、Yaw,用于表示人脸在空间三维坐标系内的角度,常用于判断识别角度的界限值。 各角度阈值如下:
各角度范围示意图如下:
72个关键点示意图
对应landmark72个点的顺序,序号从0-71,且每个关键点有对应的英文命名作为参数名; 关键点名称对应关系如下图
150个关键点示意图
对应landmark150个点的顺序,序号从0-149,且每个关键点有对应的英文命名作为参数名; 关键点名称对应关系如下图
201个关键点示意图
对应landmark201个点的顺序,序号从0-200,且每个关键点有对应的英文命名作为参数名; 关键点名称对应关系如下图