faceCompare:人脸比对
功能详情
识别两张不同图片中出现的人脸是否是同一个人,并给出相似程度。
请求地址
https://openapi.lechange.cn/openapi/faceCompare
传入参数说明
参数名 | 参数类型 | 是否必填 | 默认值 | 合法值 | 参数说明 |
---|---|---|---|---|---|
token | String | 是 | 管理员accessToken | ||
type | String | 是 | 0:表示图片URL;1:表示Base64编码的二进制图片数据 | 图片数据上传类型 | |
content1 | String | 是 | 当type=0时,为图片URL;当type=1时,为Base64编码的二进制图片数据 | 对比图片1数据 | |
content2 | String | 是 | 当type=0时,为图片URL;当type=1时,为Base64编码的二进制图片数据 | 对比图片2数据 |
样例输入
{
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign":"b7e5bbcc6cc07941725d9ad318883d8e",
"time":1599013514,
"nonce":"fbf19fc6-17a1-4f73-a967-75eadbc805a2"
},
"id":"98a7a257-c4e4-4db3-a2d3-d97a3836b87c",
"params":{
"token":"At_12345678901234567890123456789012",
"type":"0",
"content1":"https://www.google.com/test001.jpg",
"content2":"https://www.google.com/test002.jpg"
}
}
返回data字段说明
字段名 | 字段类型 | 字段说明 |
---|---|---|
score | String | 相似度,取值范围为[0,1],1表示完全相同 |
样例输出
{
"result":{
"msg":"操作成功。",
"code":"0",
"data":{
"score":"0.777"
}
},
"id":"98a7a257-c4e4-4db3-a2d3-d97a3836b87c"
}