注意事项
初次调用请务必阅读调用方式,通过HTTP Statue Code返回值确认鉴权成功后,继续参考此API文档。
接口描述
请求路径:https://aiapi-maskface.apigw-gz.didiyunapi.com/algo/face/v1/mask_face_recognize
请求方法:POST
输入参数
参数名称 | 必选 | 默认值 | 描述 |
---|---|---|---|
uid | 是 | 无 | 请求的一个标识id。 |
image_url1 | 是 | 无 | 比对的底图url。 |
image_url2 | 是 | 无 | 比对的图片url。 |
输出参数
参数名称 | 类型 | 描述 |
---|---|---|
uid | string | 客户端参数中的uid |
request_id | string | 服务端标识请求的id |
confidence | double | 人脸相似度分数 |
threshold | double | 相似度参考阈值 |
time_used | int | 请求处理时间,单位ms |
error_code | int | 识别状态code,0表示成功,非0表示异常 |
error_message | string | 识别状态code非0时对应的异常信息 |
错误码
示例
请求:
curl -H 'Content-Type: application/x-www-form-urlencoded' -H 'Authorization: AppCode ACDDQRLL2jOqxXygVqxOgLM8FF3flk8i' -X POST "http://aiapi-maskface.apigw-gz.didiyunapi.com/algo/face/v1/mask_face_recognize?uid='123'&image_url1='http://100.69.238.155:8002/static/labelpbi/imglabel/image_label/face_plate/face1.jpg'&image_url2='http://100.69.238.155:8002/static/labelpbi/imglabel/image_label/face_plate/face1.jpg'"
正确返回:
{
"uid":"123",
"request_id":"d86bab92-f5c0-460e-8f22-11ae34282499"
"confidence":100,
"threshold":24.2,
"time_used":117,
"error_code":0,
"error_message":"ok"
}
错误返回:
{
"uid":"123",
"request_id":"d86bab92-f5c0-460e-8f22-11ae34282499"
"confidence":-1,
"threshold":24.2,
"time_used":20,
"error_code":100002,
"error_message":"GET_IMAGE_ERROR"
}