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

Person Group Operations - Create Large Person Group

Create具有用户指定的 largePersonGroupId、名称、可选 userData 和 recognitionModel 的新大型人员组。
大型人员组是保存上传的人员数据的容器,包括人脸识别功能。 它最多可以容纳 1,000,000 个实体。

创建后,使用“Create大型人员组人员”将人员添加到组中,并调用“训练大型人员组”,使此组为“从大型人员组识别”做好准备。

不会存储任何图像。 只有用户提取的人脸特征 () 和 userData 将存储在服务器上,直到调用“删除大型人员组人员”或“删除大型人员组”。

应指定“recognitionModel”以与此大型人员组相关联。 “recognitionModel”的默认值为“recognition_01”,如果需要最新的模型,请在此参数中显式指定所需的模型。 添加到现有大型人员组的新人脸将使用已与集合关联的识别模型。 大型人员组中的现有人脸特征 () 无法更新为由其他版本的识别模型提取的特征。

注意

    • 免费层订阅配额:1,000 个大型组。
    • S0 层订阅配额:1,000,000 大型用户组。
PUT {endpoint}/face/{apiVersion}/largepersongroups/{largePersonGroupId}

URI 参数

名称 必需 类型 说明
apiVersion
path True

string

API 版本

endpoint
path True

string

uri

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

largePersonGroupId
path True

string

容器的 ID。

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

请求正文

名称 必需 类型 说明
name True

string

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

recognitionModel

RecognitionModel

与此人脸列表关联的“recognitionModel”。 支持的“recognitionModel”值包括“recognition_01”、“recognition_02”、“recognition_03”和“recognition_04”。 默认值为“recognition_01”。 建议使用“recognition_04”,因为与“recognition_03”相比,戴口罩的人脸的准确度有所提高,与“recognition_01”和“recognition_02”相比,其整体准确度也得到了提高。

userData

string

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

响应

名称 类型 说明
200 OK

请求已成功。

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

示例

Create LargePersonGroup

Sample Request

PUT {endpoint}/face/v1.1-preview.1/largepersongroups/your_large_person_group_id

{
  "name": "your_large_person_group_name",
  "userData": "your_user_data",
  "recognitionModel": "recognition_01"
}

Sample Response

定义

名称 说明
FaceError

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

FaceErrorResponse

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

FaceError

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

名称 类型 说明
code

string

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

message

string

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

FaceErrorResponse

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

名称 类型 说明
error

FaceError

错误对象。