文档中心 > API类目 > 天眼工作室API

alibaba.security.deepvision.onen.face.comparemultiface (N:1人脸比对)

N:1人脸比对

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param DpFaceCompareParam 可选 参数
  • └ scene_code
  • String
  • 必须
  • 23we
  • 场景
  • └ request_id
  • String
  • 可选
  • 23w
  • 请求唯一ID
  • └ tenant_code
  • String
  • 必须
  • 23w
  • 租户编码
  • └ image1
  • String
  • 必须
  • http://1.jpg
  • 图片1
  • └ image2
  • String
  • 必须
  • http://1.jpg
  • 图片2
  • └ token
  • String
  • 可选
  • 2wqas
  • Token

响应参数

名称 类型 示例值 描述
result Datas [] 比对结果
  • └ similarity
  • String
  • 0.3
  • 相似分
  • face_rect
  • FaceRect
  • 人脸框
  • └ top
  • Number
  • 1
  • top
  • └ left
  • Number
  • 1
  • left
  • └ width
  • Number
  • 1
  • width
  • └ height
  • Number
  • 1
  • height
resp_code Number 1 返回码
resp_success Boolean true 是否成功
resp_request_id String 2321 请求唯一ID
message String 成功 返回描述

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaSecurityDeepvisionOnenFaceComparemultifaceRequest req = new AlibabaSecurityDeepvisionOnenFaceComparemultifaceRequest();
AlibabaSecurityDeepvisionOnenFaceComparemultifaceRequest.DpFaceCompareParam obj1 = new AlibabaSecurityDeepvisionOnenFaceComparemultifaceRequest.DpFaceCompareParam();
obj1.setSceneCode("23we");
obj1.setRequestId("23w");
obj1.setTenantCode("23w");
obj1.setImage1("http://1.jpg");
obj1.setImage2("http://1.jpg");
obj1.setToken("2wqas");
req.setParam(obj1);
AlibabaSecurityDeepvisionOnenFaceComparemultifaceResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_security_deepvision_onen_face_comparemultiface_response>
    <result>
        <datas>
            <similarity>0.3</similarity>
            <face_rect>
                <top>1</top>
                <left>1</left>
                <width>1</width>
                <height>1</height>
            </face_rect>
        </datas>
    </result>
    <resp_code>1</resp_code>
    <resp_success>true</resp_success>
    <resp_request_id>2321</resp_request_id>
    <message>成功</message>
</alibaba_security_deepvision_onen_face_comparemultiface_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部