你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Person Group Operations - Get Person Group

检索人员组名称、userData 和 recognitionModel。 若要获取此 personGroup 下的人员信息,请使用“获取人员组人员”。

GET {endpoint}/face/{apiVersion}/persongroups/{personGroupId}
GET {endpoint}/face/{apiVersion}/persongroups/{personGroupId}?returnRecognitionModel={returnRecognitionModel}

URI 参数

名称 必需 类型 说明
apiVersion
path True

string

API 版本

endpoint
path True

string

uri

支持的认知服务终结点 (协议和主机名,例如:https://{resource-name}.cognitiveservices.azure.com) 。

personGroupId
path True

string

容器的 ID。

Regex pattern: ^[a-z0-9-_]+$

returnRecognitionModel
query

boolean

是否返回“recognitionModel”。 默认值为 false。

响应

名称 类型 说明
200 OK

PersonGroup

成功调用将返回人员组的信息。

Other Status Codes

FaceErrorResponse

意外的错误响应。

Headers

x-ms-error-code: string

安全性

Ocp-Apim-Subscription-Key

Azure AI 人脸订阅的密钥。

Type: apiKey
In: header

AADToken

Azure Active Directory OAuth2 流

Type: oauth2
Flow: accessCode
Authorization URL: https://api.example.com/oauth2/authorize
Token URL: https://api.example.com/oauth2/token

Scopes

名称 说明
https://cognitiveservices.azure.com/.default

示例

Get PersonGroup

Sample Request

GET {endpoint}/face/v1.1-preview.1/persongroups/your_person_group_id?returnRecognitionModel=True

Sample Response

{
  "name": "your_person_group_name",
  "userData": "your_user_data",
  "recognitionModel": "recognition_01",
  "personGroupId": "your_person_group_id"
}

定义

名称 说明
FaceError

错误对象。 有关人脸服务返回的错误代码和消息的综合详细信息,请参阅以下链接: https://aka.ms/face-error-codes-and-messages

FaceErrorResponse

包含错误详细信息的响应。

PersonGroup

上传的人员数据的容器,包括人脸识别功能,最多 10,000 人。 若要处理更大规模的人脸识别问题,请考虑使用大型人员组。

RecognitionModel

人脸的识别模型。

FaceError

错误对象。 有关人脸服务返回的错误代码和消息的综合详细信息,请参阅以下链接: https://aka.ms/face-error-codes-and-messages

名称 类型 说明
code

string

服务器定义的一组错误代码中的一个。

message

string

错误的用户可读表示形式。

FaceErrorResponse

包含错误详细信息的响应。

名称 类型 说明
error

FaceError

错误对象。

PersonGroup

上传的人员数据的容器,包括人脸识别功能,最多 10,000 人。 若要处理更大规模的人脸识别问题,请考虑使用大型人员组。

名称 类型 说明
name

string

用户定义的名称,最大长度为 128。

personGroupId

string

容器的 ID。

recognitionModel

RecognitionModel

识别模型的名称。 提取人脸特征并将其与检测到的 faceId 相关联时,将使用识别模型。

userData

string

用户定义的可选数据。 长度不应超过 16K。

RecognitionModel

人脸的识别模型。

名称 类型 说明
recognition_01

string

“检测”的默认识别模型。 2019 年 3 月之前创建的所有这些 faceId 都与此识别模型绑定。

recognition_02

string

识别模型于 2019 年 3 月发布。

recognition_03

string

识别模型于 2020 年 5 月发布。

recognition_04

string

识别模型于 2021 年 2 月发布。 建议使用此识别模型来提高识别准确性。