Person Directory Operations - Get Person Face
检索人脸信息。 持久性人员人脸通过其 personId 来指定。 recognitionModel 和 persistedFaceId。
GET {endpoint}/face/{apiVersion}/persons/{personId}/recognitionModels/{recognitionModel}/persistedfaces/{persistedFaceId}
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
api
|
path | True |
string |
API 版本 |
|
endpoint
|
path | True |
string (uri) |
支持的认知服务终结点(协议和主机名,例如:https://{resource-name}.cognitiveservices.azure.com)。 |
|
persisted
|
path | True |
string (uuid) |
人脸的脸 ID。 |
|
person
|
path | True |
string (uuid) |
人员的人员 ID。 |
|
recognition
|
path | True |
与人脸关联的“recognitionModel”。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
成功的调用返回目标持久化人脸的信息(persistedFaceId 和 userData)。 |
|
| Other Status Codes |
意外的错误响应。 标头 x-ms-error-code: string |
安全性
Ocp-Apim-Subscription-Key
Azure AI 人脸订阅的密钥。
类型:
apiKey
在:
header
AADToken
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
accessCode
授权 URL:
https://api.example.com/oauth2/authorize
令牌 URL:
https://api.example.com/oauth2/token
作用域
| 名称 | 说明 |
|---|---|
| https://cognitiveservices.azure.com/.default |
示例
Get Face from PersonDirectory Person
示例请求
GET {endpoint}/face/v1.2-preview.1/persons/85c0c630-c9c9-40f8-8a4e-f9ae4f926ea5/recognitionModels/recognition_01/persistedfaces/43897a75-8d6f-42cf-885e-74832febb055
示例响应
{
"persistedFaceId": "43897a75-8d6f-42cf-885e-74832febb055",
"userData": "your_user_data"
}
定义
| 名称 | 说明 |
|---|---|
|
Face |
错误对象。 有关人脸服务返回的错误代码和消息的综合详细信息,请参阅以下链接:https://aka.ms/face-error-codes-and-messages。 |
|
Face |
包含错误详细信息的响应。 |
|
Person |
人员目录人员的人脸资源。 |
|
Recognition |
人脸的识别模型。 |
FaceError
错误对象。 有关人脸服务返回的错误代码和消息的综合详细信息,请参阅以下链接:https://aka.ms/face-error-codes-and-messages。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
服务器定义的错误代码集之一。 |
| message |
string |
错误的人工可读表示形式。 |
FaceErrorResponse
包含错误详细信息的响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
PersonDirectoryFace
人员目录人员的人脸资源。
| 名称 | 类型 | 说明 |
|---|---|---|
| persistedFaceId |
string (uuid) |
人脸的脸 ID。 |
| userData |
string maxLength: 1024 |
附加到人脸的用户提供的数据。 长度限制为 1K。 |
RecognitionModel
人脸的识别模型。
| 值 | 说明 |
|---|---|
| recognition_01 |
“Detect”的默认识别模型。 2019 年 3 月之前创建的所有 faceId 都与此识别模型绑定在一起。 |
| recognition_02 |
识别模型于 2019 年 3 月发布。 |
| recognition_03 |
识别模型于 2020 年 5 月发布。 |
| recognition_04 |
识别模型于 2021 年 2 月发布。 建议使用此识别模型来提高识别准确性。 |