人脸关键点检测
如果您对文档内容有任何疑问,可以通过以下几种方式联系我们:
能力介绍
支持人脸 72关键点、150关键点、201 关键点检测,关键点包括人脸、眼睛、眉毛、嘴唇以及鼻子轮廓等,此服务具有如下三个业务功能:
- 人脸五官精准定位:支持眉毛、眼睛、鼻子、嘴、腮位置的精准定位
- 人脸轮廓精准定位:支持单人脸/多人脸的精准定位
- 人脸角度判断:对图片中的人脸进行多种姿态角度判断
在线调试
您可以在 示例代码中心 中调试该接口,可进行签名验证、查看在线调用的请求内容和返回结果、示例代码的自动生成。
调用方式
请求URL数据格式
向API服务地址使用POST发送请求,必须在URL中带上参数access_token,可通过后台的API Key和Secret Key生成,具体方式请参考“Access Token获取”。
示例代码
1#!/bin/bash
2curl -i -k 'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=【百度云应用的AK】&client_secret=【百度云应用的SK】'
1<?php
2function request_post($url = '', $param = '') {
3 if (empty($url) || empty($param)) {
4 return false;
5 }
6
7 $postUrl = $url;
8 $curlPost = $param;
9 $curl = curl_init();//初始化curl
10 curl_setopt($curl, CURLOPT_URL,$postUrl);//抓取指定网页
11 curl_setopt($curl, CURLOPT_HEADER, 0);//设置header
12 curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
13 curl_setopt($curl, CURLOPT_POST, 1);//post提交方式
14 curl_setopt($curl, CURLOPT_POSTFIELDS, $curlPost);
15 $data = curl_exec($curl);//运行curl
16 curl_close($curl);
17
18 return $data;
19 }
20
21 $url = 'https://aip.baidubce.com/oauth/2.0/token';
22 $post_data['grant_type'] = 'client_credentials';
23 $post_data['client_id'] = '你的 Api Key';
24 $post_data['client_secret'] = '你的 Secret Key';
25 $o = "";
26 foreach ( $post_data as $k => $v )
27 {
28 $o.= "$k=" . urlencode( $v ). "&" ;
29 }
30 $post_data = substr($o,0,-1);
31
32 $res = request_post($url, $post_data);
33
34 var_dump($res);
35
36?>
1package com.baidu.ai.aip.auth;
2
3import org.json.JSONObject;
4
5import java.io.BufferedReader;
6import java.io.InputStreamReader;
7import java.net.HttpURLConnection;
8import java.net.URL;
9import java.util.List;
10import java.util.Map;
11
12/**
13 * 获取token类
14 */
15public class AuthService {
16
17 /**
18 * 获取权限token
19 * @return 返回示例:
20 * {
21 * "access_token": "24.460da4889caad24cccdb1fea17221975.2592000.1491995545.282335-1234567",
22 * "expires_in": 2592000
23 * }
24 */
25 public static String getAuth() {
26 // 官网获取的 API Key 更新为你注册的
27 String clientId = "百度云应用的AK";
28 // 官网获取的 Secret Key 更新为你注册的
29 String clientSecret = "百度云应用的SK";
30 return getAuth(clientId, clientSecret);
31 }
32
33 /**
34 * 获取API访问token
35 * 该token有一定的有效期,需要自行管理,当失效时需重新获取.
36 * @param ak - 百度云官网获取的 API Key
37 * @param sk - 百度云官网获取的 Securet Key
38 * @return assess_token 示例:
39 * "24.460da4889caad24cccdb1fea17221975.2592000.1491995545.282335-1234567"
40 */
41 public static String getAuth(String ak, String sk) {
42 // 获取token地址
43 String authHost = "https://aip.baidubce.com/oauth/2.0/token?";
44 String getAccessTokenUrl = authHost
45 // 1. grant_type为固定参数
46 + "grant_type=client_credentials"
47 // 2. 官网获取的 API Key
48 + "&client_id=" + ak
49 // 3. 官网获取的 Secret Key
50 + "&client_secret=" + sk;
51 try {
52 URL realUrl = new URL(getAccessTokenUrl);
53 // 打开和URL之间的连接
54 HttpURLConnection connection = (HttpURLConnection) realUrl.openConnection();
55 connection.setRequestMethod("GET");
56 connection.connect();
57 // 获取所有响应头字段
58 Map<String, List<String>> map = connection.getHeaderFields();
59 // 遍历所有的响应头字段
60 for (String key : map.keySet()) {
61 System.err.println(key + "--->" + map.get(key));
62 }
63 // 定义 BufferedReader输入流来读取URL的响应
64 BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
65 String result = "";
66 String line;
67 while ((line = in.readLine()) != null) {
68 result += line;
69 }
70 /**
71 * 返回结果示例
72 */
73 System.err.println("result:" + result);
74 JSONObject jsonObject = new JSONObject(result);
75 String access_token = jsonObject.getString("access_token");
76 return access_token;
77 } catch (Exception e) {
78 System.err.printf("获取token失败!");
79 e.printStackTrace(System.err);
80 }
81 return null;
82 }
83
84}
1# encoding:utf-8
2import requests
3
4# client_id 为官网获取的AK, client_secret 为官网获取的SK
5host = 'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=【官网获取的AK】&client_secret=【官网获取的SK】'
6response = requests.get(host)
7if response:
8 print(response.json())
1#include <iostream>
2#include <curl/curl.h>
3#include <json/json.h>
4#include "access_token.h"
5// libcurl库下载链接:https://curl.haxx.se/download.html
6// jsoncpp库下载链接:https://github.com/open-source-parsers/jsoncpp/
7// 获取access_token所需要的url
8const std::string access_token_url = "https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials";
9// 回调函数获取到的access_token存放变量
10// static std::string access_token_result;
11/**
12 * curl发送http请求调用的回调函数,回调函数中对返回的json格式的body进行了解析,解析结果储存在result中
13 * @param 参数定义见libcurl库文档
14 * @return 返回值定义见libcurl库文档
15 */
16static size_t callback(void *ptr, size_t size, size_t nmemb, void *stream) {
17 // 获取到的body存放在ptr中,先将其转换为string格式
18 std::string s((char *) ptr, size * nmemb);
19 // 开始获取json中的access token项目
20 Json::Reader reader;
21 Json::Value root;
22 // 使用boost库解析json
23 reader.parse(s,root);
24 std::string* access_token_result = static_cast<std::string*>(stream);
25 *access_token_result = root["access_token"].asString();
26 return size * nmemb;
27}
28
29/**
30 * 用以获取access_token的函数,使用时需要先在百度云控制台申请相应功能的应用,获得对应的API Key和Secret Key
31 * @param access_token 获取得到的access token,调用函数时需传入该参数
32 * @param AK 应用的API key
33 * @param SK 应用的Secret key
34 * @return 返回0代表获取access token成功,其他返回值代表获取失败
35 */
36int get_access_token(std::string &access_token, const std::string &AK, const std::string &SK) {
37 CURL *curl;
38 CURLcode result_code;
39 int error_code = 0;
40 curl = curl_easy_init();
41 if (curl) {
42 std::string url = access_token_url + "&client_id=" + AK + "&client_secret=" + SK;
43 curl_easy_setopt(curl, CURLOPT_URL, url.data());
44 curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
45 curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
46 std::string access_token_result;
47 curl_easy_setopt(curl, CURLOPT_WRITEDATA, &access_token_result);
48 curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, callback);
49 result_code = curl_easy_perform(curl);
50 if (result_code != CURLE_OK) {
51 fprintf(stderr, "curl_easy_perform() failed: %s\n",
52 curl_easy_strerror(result_code));
53 return 1;
54 }
55 access_token = access_token_result;
56 curl_easy_cleanup(curl);
57 error_code = 0;
58 } else {
59 fprintf(stderr, "curl_easy_init() failed.");
60 error_code = 1;
61 }
62 return error_code;
63}
1using System;
2using System.Collections.Generic;
3using System.Net.Http;
4
5namespace com.baidu.ai
6{
7 public static class AccessToken
8
9 {
10 // 调用getAccessToken()获取的 access_token建议根据expires_in 时间 设置缓存
11 // 返回token示例
12 public static String TOKEN = "24.adda70c11b9786206253ddb70affdc46.2592000.1493524354.282335-1234567";
13
14 // 百度云中开通对应服务应用的 API Key 建议开通应用的时候多选服务
15 private static String clientId = "百度云应用的AK";
16 // 百度云中开通对应服务应用的 Secret Key
17 private static String clientSecret = "百度云应用的SK";
18
19 public static String getAccessToken() {
20 String authHost = "https://aip.baidubce.com/oauth/2.0/token";
21 HttpClient client = new HttpClient();
22 List<KeyValuePair<String, String>> paraList = new List<KeyValuePair<string, string>>();
23 paraList.Add(new KeyValuePair<string, string>("grant_type", "client_credentials"));
24 paraList.Add(new KeyValuePair<string, string>("client_id", clientId));
25 paraList.Add(new KeyValuePair<string, string>("client_secret", clientSecret));
26
27 HttpResponseMessage response = client.PostAsync(authHost, new FormUrlEncodedContent(paraList)).Result;
28 String result = response.Content.ReadAsStringAsync().Result;
29 Console.WriteLine(result);
30 return result;
31 }
32 }
33}
1var https = require('https');
2var qs = require('querystring');
3
4const param = qs.stringify({
5 'grant_type': 'client_credentials',
6 'client_id': '您的 Api Key',
7 'client_secret': '您的 Secret Key'
8});
9
10https.get(
11 {
12 hostname: 'aip.baidubce.com',
13 path: '/oauth/2.0/token?' + param,
14 agent: false
15 },
16 function (res) {
17 // 在标准输出中查看运行结果
18 res.pipe(process.stdout);
19 }
20);
注意:
access_token
的有效期为30天,切记需要每30天进行定期更换,或者每次请求都拉取新token;
例如此接口,使用HTTPS POST发送:
1https://aip.baidubce.com/rest/2.0/face/v1/landmark?access_token=24.f9ba9c5341b67688ab4added8bc91dec.2592000.1485570332.282335-8574074
POST中Body的参数,按照下方请求参数说明选择即可。
提示:如果您为百度云老用户,正在使用其他非AI的服务,可以参考百度云AKSK鉴权方式发送请求,虽然请求方式和鉴权方法和本文所介绍的不同,但请求参数和返回结果一致。
请求说明
注意事项 :
- 请求体格式化:Content-Type为
application/json
,通过json
格式化请求体。 - Base64编码:请求的图片需经过
Base64编码
,图片的base64编码指将图片数据编码成一串字符串,使用该字符串代替图像地址。您可以首先得到图片的二进制,然后用Base64格式编码即可。需要注意的是,图片的base64编码是不包含图片头的,如data:image/jpg;base64,
- 图片格式:现支持PNG、JPG、JPEG、BMP,不支持GIF图片
请求示例:
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值; FACE_TOKEN: 人脸标识 |
max_face_num | 否 | uint32 | 最多处理人脸的数目. 默认值为1(仅检测图片中面积最大的那个人脸) 最大值10 |
face_field | 否 | string | 包括age,gender,landmark4,landmark72,landmark150,landmark201信息,用逗号分隔. 默认只返回face_token、人脸框、概率和旋转角度 |
示例代码 :
提示一:使用示例代码前,请记得替换其中的示例Token、图片地址或Base64信息。
提示二:部分语言依赖的类或库,请在代码注释中查看下载地址。
1# encoding:utf-8
2
3import requests
4import json, base64
5
6'''
7人脸检测与关键点检测
8'''
9
10request_url = "https://aip.baidubce.com/rest/2.0/face/v1/landmark"
11filename = '[输入图片路径]'
12file = open(filename, 'rb')
13image = file.read()
14file.close()
15img_base64 = base64.b64encode(image)
16
17access_token = '[调用鉴权接口获取的token]'
18request_url = request_url + "?access_token=" + access_token
19headers = {'content-type': 'application/json'}
20
21req_data = json.dumps({'image': img_base64.decode(), 'image_type': 'BASE64', 'face_field': 'landmark150'})
22response = requests.post(request_url, data=req_data, headers=headers)
23if response:
24 print (response.json())
返回说明
返回参数
- 72点关键点返回结果
字段 | 必选 | 类型 | 说明 |
---|---|---|---|
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时返回 |
- 150点关键点返回结果
字段 | 必选 | 类型 | 说明 |
---|---|---|---|
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 | 否 | object | 150个特征点位置 face_field包含landmark150时返回 |
- 201点关键点返回结果
字段 | 必选 | 类型 | 说明 |
---|---|---|---|
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 | 否 | object | 201个特征点位置 face_field包含landmark201时返回 |
-
72点关键点返回示例
JSON1{ 2 "error_code": 0, 3 "error_msg": "SUCCESS", 4 "log_id": 1476521144, 5 "timestamp": 1743659819, 6 "cached": 0, 7 "result": { 8 "face_num": 1, 9 "face_list": [ 10 { 11 "face_token": "3e2d00fe72627db64f987e1c09978581", 12 "location": { 13 "left": 81.3, 14 "top": 204.6, 15 "width": 164, 16 "height": 150, 17 "rotation": 0 18 }, 19 "face_probability": 1, 20 "angle": { 21 "yaw": -4.81, 22 "pitch": 22.92, 23 "roll": -0.13 24 }, 25 "landmark72": [ 26 { 27 "x": 80.98, 28 "y": 223 29 }, 30 { 31 "x": 82.93, 32 "y": 247.92 33 }, 34 { 35 "x": 88.63, 36 "y": 272.79 37 }, 38 { 39 "x": 97.12, 40 "y": 297.57 41 }, 42 { 43 "x": 113.36, 44 "y": 322.46 45 }, 46 { 47 "x": 136.49, 48 "y": 345.98 49 }, 50 { 51 "x": 161.76, 52 "y": 355.2 53 }, 54 { 55 "x": 187.14, 56 "y": 345.5 57 }, 58 { 59 "x": 210.67, 60 "y": 322.32 61 }, 62 { 63 "x": 227.7, 64 "y": 297.97 65 }, 66 { 67 "x": 236.96, 68 "y": 273.21 69 }, 70 { 71 "x": 242.89, 72 "y": 248.37 73 }, 74 { 75 "x": 245.55, 76 "y": 223.46 77 }, 78 { 79 "x": 102.66, 80 "y": 236.55 81 }, 82 { 83 "x": 111.68, 84 "y": 231.81 85 }, 86 { 87 "x": 121.33, 88 "y": 230.8 89 }, 90 { 91 "x": 130.88, 92 "y": 233.37 93 }, 94 { 95 "x": 138.74, 96 "y": 242.21 97 }, 98 { 99 "x": 129.83, 100 "y": 243.32 101 }, 102 { 103 "x": 119.54, 104 "y": 244.11 105 }, 106 { 107 "x": 109.87, 108 "y": 241.24 109 }, 110 { 111 "x": 123.76, 112 "y": 236.71 113 }, 114 { 115 "x": 90.16, 116 "y": 213.62 117 }, 118 { 119 "x": 102.93, 120 "y": 204.62 121 }, 122 { 123 "x": 116.79, 124 "y": 205.27 125 }, 126 { 127 "x": 129.74, 128 "y": 208.66 129 }, 130 { 131 "x": 141.81, 132 "y": 217.88 133 }, 134 { 135 "x": 128.49, 136 "y": 216.39 137 }, 138 { 139 "x": 115.65, 140 "y": 213.95 141 }, 142 { 143 "x": 102.71, 144 "y": 212.46 145 }, 146 { 147 "x": 186.15, 148 "y": 242.42 149 }, 150 { 151 "x": 194.05, 152 "y": 233.94 153 }, 154 { 155 "x": 203.41, 156 "y": 230.99 157 }, 158 { 159 "x": 213.23, 160 "y": 231.92 161 }, 162 { 163 "x": 221.99, 164 "y": 236.79 165 }, 166 { 167 "x": 215.03, 168 "y": 241.68 169 }, 170 { 171 "x": 205.47, 172 "y": 244.4 173 }, 174 { 175 "x": 195.19, 176 "y": 243.54 177 }, 178 { 179 "x": 202.79, 180 "y": 236.93 181 }, 182 { 183 "x": 181.73, 184 "y": 217.62 185 }, 186 { 187 "x": 193.91, 188 "y": 208.28 189 }, 190 { 191 "x": 206.73, 192 "y": 205.08 193 }, 194 { 195 "x": 221.08, 196 "y": 204.42 197 }, 198 { 199 "x": 234.11, 200 "y": 213.37 201 }, 202 { 203 "x": 221.24, 204 "y": 211.96 205 }, 206 { 207 "x": 208.16, 208 "y": 213.9 209 }, 210 { 211 "x": 195.2, 212 "y": 216.27 213 }, 214 { 215 "x": 151.27, 216 "y": 243.53 217 }, 218 { 219 "x": 148.34, 220 "y": 259.64 221 }, 222 { 223 "x": 145.44, 224 "y": 276.05 225 }, 226 { 227 "x": 140.61, 228 "y": 291.71 229 }, 230 { 231 "x": 150.28, 232 "y": 294.71 233 }, 234 { 235 "x": 173.61, 236 "y": 294.6 237 }, 238 { 239 "x": 183.39, 240 "y": 292.01 241 }, 242 { 243 "x": 178.73, 244 "y": 276.29 245 }, 246 { 247 "x": 176.04, 248 "y": 259.83 249 }, 250 { 251 "x": 173.38, 252 "y": 243.62 253 }, 254 { 255 "x": 161.73, 256 "y": 287.67 257 }, 258 { 259 "x": 133.06, 260 "y": 313.46 261 }, 262 { 263 "x": 147.86, 264 "y": 312.64 265 }, 266 { 267 "x": 161.28, 268 "y": 313.43 269 }, 270 { 271 "x": 175.04, 272 "y": 313.08 273 }, 274 { 275 "x": 189.28, 276 "y": 313.96 277 }, 278 { 279 "x": 177.04, 280 "y": 325.97 281 }, 282 { 283 "x": 161.14, 284 "y": 330.9 285 }, 286 { 287 "x": 144.91, 288 "y": 325.94 289 }, 290 { 291 "x": 147.7, 292 "y": 317.36 293 }, 294 { 295 "x": 161.33, 296 "y": 319.51 297 }, 298 { 299 "x": 174.9, 300 "y": 317.73 301 }, 302 { 303 "x": 174.73, 304 "y": 318.57 305 }, 306 { 307 "x": 161.19, 308 "y": 320.12 309 }, 310 { 311 "x": 147.56, 312 "y": 318.51 313 } 314 ] 315 } 316 ] 317 } 318}
-
150点关键点返回示例
JSON1{ 2 "error_code": 0, 3 "error_msg": "SUCCESS", 4 "log_id": 3069319197, 5 "timestamp": 1584341469, 6 "cached": 0, 7 "result": { 8 "face_num": 1, 9 "face_list": [ 10 { 11 "face_token": "46c7fb0776721b391cc51c574095e2cd", 12 "location": { 13 "left": 30.95, 14 "top": 121.14, 15 "width": 88, 16 "height": 84, 17 "rotation": -5 18 }, 19 "face_probability": 1, 20 "angle": { 21 "yaw": -2.64, 22 "pitch": 11.24, 23 "roll": -7.75 24 }, 25 "landmark150": { 26 "cheek_right_1": { 27 "x": 31.09, 28 "y": 135.51 29 }, 30 "cheek_right_3": { 31 "x": 33.85, 32 "y": 150.02 33 }, 34 "cheek_right_5": { 35 "x": 37.83, 36 "y": 164.53 37 }, 38 "cheek_right_7": { 39 "x": 44.83, 40 "y": 178.83 41 }, 42 "cheek_right_9": { 43 "x": 58.79, 44 "y": 191.43 45 }, 46 "cheek_right_11": { 47 "x": 73.89, 48 "y": 198.59 49 }, 50 "chin_2": { 51 "x": 88.53, 52 "y": 199.96 53 }, 54 "cheek_left_11": { 55 "x": 101.43, 56 "y": 193.34 57 }, 58 "cheek_left_9": { 59 "x": 112.07, 60 "y": 180.59 61 }, 62 "cheek_left_7": { 63 "x": 118.56, 64 "y": 167.04 65 }, 66 "cheek_left_5": { 67 "x": 120.58, 68 "y": 153.53 69 }, 70 "cheek_left_3": { 71 "x": 121.08, 72 "y": 140.28 73 }, 74 "cheek_left_1": { 75 "x": 120.61, 76 "y": 127.1 77 }, 78 "eye_right_corner_right": { 79 "x": 53.63, 80 "y": 135.28 81 }, 82 "eye_right_eyelid_upper_2": { 83 "x": 57.74, 84 "y": 132.45 85 }, 86 "eye_right_eyelid_upper_4": { 87 "x": 62.02, 88 "y": 131.31 89 }, 90 "eye_right_eyelid_upper_6": { 91 "x": 66.21, 92 "y": 131.8 93 }, 94 "eye_right_corner_left": { 95 "x": 69.98, 96 "y": 134.82 97 }, 98 "eye_right_eyelid_lower_6": { 99 "x": 66.31, 100 "y": 135.75 101 }, 102 "eye_right_eyelid_lower_4": { 103 "x": 62.27, 104 "y": 136.34 105 }, 106 "eye_right_eyelid_lower_2": { 107 "x": 57.86, 108 "y": 136.13 109 }, 110 "eye_right_eyeball_center": { 111 "x": 62.39, 112 "y": 133.52 113 }, 114 "eyebrow_right_corner_right": { 115 "x": 45.44, 116 "y": 124.85 117 }, 118 "eyebrow_right_upper_2": { 119 "x": 50.34, 120 "y": 118.84 121 }, 122 "eyebrow_right_upper_3": { 123 "x": 56.93, 124 "y": 117.58 125 }, 126 "eyebrow_right_upper_4": { 127 "x": 63.4, 128 "y": 118.4 129 }, 130 "eyebrow_right_corner_left": { 131 "x": 69.55, 132 "y": 122.35 133 }, 134 "eyebrow_right_lower_3": { 135 "x": 63.31, 136 "y": 122.64 137 }, 138 "eyebrow_right_lower_2": { 139 "x": 57.22, 140 "y": 122.76 141 }, 142 "eyebrow_right_lower_1": { 143 "x": 51.2, 144 "y": 123.64 145 }, 146 "eye_left_corner_right": { 147 "x": 93.13, 148 "y": 132.61 149 }, 150 "eye_left_eyelid_upper_2": { 151 "x": 96.34, 152 "y": 129.04 153 }, 154 "eye_left_eyelid_upper_4": { 155 "x": 100.29, 156 "y": 127.74 157 }, 158 "eye_left_eyelid_upper_6": { 159 "x": 104.52, 160 "y": 127.83 161 }, 162 "eye_left_corner_left": { 163 "x": 108.63, 164 "y": 129.88 165 }, 166 "eye_left_eyelid_lower_6": { 167 "x": 105.2, 168 "y": 131.28 169 }, 170 "eye_left_eyelid_lower_4": { 171 "x": 101.24, 172 "y": 132.29 173 }, 174 "eye_left_eyelid_lower_2": { 175 "x": 97.1, 176 "y": 132.55 177 }, 178 "eye_left_eyeball_center": { 179 "x": 100.54, 180 "y": 129.79 181 }, 182 "eyebrow_left_corner_right": { 183 "x": 90.87, 184 "y": 121.61 185 }, 186 "eyebrow_left_upper_2": { 187 "x": 96.07, 188 "y": 116.47 189 }, 190 "eyebrow_left_upper_3": { 191 "x": 101.97, 192 "y": 114.28 193 }, 194 "eyebrow_left_upper_4": { 195 "x": 108.55, 196 "y": 113.94 197 }, 198 "eyebrow_left_corner_left": { 199 "x": 114.28, 200 "y": 118.94 201 }, 202 "eyebrow_left_lower_3": { 203 "x": 108.78, 204 "y": 118.93 205 }, 206 "eyebrow_left_lower_2": { 207 "x": 102.9, 208 "y": 119.49 209 }, 210 "eyebrow_left_lower_1": { 211 "x": 97.04, 212 "y": 120.66 213 }, 214 "nose_right_contour_1": { 215 "x": 76.06, 216 "y": 134.79 217 }, 218 "nose_right_contour_2": { 219 "x": 74.9, 220 "y": 142.66 221 }, 222 "nose_right_contour_3": { 223 "x": 73.79, 224 "y": 150.49 225 }, 226 "nose_right_contour_4": { 227 "x": 70.72, 228 "y": 158.93 229 }, 230 "nose_right_contour_6": { 231 "x": 77.66, 232 "y": 160.41 233 }, 234 "nose_left_contour_6": { 235 "x": 92.13, 236 "y": 159.04 237 }, 238 "nose_left_contour_4": { 239 "x": 97.49, 240 "y": 156.25 241 }, 242 "nose_left_contour_3": { 243 "x": 93.15, 244 "y": 148.51 245 }, 246 "nose_left_contour_2": { 247 "x": 90.26, 248 "y": 141.06 249 }, 250 "nose_left_contour_1": { 251 "x": 87.39, 252 "y": 133.65 253 }, 254 "nose_tip": { 255 "x": 85.25, 256 "y": 155.76 257 }, 258 "mouth_corner_right_outer": { 259 "x": 67.23, 260 "y": 172.68 261 }, 262 "mouth_lip_upper_outer_3": { 263 "x": 76.65, 264 "y": 170.57 265 }, 266 "mouth_lip_upper_outer_6": { 267 "x": 85.6, 268 "y": 169.93 269 }, 270 "mouth_lip_upper_outer_9": { 271 "x": 93.81, 272 "y": 168.66 273 }, 274 "mouth_corner_left_outer": { 275 "x": 101.41, 276 "y": 169.23 277 }, 278 "mouth_lip_lower_outer_9": { 279 "x": 96.02, 280 "y": 176.86 281 }, 282 "mouth_lip_lower_outer_6": { 283 "x": 87.07, 284 "y": 180.42 285 }, 286 "mouth_lip_lower_outer_3": { 287 "x": 76.5, 288 "y": 178.75 289 }, 290 "mouth_lip_upper_inner_3": { 291 "x": 76.87, 292 "y": 172.37 293 }, 294 "mouth_lip_upper_inner_6": { 295 "x": 85.87, 296 "y": 172.12 297 }, 298 "mouth_lip_upper_inner_9": { 299 "x": 93.97, 300 "y": 170.48 301 }, 302 "mouth_lip_lower_inner_9": { 303 "x": 94.27, 304 "y": 173.81 305 }, 306 "mouth_lip_lower_inner_6": { 307 "x": 86.45, 308 "y": 176.01 309 }, 310 "mouth_lip_lower_inner_3": { 311 "x": 77.4, 312 "y": 175.6 313 }, 314 "cheek_right_2": { 315 "x": 32.54, 316 "y": 142.76 317 }, 318 "cheek_right_4": { 319 "x": 35.73, 320 "y": 157.36 321 }, 322 "cheek_right_6": { 323 "x": 40.79, 324 "y": 172.17 325 }, 326 "cheek_right_8": { 327 "x": 51.25, 328 "y": 185.77 329 }, 330 "cheek_right_10": { 331 "x": 66.12, 332 "y": 195.51 333 }, 334 "chin_1": { 335 "x": 81.12, 336 "y": 200.23 337 }, 338 "chin_3": { 339 "x": 95.6, 340 "y": 197.66 341 }, 342 "cheek_left_10": { 343 "x": 107, 344 "y": 187.2 345 }, 346 "cheek_left_8": { 347 "x": 115.79, 348 "y": 174.06 349 }, 350 "cheek_left_6": { 351 "x": 119.94, 352 "y": 160.41 353 }, 354 "cheek_left_4": { 355 "x": 121, 356 "y": 146.91 357 }, 358 "cheek_left_2": { 359 "x": 120.94, 360 "y": 133.6 361 }, 362 "eyebrow_right_upper_1": { 363 "x": 45.19, 364 "y": 123.14 365 }, 366 "eyebrow_right_upper_5": { 367 "x": 69.47, 368 "y": 120.23 369 }, 370 "eyebrow_left_upper_1": { 371 "x": 90.45, 372 "y": 119.31 373 }, 374 "eyebrow_left_upper_5": { 375 "x": 114.14, 376 "y": 117.36 377 }, 378 "eye_right_eyelid_upper_1": { 379 "x": 55.53, 380 "y": 133.66 381 }, 382 "eye_right_eyelid_upper_3": { 383 "x": 59.77, 384 "y": 131.68 385 }, 386 "eye_right_eyelid_upper_5": { 387 "x": 64.2, 388 "y": 131.28 389 }, 390 "eye_right_eyelid_upper_7": { 391 "x": 68.28, 392 "y": 132.99 393 }, 394 "eye_right_eyelid_lower_7": { 395 "x": 68.09, 396 "y": 135.3 397 }, 398 "eye_right_eyelid_lower_5": { 399 "x": 64.33, 400 "y": 136.24 401 }, 402 "eye_right_eyelid_lower_3": { 403 "x": 60.03, 404 "y": 136.49 405 }, 406 "eye_right_eyelid_lower_1": { 407 "x": 55.75, 408 "y": 135.79 409 }, 410 "eye_right_eyeball_right": { 411 "x": 58.72, 412 "y": 134.1 413 }, 414 "eye_right_eyeball_left": { 415 "x": 65.72, 416 "y": 133.6 417 }, 418 "eye_left_eyelid_upper_1": { 419 "x": 94.44, 420 "y": 130.55 421 }, 422 "eye_left_eyelid_upper_3": { 423 "x": 98.16, 424 "y": 128.15 425 }, 426 "eye_left_eyelid_upper_5": { 427 "x": 102.44, 428 "y": 127.55 429 }, 430 "eye_left_eyelid_upper_7": { 431 "x": 106.7, 432 "y": 128.58 433 }, 434 "eye_left_eyelid_lower_7": { 435 "x": 106.85, 436 "y": 130.65 437 }, 438 "eye_left_eyelid_lower_5": { 439 "x": 103.28, 440 "y": 132.02 441 }, 442 "eye_left_eyelid_lower_3": { 443 "x": 99.17, 444 "y": 132.65 445 }, 446 "eye_left_eyelid_lower_1": { 447 "x": 95.15, 448 "y": 132.56 449 }, 450 "eye_left_eyeball_right": { 451 "x": 97.24, 452 "y": 130.52 453 }, 454 "eye_left_eyeball_left": { 455 "x": 103.95, 456 "y": 129.67 457 }, 458 "nose_bridge_1": { 459 "x": 81.94, 460 "y": 134.24 461 }, 462 "nose_bridge_2": { 463 "x": 83.08, 464 "y": 141.89 465 }, 466 "nose_bridge_3": { 467 "x": 84.29, 468 "y": 149.66 469 }, 470 "nose_right_contour_5": { 471 "x": 74.56, 472 "y": 161.68 473 }, 474 "nose_right_contour_7": { 475 "x": 77.06, 476 "y": 158.52 477 }, 478 "nose_left_contour_7": { 479 "x": 92.21, 480 "y": 157.05 481 }, 482 "nose_left_contour_5": { 483 "x": 94.67, 484 "y": 159.82 485 }, 486 "nose_middle_contour": { 487 "x": 85.35, 488 "y": 163.03 489 }, 490 "mouth_corner_right_inner": { 491 "x": 68.55, 492 "y": 172.8 493 }, 494 "mouth_corner_left_inner": { 495 "x": 100.4, 496 "y": 169.56 497 }, 498 "mouth_lip_upper_outer_1": { 499 "x": 70.25, 500 "y": 171.58 501 }, 502 "mouth_lip_upper_outer_2": { 503 "x": 73.42, 504 "y": 170.96 505 }, 506 "mouth_lip_upper_outer_4": { 507 "x": 79.66, 508 "y": 169.94 509 }, 510 "mouth_lip_upper_outer_5": { 511 "x": 82.54, 512 "y": 169.79 513 }, 514 "mouth_lip_upper_outer_7": { 515 "x": 88.39, 516 "y": 169.16 517 }, 518 "mouth_lip_upper_outer_8": { 519 "x": 91.02, 520 "y": 168.74 521 }, 522 "mouth_lip_upper_outer_10": { 523 "x": 96.49, 524 "y": 168.52 525 }, 526 "mouth_lip_upper_outer_11": { 527 "x": 99.01, 528 "y": 168.64 529 }, 530 "mouth_lip_lower_outer_11": { 531 "x": 100.04, 532 "y": 172.11 533 }, 534 "mouth_lip_lower_outer_10": { 535 "x": 98.33, 536 "y": 174.75 537 }, 538 "mouth_lip_lower_outer_8": { 539 "x": 93.52, 540 "y": 178.89 541 }, 542 "mouth_lip_lower_outer_7": { 543 "x": 90.48, 544 "y": 180.17 545 }, 546 "mouth_lip_lower_outer_5": { 547 "x": 83.41, 548 "y": 180.88 549 }, 550 "mouth_lip_lower_outer_4": { 551 "x": 79.76, 552 "y": 180.32 553 }, 554 "mouth_lip_lower_outer_2": { 555 "x": 73.07, 556 "y": 177.29 557 }, 558 "mouth_lip_lower_outer_1": { 559 "x": 70.05, 560 "y": 175.12 561 }, 562 "mouth_lip_upper_inner_1": { 563 "x": 70.62, 564 "y": 172.43 565 }, 566 "mouth_lip_upper_inner_2": { 567 "x": 73.67, 568 "y": 172.31 569 }, 570 "mouth_lip_upper_inner_4": { 571 "x": 79.9, 572 "y": 172.08 573 }, 574 "mouth_lip_upper_inner_5": { 575 "x": 82.79, 576 "y": 171.97 577 }, 578 "mouth_lip_upper_inner_7": { 579 "x": 88.55, 580 "y": 171.27 581 }, 582 "mouth_lip_upper_inner_8": { 583 "x": 91.2, 584 "y": 170.78 585 }, 586 "mouth_lip_upper_inner_10": { 587 "x": 96.53, 588 "y": 169.86 589 }, 590 "mouth_lip_upper_inner_11": { 591 "x": 98.81, 592 "y": 169.52 593 }, 594 "mouth_lip_lower_inner_11": { 595 "x": 99.1, 596 "y": 171.05 597 }, 598 "mouth_lip_lower_inner_10": { 599 "x": 96.9, 600 "y": 172.53 601 }, 602 "mouth_lip_lower_inner_8": { 603 "x": 91.76, 604 "y": 174.86 605 }, 606 "mouth_lip_lower_inner_7": { 607 "x": 89.21, 608 "y": 175.55 609 }, 610 "mouth_lip_lower_inner_5": { 611 "x": 83.42, 612 "y": 176.18 613 }, 614 "mouth_lip_lower_inner_4": { 615 "x": 80.45, 616 "y": 176.03 617 }, 618 "mouth_lip_lower_inner_2": { 619 "x": 73.9, 620 "y": 174.92 621 }, 622 "mouth_lip_lower_inner_1": { 623 "x": 70.65, 624 "y": 173.95 625 } 626 } 627 } 628 ] 629 } 630}
- 201点关键点返回示例
JSON1{ 2 "error_code": 0, 3 "error_msg": "SUCCESS", 4 "log_id": 1928749930, 5 "timestamp": 1587886328, 6 "cached": 0, 7 "result": { 8 "face_num": 1, 9 "face_list": [ 10 { 11 "face_token": "d80fc864a9f11ca97f753b7fd6ef3092", 12 "location": { 13 "left": 148.2, 14 "top": 207.76, 15 "width": 293, 16 "height": 265, 17 "rotation": 0 18 }, 19 "face_probability": 1, 20 "angle": { 21 "yaw": 19.13, 22 "pitch": 17.13, 23 "roll": -3.5 24 }, 25 "landmark201": { 26 "cheek_right_1": { 27 "x": 42.31241607666, 28 "y": 189.65449523926 29 }, 30 "cheek_right_3": { 31 "x": 44.54296875, 32 "y": 197.21664428711 33 }, 34 "cheek_right_5": { 35 "x": 47.168300628662, 36 "y": 204.71488952637 37 }, 38 "cheek_right_7": { 39 "x": 51.103427886963, 40 "y": 212.02030944824 41 }, 42 "cheek_right_9": { 43 "x": 58.585376739502, 44 "y": 217.99108886719 45 }, 46 "cheek_right_11": { 47 "x": 66.981811523438, 48 "y": 220.88842773438 49 }, 50 "chin_2": { 51 "x": 74.937934875488, 52 "y": 221.29644775391 53 }, 54 "cheek_left_11": { 55 "x": 81.538116455078, 56 "y": 218.27543640137 57 }, 58 "cheek_left_9": { 59 "x": 86.794311523438, 60 "y": 212.35699462891 61 }, 62 "cheek_left_7": { 63 "x": 89.269142150879, 64 "y": 205.04515075684 65 }, 66 "cheek_left_5": { 67 "x": 89.34553527832, 68 "y": 198.01556396484 69 }, 70 "cheek_left_3": { 71 "x": 89.059379577637, 72 "y": 191.10192871094 73 }, 74 "cheek_left_1": { 75 "x": 88.503395080566, 76 "y": 184.33065795898 77 }, 78 "eye_right_corner_right": { 79 "x": 55.116683959961, 80 "y": 190.61100769043 81 }, 82 "eye_right_eyelid_upper_2": { 83 "x": 56.738288879395, 84 "y": 188.59680175781 85 }, 86 "eye_right_eyelid_upper_4": { 87 "x": 59.01921081543, 88 "y": 187.68321228027 89 }, 90 "eye_right_eyelid_upper_6": { 91 "x": 61.467914581299, 92 "y": 188.02760314941 93 }, 94 "eye_right_corner_left": { 95 "x": 63.568134307861, 96 "y": 189.63510131836 97 }, 98 "eye_right_eyelid_lower_6": { 99 "x": 61.694267272949, 100 "y": 190.69076538086 101 }, 102 "eye_right_eyelid_lower_4": { 103 "x": 59.454444885254, 104 "y": 191.33895874023 105 }, 106 "eye_right_eyelid_lower_2": { 107 "x": 57.118618011475, 108 "y": 191.25410461426 109 }, 110 "eye_right_eyeball_center": { 111 "x": 58.797183990479, 112 "y": 189.35336303711 113 }, 114 "eyebrow_right_corner_right": { 115 "x": 51.216777801514, 116 "y": 188.38786315918 117 }, 118 "eyebrow_right_upper_2": { 119 "x": 53.870964050293, 120 "y": 184.83016967773 121 }, 122 "eyebrow_right_upper_3": { 123 "x": 57.506542205811, 124 "y": 183.5043182373 125 }, 126 "eyebrow_right_upper_4": { 127 "x": 61.183086395264, 128 "y": 183.19314575195 129 }, 130 "eyebrow_right_corner_left": { 131 "x": 64.871238708496, 132 "y": 184.73831176758 133 }, 134 "eyebrow_right_lower_3": { 135 "x": 61.479015350342, 136 "y": 185.56793212891 137 }, 138 "eyebrow_right_lower_2": { 139 "x": 58.032566070557, 140 "y": 186.2632598877 141 }, 142 "eyebrow_right_lower_1": { 143 "x": 54.63260269165, 144 "y": 187.36543273926 145 }, 146 "eye_left_corner_right": { 147 "x": 74.069404602051, 148 "y": 187.93475341797 149 }, 150 "eye_left_eyelid_upper_2": { 151 "x": 75.66828918457, 152 "y": 186.65887451172 153 }, 154 "eye_left_eyelid_upper_4": { 155 "x": 77.592361450195, 156 "y": 186.16188049316 157 }, 158 "eye_left_eyelid_upper_6": { 159 "x": 79.586471557617, 160 "y": 186.45025634766 161 }, 162 "eye_left_corner_left": { 163 "x": 81.423141479492, 164 "y": 187.45210266113 165 }, 166 "eye_left_eyelid_lower_6": { 167 "x": 79.689315795898, 168 "y": 188.07566833496 169 }, 170 "eye_left_eyelid_lower_4": { 171 "x": 77.799751281738, 172 "y": 188.36500549316 173 }, 174 "eye_left_eyelid_lower_2": { 175 "x": 75.900672912598, 176 "y": 188.30387878418 177 }, 178 "eye_left_eyeball_center": { 179 "x": 77.943511962891, 180 "y": 187.28001403809 181 }, 182 "eyebrow_left_corner_right": { 183 "x": 72.480133056641, 184 "y": 183.96446228027 185 }, 186 "eyebrow_left_upper_2": { 187 "x": 75.453918457031, 188 "y": 181.56910705566 189 }, 190 "eyebrow_left_upper_3": { 191 "x": 78.83179473877, 192 "y": 181.00735473633 193 }, 194 "eyebrow_left_upper_4": { 195 "x": 82.155281066895, 196 "y": 181.49905395508 197 }, 198 "eyebrow_left_corner_left": { 199 "x": 84.791572570801, 200 "y": 184.30467224121 201 }, 202 "eyebrow_left_lower_3": { 203 "x": 82.042182922363, 204 "y": 184.03210449219 205 }, 206 "eyebrow_left_lower_2": { 207 "x": 79.002876281738, 208 "y": 183.73754882812 209 }, 210 "eyebrow_left_lower_1": { 211 "x": 75.751091003418, 212 "y": 183.88179016113 213 }, 214 "nose_right_contour_1": { 215 "x": 66.593109130859, 216 "y": 189.06278991699 217 }, 218 "nose_right_contour_2": { 219 "x": 66.620910644531, 220 "y": 192.60729980469 221 }, 222 "nose_right_contour_3": { 223 "x": 66.599555969238, 224 "y": 196.11846923828 225 }, 226 "nose_right_contour_4": { 227 "x": 65.618698120117, 228 "y": 200.2027130127 229 }, 230 "nose_right_contour_6": { 231 "x": 68.844802856445, 232 "y": 200.28895568848 233 }, 234 "nose_left_contour_6": { 235 "x": 74.86922454834, 236 "y": 199.59733581543 237 }, 238 "nose_left_contour_4": { 239 "x": 77.114517211914, 240 "y": 198.64364624023 241 }, 242 "nose_left_contour_3": { 243 "x": 74.99666595459, 244 "y": 194.87409973145 245 }, 246 "nose_left_contour_2": { 247 "x": 73.466331481934, 248 "y": 191.60952758789 249 }, 250 "nose_left_contour_1": { 251 "x": 71.929557800293, 252 "y": 188.32957458496 253 }, 254 "nose_tip": { 255 "x": 72.110206604004, 256 "y": 197.61848449707 257 }, 258 "mouth_corner_right_outer": { 259 "x": 64.238929748535, 260 "y": 208.59043884277 261 }, 262 "mouth_lip_upper_outer_3": { 263 "x": 68.34407043457, 264 "y": 206.58200073242 265 }, 266 "mouth_lip_upper_outer_6": { 267 "x": 72.647048950195, 268 "y": 205.95881652832 269 }, 270 "mouth_lip_upper_outer_9": { 271 "x": 76.58984375, 272 "y": 205.54756164551 273 }, 274 "mouth_corner_left_outer": { 275 "x": 80.137763977051, 276 "y": 206.63317871094 277 }, 278 "mouth_lip_lower_outer_9": { 279 "x": 77.228042602539, 280 "y": 209.13989257812 281 }, 282 "mouth_lip_lower_outer_6": { 283 "x": 73.251800537109, 284 "y": 210.38688659668 285 }, 286 "mouth_lip_lower_outer_3": { 287 "x": 68.685707092285, 288 "y": 210.19580078125 289 }, 290 "mouth_lip_upper_inner_3": { 291 "x": 68.588790893555, 292 "y": 207.86560058594 293 }, 294 "mouth_lip_upper_inner_6": { 295 "x": 72.813514709473, 296 "y": 207.4914855957 297 }, 298 "mouth_lip_upper_inner_9": { 299 "x": 76.605278015137, 300 "y": 206.88005065918 301 }, 302 "mouth_lip_lower_inner_9": { 303 "x": 76.632255554199, 304 "y": 207.44100952148 305 }, 306 "mouth_lip_lower_inner_6": { 307 "x": 72.939880371094, 308 "y": 208.07493591309 309 }, 310 "mouth_lip_lower_inner_3": { 311 "x": 68.787719726562, 312 "y": 208.41091918945 313 }, 314 "cheek_right_2": { 315 "x": 43.467124938965, 316 "y": 193.40245056152 317 }, 318 "cheek_right_4": { 319 "x": 45.808784484863, 320 "y": 200.98356628418 321 }, 322 "cheek_right_6": { 323 "x": 48.872074127197, 324 "y": 208.6109161377 325 }, 326 "cheek_right_8": { 327 "x": 54.450130462646, 328 "y": 215.4328918457 329 }, 330 "cheek_right_10": { 331 "x": 62.691562652588, 332 "y": 219.77143859863 333 }, 334 "chin_1": { 335 "x": 70.906677246094, 336 "y": 221.53775024414 337 }, 338 "chin_3": { 339 "x": 78.58708190918, 340 "y": 220.25169372559 341 }, 342 "cheek_left_10": { 343 "x": 84.438705444336, 344 "y": 215.54095458984 345 }, 346 "cheek_left_8": { 347 "x": 88.421768188477, 348 "y": 208.86682128906 349 }, 350 "cheek_left_6": { 351 "x": 89.404579162598, 352 "y": 201.58218383789 353 }, 354 "cheek_left_4": { 355 "x": 89.226097106934, 356 "y": 194.56100463867 357 }, 358 "cheek_left_2": { 359 "x": 88.776916503906, 360 "y": 187.70640563965 361 }, 362 "eyebrow_right_upper_1": { 363 "x": 51.055225372314, 364 "y": 187.41928100586 365 }, 366 "eyebrow_right_upper_5": { 367 "x": 64.620422363281, 368 "y": 183.30424499512 369 }, 370 "eyebrow_left_upper_1": { 371 "x": 72.405311584473, 372 "y": 182.5030670166 373 }, 374 "eyebrow_left_upper_5": { 375 "x": 84.738502502441, 376 "y": 183.29322814941 377 }, 378 "eye_right_eyelid_upper_1": { 379 "x": 55.766471862793, 380 "y": 189.49603271484 381 }, 382 "eye_right_eyelid_upper_3": { 383 "x": 57.783981323242, 384 "y": 187.9764251709 385 }, 386 "eye_right_eyelid_upper_5": { 387 "x": 60.291412353516, 388 "y": 187.6668548584 389 }, 390 "eye_right_eyelid_upper_7": { 391 "x": 62.610542297363, 392 "y": 188.70217895508 393 }, 394 "eye_right_eyelid_lower_7": { 395 "x": 62.647716522217, 396 "y": 190.19287109375 397 }, 398 "eye_right_eyelid_lower_5": { 399 "x": 60.609279632568, 400 "y": 191.1389465332 401 }, 402 "eye_right_eyelid_lower_3": { 403 "x": 58.271293640137, 404 "y": 191.43981933594 405 }, 406 "eye_right_eyelid_lower_1": { 407 "x": 56.100021362305, 408 "y": 190.99014282227 409 }, 410 "eye_right_eyeball_right": { 411 "x": 56.948715209961, 412 "y": 189.78875732422 413 }, 414 "eye_right_eyeball_left": { 415 "x": 60.76294708252, 416 "y": 189.30876159668 417 }, 418 "eye_left_eyelid_upper_1": { 419 "x": 74.795600891113, 420 "y": 187.22235107422 421 }, 422 "eye_left_eyelid_upper_3": { 423 "x": 76.582481384277, 424 "y": 186.30328369141 425 }, 426 "eye_left_eyelid_upper_5": { 427 "x": 78.627487182617, 428 "y": 186.19665527344 429 }, 430 "eye_left_eyelid_upper_7": { 431 "x": 80.57470703125, 432 "y": 186.87817382812 433 }, 434 "eye_left_eyelid_lower_7": { 435 "x": 80.591354370117, 436 "y": 187.83154296875 437 }, 438 "eye_left_eyelid_lower_5": { 439 "x": 78.77872467041, 440 "y": 188.32012939453 441 }, 442 "eye_left_eyelid_lower_3": { 443 "x": 76.835243225098, 444 "y": 188.42440795898 445 }, 446 "eye_left_eyelid_lower_1": { 447 "x": 74.967391967773, 448 "y": 188.18258666992 449 }, 450 "eye_left_eyeball_right": { 451 "x": 76.36678314209, 452 "y": 187.48699951172 453 }, 454 "eye_left_eyeball_left": { 455 "x": 79.485054016113, 456 "y": 187.31430053711 457 }, 458 "nose_bridge_1": { 459 "x": 69.695106506348, 460 "y": 188.73384094238 461 }, 462 "nose_bridge_2": { 463 "x": 70.618003845215, 464 "y": 192.09872436523 465 }, 466 "nose_bridge_3": { 467 "x": 71.556343078613, 468 "y": 195.47486877441 469 }, 470 "nose_right_contour_5": { 471 "x": 67.552391052246, 472 "y": 201.55177307129 473 }, 474 "nose_right_contour_7": { 475 "x": 68.642906188965, 476 "y": 199.08920288086 477 }, 478 "nose_left_contour_7": { 479 "x": 74.935028076172, 480 "y": 198.34973144531 481 }, 482 "nose_left_contour_5": { 483 "x": 75.971466064453, 484 "y": 200.47100830078 485 }, 486 "nose_middle_contour": { 487 "x": 72.127105712891, 488 "y": 201.73022460938 489 }, 490 "mouth_corner_right_inner": { 491 "x": 64.899894714355, 492 "y": 208.53944396973 493 }, 494 "mouth_corner_left_inner": { 495 "x": 79.593727111816, 496 "y": 206.72438049316 497 }, 498 "mouth_lip_upper_outer_1": { 499 "x": 65.49520111084, 500 "y": 207.76577758789 501 }, 502 "mouth_lip_upper_outer_2": { 503 "x": 66.83455657959, 504 "y": 207.09317016602 505 }, 506 "mouth_lip_upper_outer_4": { 507 "x": 69.727005004883, 508 "y": 206.0223236084 509 }, 510 "mouth_lip_upper_outer_5": { 511 "x": 71.136360168457, 512 "y": 205.85467529297 513 }, 514 "mouth_lip_upper_outer_7": { 515 "x": 74.009178161621, 516 "y": 205.50805664062 517 }, 518 "mouth_lip_upper_outer_8": { 519 "x": 75.26887512207, 520 "y": 205.34454345703 521 }, 522 "mouth_lip_upper_outer_10": { 523 "x": 77.930633544922, 524 "y": 205.73402404785 525 }, 526 "mouth_lip_upper_outer_11": { 527 "x": 79.06810760498, 528 "y": 206.10731506348 529 }, 530 "mouth_lip_lower_outer_11": { 531 "x": 79.310043334961, 532 "y": 207.62538146973 533 }, 534 "mouth_lip_lower_outer_10": { 535 "x": 78.422233581543, 536 "y": 208.49403381348 537 }, 538 "mouth_lip_lower_outer_8": { 539 "x": 76.039436340332, 540 "y": 209.91091918945 541 }, 542 "mouth_lip_lower_outer_7": { 543 "x": 74.759254455566, 544 "y": 210.31077575684 545 }, 546 "mouth_lip_lower_outer_5": { 547 "x": 71.684158325195, 548 "y": 210.71028137207 549 }, 550 "mouth_lip_lower_outer_4": { 551 "x": 70.194778442383, 552 "y": 210.64688110352 553 }, 554 "mouth_lip_lower_outer_2": { 555 "x": 67.074501037598, 556 "y": 209.91828918457 557 }, 558 "mouth_lip_lower_outer_1": { 559 "x": 65.643745422363, 560 "y": 209.32096862793 561 }, 562 "mouth_lip_upper_inner_1": { 563 "x": 65.730621337891, 564 "y": 208.26277160645 565 }, 566 "mouth_lip_upper_inner_2": { 567 "x": 67.079795837402, 568 "y": 208.03302001953 569 }, 570 "mouth_lip_upper_inner_4": { 571 "x": 70.023719787598, 572 "y": 207.62254333496 573 }, 574 "mouth_lip_upper_inner_5": { 575 "x": 71.351684570312, 576 "y": 207.49478149414 577 }, 578 "mouth_lip_upper_inner_7": { 579 "x": 74.106018066406, 580 "y": 207.1644744873 581 }, 582 "mouth_lip_upper_inner_8": { 583 "x": 75.296127319336, 584 "y": 206.98078918457 585 }, 586 "mouth_lip_upper_inner_10": { 587 "x": 77.856018066406, 588 "y": 206.71319580078 589 }, 590 "mouth_lip_upper_inner_11": { 591 "x": 78.921539306641, 592 "y": 206.64031982422 593 }, 594 "mouth_lip_lower_inner_11": { 595 "x": 78.975936889648, 596 "y": 207.04075622559 597 }, 598 "mouth_lip_lower_inner_10": { 599 "x": 77.91145324707, 600 "y": 207.22946166992 601 }, 602 "mouth_lip_lower_inner_8": { 603 "x": 75.387634277344, 604 "y": 207.6734161377 605 }, 606 "mouth_lip_lower_inner_7": { 607 "x": 74.222236633301, 608 "y": 207.86814880371 609 }, 610 "mouth_lip_lower_inner_5": { 611 "x": 71.497695922852, 612 "y": 208.21778869629 613 }, 614 "mouth_lip_lower_inner_4": { 615 "x": 70.19393157959, 616 "y": 208.31753540039 617 }, 618 "mouth_lip_lower_inner_2": { 619 "x": 67.215522766113, 620 "y": 208.55447387695 621 }, 622 "mouth_lip_lower_inner_1": { 623 "x": 65.80793762207, 624 "y": 208.67227172852 625 }, 626 "iris_left_1": { 627 "x": 58.5608253479, 628 "y": 188.5970916748 629 }, 630 "iris_left_2": { 631 "x": 58.339405059814, 632 "y": 186.68266296387 633 }, 634 "iris_left_3": { 635 "x": 57.866024017334, 636 "y": 186.83006286621 637 }, 638 "iris_left_4": { 639 "x": 57.384708404541, 640 "y": 187.18560791016 641 }, 642 "iris_left_5": { 643 "x": 57.09496307373, 644 "y": 187.73175048828 645 }, 646 "iris_left_6": { 647 "x": 57.025074005127, 648 "y": 188.2507019043 649 }, 650 "iris_left_7": { 651 "x": 57.108268737793, 652 "y": 188.8582611084 653 }, 654 "iris_left_8": { 655 "x": 57.340709686279, 656 "y": 189.41612243652 657 }, 658 "iris_left_9": { 659 "x": 57.619876861572, 660 "y": 189.85971069336 661 }, 662 "iris_left_10": { 663 "x": 57.992046356201, 664 "y": 190.19557189941 665 }, 666 "iris_left_11": { 667 "x": 58.506317138672, 668 "y": 190.3910369873 669 }, 670 "iris_left_12": { 671 "x": 59.06840133667, 672 "y": 190.31591796875 673 }, 674 "iris_left_13": { 675 "x": 59.484573364258, 676 "y": 190.00793457031 677 }, 678 "iris_left_14": { 679 "x": 59.801601409912, 680 "y": 189.56636047363 681 }, 682 "iris_left_15": { 683 "x": 59.937400817871, 684 "y": 189.02279663086 685 }, 686 "iris_left_16": { 687 "x": 59.994979858398, 688 "y": 188.47799682617 689 }, 690 "iris_left_17": { 691 "x": 59.908092498779, 692 "y": 187.91714477539 693 }, 694 "iris_left_18": { 695 "x": 59.693229675293, 696 "y": 187.42846679688 697 }, 698 "iris_left_19": { 699 "x": 59.357315063477, 700 "y": 186.98899841309 701 }, 702 "iris_left_20": { 703 "x": 58.83500289917, 704 "y": 186.74018859863 705 }, 706 "iris_right_1": { 707 "x": 77.913948059082, 708 "y": 186.52035522461 709 }, 710 "iris_right_2": { 711 "x": 77.751182556152, 712 "y": 184.79627990723 713 }, 714 "iris_right_3": { 715 "x": 77.291893005371, 716 "y": 184.87088012695 717 }, 718 "iris_right_4": { 719 "x": 76.81241607666, 720 "y": 185.17738342285 721 }, 722 "iris_right_5": { 723 "x": 76.51399230957, 724 "y": 185.63529968262 725 }, 726 "iris_right_6": { 727 "x": 76.399871826172, 728 "y": 186.14614868164 729 }, 730 "iris_right_7": { 731 "x": 76.425010681152, 732 "y": 186.71411132812 733 }, 734 "iris_right_8": { 735 "x": 76.59375, 736 "y": 187.21925354004 737 }, 738 "iris_right_9": { 739 "x": 76.89958190918, 740 "y": 187.63000488281 741 }, 742 "iris_right_10": { 743 "x": 77.306015014648, 744 "y": 187.93461608887 745 }, 746 "iris_right_11": { 747 "x": 77.76798248291, 748 "y": 188.10162353516 749 }, 750 "iris_right_12": { 751 "x": 78.355964660645, 752 "y": 188.07786560059 753 }, 754 "iris_right_13": { 755 "x": 78.838737487793, 756 "y": 187.83233642578 757 }, 758 "iris_right_14": { 759 "x": 79.188194274902, 760 "y": 187.45365905762 761 }, 762 "iris_right_15": { 763 "x": 79.389739990234, 764 "y": 186.96867370605 765 }, 766 "iris_right_16": { 767 "x": 79.451263427734, 768 "y": 186.44125366211 769 }, 770 "iris_right_17": { 771 "x": 79.35481262207, 772 "y": 185.87980651855 773 }, 774 "iris_right_18": { 775 "x": 79.112213134766, 776 "y": 185.42335510254 777 }, 778 "iris_right_19": { 779 "x": 78.747856140137, 780 "y": 185.04452514648 781 }, 782 "iris_right_20": { 783 "x": 78.234527587891, 784 "y": 184.81198120117 785 }, 786 "forehead_center": { 787 "x": 63.854957580566, 788 "y": 161.62615966797 789 }, 790 "forehead_right_1": { 791 "x": 56.716361999512, 792 "y": 162.98860168457 793 }, 794 "forehead_right_2": { 795 "x": 50.169933319092, 796 "y": 165.94499206543 797 }, 798 "forehead_right_3": { 799 "x": 45.235385894775, 800 "y": 171.05480957031 801 }, 802 "forehead_right_4": { 803 "x": 42.774684906006, 804 "y": 177.78215026855 805 }, 806 "forehead_right_5": { 807 "x": 42.371360778809, 808 "y": 185.02729797363 809 }, 810 "forehead_left_1": { 811 "x": 70.29483795166, 812 "y": 161.40893554688 813 }, 814 "forehead_left_2": { 815 "x": 76.429832458496, 816 "y": 163.07518005371 817 }, 818 "forehead_left_3": { 819 "x": 81.494247436523, 820 "y": 166.90705871582 821 }, 822 "forehead_left_4": { 823 "x": 85.017692565918, 824 "y": 172.2216796875 825 }, 826 "forehead_left_5": { 827 "x": 87.215446472168, 828 "y": 178.24891662598 829 } 830 } 831 } 832 ] 833 } 834}
人脸空间姿态角参考
姿态角分为Pitch、Roll、Yaw,用于表示人脸在空间三维坐标系内的角度,常用于判断识别角度的界限值。 各角度阈值如下:
- Pitch:三维旋转之俯仰角度,范围:[-90(上), 90(下)],推荐俯仰角绝对值不大于20度;
- Roll:平面内旋转角,范围:[-180(逆时针), 180(顺时针)],推荐旋转角绝对值不大于20度;
- Yaw:三维旋转之左右旋转角,范围:[-90(左), 90(右)],推荐旋转角绝对值不大于20度;
各角度范围示意图如下:
示意图
72个关键点示意图
对应landmark72个点的顺序,序号从0-71,且每个关键点有对应的英文命名作为参数名; 关键点名称对应关系如下图
150个关键点示意图
对应landmark150个点的顺序,序号从0-149,且每个关键点有对应的英文命名作为参数名; 关键点名称对应关系如下图
201个关键点示意图
对应landmark201个点的顺序,序号从0-200,且每个关键点有对应的英文命名作为参数名; 关键点名称对应关系如下图