Person Group Operations - Create Person Group
Create a new Person Group with specified personGroupId, name, user-provided userData and recognitionModel.
A Person Group is a container holding the uploaded person data, including face recognition features.
After creation, use "Create Person Group Person" to add persons into the group, and then call "Train Person Group" to get this group ready for "Identify From Person Group".
No image will be stored. Only the person's extracted face feature(s) and userData will be stored on server until "Delete Person Group Person" or "Delete Person Group" is called.
'recognitionModel' should be specified to associate with this Person Group. The default value for 'recognitionModel' is 'recognition_01', if the latest model needed, please explicitly specify the model you need in this parameter. New faces that are added to an existing Person Group will use the recognition model that's already associated with the collection. Existing face feature(s) in a Person Group can't be updated to features extracted by another version of recognition model.
Note
-
- Free-tier subscription quota: 1,000 Person Groups. Each holds up to 1,000 persons.
- S0-tier subscription quota: 1,000,000 Person Groups. Each holds up to 10,000 persons.
- to handle larger scale face identification problem, please consider using Large Person Group.
PUT {endpoint}/face/{apiVersion}/persongroups/{personGroupId}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
api
|
path | True |
string |
API Version |
endpoint
|
path | True |
string uri |
Supported Cognitive Services endpoints (protocol and hostname, for example: https://{resource-name}.cognitiveservices.azure.com). |
person
|
path | True |
string |
ID of the container. Regex pattern: |
Request Body
Name | Required | Type | Description |
---|---|---|---|
name | True |
string |
User defined name, maximum length is 128. |
recognitionModel |
The 'recognitionModel' associated with this face list. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02, 'recognition_03', and 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. |
||
userData |
string |
Optional user defined data. Length should not exceed 16K. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The request has succeeded. |
|
Other Status Codes |
An unexpected error response. Headers x-ms-error-code: string |
Security
Ocp-Apim-Subscription-Key
The secret key for your Azure AI Face subscription.
Type:
apiKey
In:
header
AADToken
The Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://api.example.com/oauth2/authorize
Token URL:
https://api.example.com/oauth2/token
Scopes
Name | Description |
---|---|
https://cognitiveservices.azure.com/.default |
Examples
Create PersonGroup
Sample request
PUT {endpoint}/face/v1.2-preview.1/persongroups/your_person_group_id
{
"name": "your_person_group_name",
"userData": "your_user_data",
"recognitionModel": "recognition_01"
}
Sample response
Definitions
Name | Description |
---|---|
Create |
Model for creating face collection. |
Face |
The error object. For comprehensive details on error codes and messages returned by the Face Service, please refer to the following link: https://aka.ms/face-error-codes-and-messages. |
Face |
A response containing error details. |
Recognition |
The recognition model for the face. |
CreateCollectionRequest
Model for creating face collection.
Name | Type | Default value | Description |
---|---|---|---|
name |
string |
User defined name, maximum length is 128. |
|
recognitionModel | recognition_01 |
The 'recognitionModel' associated with this face list. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02, 'recognition_03', and 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'. |
|
userData |
string |
Optional user defined data. Length should not exceed 16K. |
FaceError
The error object. For comprehensive details on error codes and messages returned by the Face Service, please refer to the following link: https://aka.ms/face-error-codes-and-messages.
Name | Type | Description |
---|---|---|
code |
string |
One of a server-defined set of error codes. |
message |
string |
A human-readable representation of the error. |
FaceErrorResponse
A response containing error details.
Name | Type | Description |
---|---|---|
error |
The error object. |
RecognitionModel
The recognition model for the face.
Name | Type | Description |
---|---|---|
recognition_01 |
string |
The default recognition model for "Detect". All those faceIds created before 2019 March are bonded with this recognition model. |
recognition_02 |
string |
Recognition model released in 2019 March. |
recognition_03 |
string |
Recognition model released in 2020 May. |
recognition_04 |
string |
Recognition model released in 2021 February. It's recommended to use this recognition model for better recognition accuracy. |