人脸68关键点

服务返回信息的公共结构

参数名 类型 是否必有 说明
signature String 我们采用的数字证书签名算法是:"RSA-SHA256",签名输出类型是:"base64",首先下载图普科技的公钥证书,然后按如下步骤认证:
1、收到的JSON数据经过JSON.parse(),得到JSON对象,记为data;
2、data含两个字段:signature、json;signature是数字签名,json是真正的有效数据的字符串格式;
3、用signature对json进行签名认证,算法:RSA-SHA256,输出类型:base64,得到认证结果;
4、认证通过后,对json进行JSON.parse(),得到JSON数据,详见"json"字段说明。
json String json 字段经过JSON.parse(json)后,得到具体的结果,含:
message:与code相关的文本信息
timestamp:当前的服务器的Unix时间戳。
nonce:随机数。
json内容解析后的结构
参数名 类型 是否必有 说明
code Number 请求的状态码,参考服务公共状态码解析
message String 请求的状态信息
timestamp Number 当前的服务器的Unix时间戳
nonce Number 随机数
[taskId] Object 识别任务的结果,不同识别任务会有特定的taskId和[taskId]信息结构
... ... 其它识别及请求响应结果信息
示例
{
    "signature": "signature_from_tupu_service", 
    "json": "{\"code\":0,\"message\":\"success\",\"nonce\":\"0.5442530125172196\",\"timestamp\":1595318082309}"
}

任务结果信息

taskId

57d8cd17e64e932a20bd6d24

taskId参数
参数名称 类型 是否必需 说明
fileList Array 每张图片的识别结果
fileList参数
参数名称 类型 是否必需 说明
name String 如果上传的image参数是url,则该值是图片url;如果是以图片文件上传,则该值为文件名
keypoint Array 检测到的人脸关键点坐标值数组,坐标值是相对于图片大小的百分比形式,坐标原点在图片左上角。无关键点为空数组:[]
返回的json示例
{
  "57d8cd17e64e932a20bd6d24": {
    "fileList": [
      {
        "name": "15771584782190.13500983371984.mp4",
        "keypoint": [
          [
            0.14629918999142116,
            0.46748045086860657
          ],
          [
            0.15462904506259495,
            0.5140708386898041
          ],
          [
            0.16331926981608072,
            0.5585291087627411
          ],
          [
            0.17526827918158638,
            0.6019363403320312
          ],
          [
            0.1921385924021403,
            0.652009904384613
          ],
          [
            0.23418966929117838,
            0.6998928189277649
          ],
          [
            0.28503359688652885,
            0.7358831763267517
          ],
          [
            0.35596421029832626,
            0.768247663974762
          ],
          [
            0.45718198352389866,
            0.786153256893158
          ],
          [
            0.5541921721564399,
            0.7721357941627502
          ],
          [
            0.6132815149095323,
            0.7451911568641663
          ],
          [
            0.6515763070848253,
            0.7103657722473145
          ],
          [
            0.6918542120191786,
            0.6609986424446106
          ],
          [
            0.7205947770012749,
            0.6170045137405396
          ],
          [
            0.7361231909857856,
            0.5744434297084808
          ],
          [
            0.7582915623982748,
            0.5250938236713409
          ],
          [
            0.7712325519985623,
            0.46909308433532715
          ],
          [
            0.23774001333448622,
            0.42145270109176636
          ],
          [
            0.28292234738667804,
            0.4071655571460724
          ],
          [
            0.3359282546573215,
            0.4049879014492035
          ],
          [
            0.385132630666097,
            0.4102749824523926
          ],
          [
            0.42838414510091144,
            0.4191249907016754
          ],
          [
            0.6030705240037706,
            0.4228210151195526
          ],
          [
            0.6429004139370389,
            0.41600221395492554
          ],
          [
            0.6857882605658637,
            0.4128585159778595
          ],
          [
            0.7269316249423556,
            0.4176687002182007
          ],
          [
            0.7534334924485948,
            0.4342415928840637
          ],
          [
            0.5087411668565538,
            0.49055665731430054
          ],
          [
            0.5099214447869195,
            0.5313177704811096
          ],
          [
            0.5099761750962999,
            0.5676558315753937
          ],
          [
            0.5123929977416992,
            0.5958769023418427
          ],
          [
            0.44484806060791016,
            0.6107888221740723
          ],
          [
            0.4690690040588379,
            0.6150766611099243
          ],
          [
            0.49813302357991535,
            0.6200478374958038
          ],
          [
            0.5272375212775336,
            0.6162996590137482
          ],
          [
            0.5486058129204644,
            0.6128332316875458
          ],
          [
            0.29717644055684406,
            0.47245290875434875
          ],
          [
            0.3351385858323839,
            0.4663632810115814
          ],
          [
            0.37780329916212296,
            0.46889451146125793
          ],
          [
            0.41269320911831325,
            0.48362842202186584
          ],
          [
            0.3769460784064399,
            0.48855844140052795
          ],
          [
            0.33130976888868546,
            0.48428770899772644
          ],
          [
            0.5909771919250488,
            0.4821018874645233
          ],
          [
            0.6315626568264432,
            0.4701124131679535
          ],
          [
            0.6713035371568468,
            0.4695681035518646
          ],
          [
            0.6967125468783908,
            0.47748324275016785
          ],
          [
            0.6692748069763184,
            0.48813396692276
          ],
          [
            0.6252674526638455,
            0.48885050415992737
          ],
          [
            0.37841049830118817,
            0.6751063466072083
          ],
          [
            0.4209460947248671,
            0.6675869822502136
          ],
          [
            0.4697425100538466,
            0.6604491472244263
          ],
          [
            0.4908518261379666,
            0.663951575756073
          ],
          [
            0.5138443311055502,
            0.6621750593185425
          ],
          [
            0.55199310514662,
            0.6702532768249512
          ],
          [
            0.5800182024637858,
            0.6811664700508118
          ],
          [
            0.5464833577473959,
            0.6976765394210815
          ],
          [
            0.5155960188971626,
            0.7066193222999573
          ],
          [
            0.4821445677015517,
            0.7089870572090149
          ],
          [
            0.44667185677422416,
            0.7074453830718994
          ],
          [
            0.4145548078748915,
            0.6951194405555725
          ],
          [
            0.3845386770036485,
            0.6751832365989685
          ],
          [
            0.4557894600762261,
            0.676906406879425
          ],
          [
            0.48709434933132595,
            0.6770831346511841
          ],
          [
            0.5164642333984375,
            0.6788382530212402
          ],
          [
            0.5744711558024088,
            0.6806700229644775
          ],
          [
            0.5158441331651475,
            0.6853058934211731
          ],
          [
            0.48454438315497506,
            0.6863067150115967
          ],
          [
            0.4527035819159614,
            0.6852376461029053
          ]
        ]
      }
    ]
  },
  "code": 0,
  "message": "success",
  "nonce": "0.441202583495081",
  "timestamp": 1596530762363
}

results matching ""

    No results matching ""