🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
Face – Verify 验证两张脸是属于同一个人还是一张脸属于某一个人。 Remarks: * API用于正面或接近正面 * 对于对准确度敏感的场景,请自行判断 Http Method `POST` Request URL `https://api.cognitive.azure.cn/face/v1.0/verify` Request headers | 请求头 |类型 |描述 | | --- | --- | --- | | Content-Type(可选) | string | Media type of the body sent to the API | | Ocp-Apim-Subscription-Key | string | Subscription key which provides access to this API. Found in your Cognitive Services accounts. | Request body 在脸对脸验证请求主体中的JSON字段 | Fields | Type | Description | | --- | --- | --- | | faceId1 | String | Face - Detect创建的一个face 的 faceid | | faceId2 | String | Face - Detect创建的另一个一个face 的 faceid | 脸对人验证请求主体中的JSON字段 | Fields | Type | Description | | --- | --- | --- | | faceId | String | 一个人脸的faceId, 来自Face - Detect | | personGroupId | String | 使用现有的personGroupId和personId快速加载指定的人员。personGroupId在Person Group - Create a Person Group中创建 | | personId| String | 指定person group中的某个人。personId是在“ Person - Create a Person”中创建的 | ~~~ { "faceId":"c5c24a82-6845-4031-9d5d-978df9175426", "personId":"815df99c-598f-4926-930a-a734b3fd651c", "personGroupId":"sample_group" } ~~~ Response 200 请求成功返回验证结果 JSON fields in response body: | Fields | Type | Description | | --- | --- | --- | | isIdentical | Boolean | 如果两个人脸属于同一个人或这个人脸属于该人,则为真,否则为false | | confidence | Number | 数字表示两个面孔是否属于同一个人的相似性置信度,或者人脸是否属于该人。默认情况下,如果相似度置信度大于或等于0.5,则isIdentical设置为True。这对于高级用户重写“isIdentical”并对其自己的数据进行微调是有用的。 | ~~~ { "isIdentical":true, "confidence":0.9 } ~~~ Response 400 rror code and message returned in JSON: | Error Code | Error Message Description | | --- | --- | | BadArgument |错误和未被解析出来的的JSON主体 | | BadArgument | Face ID无效。faceId1,faceId2或faceId是无效的,有效的faceId来自Face - Detect | | BadArgument | Person ID无效。有效personId是从Person - Create a Person的现有人员生成的| | BadArgument | 请求正文无效 | | BadArgument | Person group ID无效。有效格式应该是由数字组成的字符串,英文字母小写,' - ','_',并且不超过64个字符 | ~~~ { "error":{ "code":"BadArgument", "message":"Request body is invalid." } } ~~~ Response 401 JSON中返回的错误代码和消息 | Error Code | Error Message Description | | --- | --- | | Unspecified | Invalid subscription Key or user/plan is blocked | ~~~ { "error":{ "code": "Unspecified", "message": "Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key." } } ~~~ Response 403 ~~~ { "error":{ "statusCode": 403, "message": "Out of call volume quota. Quota will be replenished in 2.12 days." } } ~~~ Response 404 Error code and message returned in JSON | Error Code | Error Message Description | | --- | --- | | FaceNotFound | 面找不到。faceId已过期或不存在 | | PersonNotFound | Person没有找到 | | PersonGroupNotFound | Person Group没找到| ~~~ { "error":{ "code":"PersonGroupNotFound", "message":"Person group 'sample_group' is not found." } } ~~~ Response 415 不支持的媒介类型错误。只有“application / json”对这个API有效 ~~~ { "error":{ "code":"BadArgument", "message":"Invalid Media Type" } } ~~~ Response 429 ~~~ { "error":{ "statusCode": 429, "message": "Rate limit is exceeded. Try again in 26 seconds." } } ~~~