Face List Operations - Create Large Face List

Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and recognitionModel.
Large Face List is a list of faces, up to 1,000,000 faces, and used by "Find Similar From Large Face List".

After creation, user should use Add Large Face List Face to import the faces and Train Large Face List to make it ready for "Find Similar". No image will be stored. Only the extracted face feature(s) will be stored on server until Delete Large Face List is called.

"Find Similar" is used for scenario like finding celebrity-like faces, similar face filtering, or as a light way face identification. But if the actual use is to identify person, please use Person Group / Large Person Group and "Identify".

Note

    • Free-tier subscription quota: 64 Large Face Lists.
    • S0-tier subscription quota: 1,000,000 Large Face Lists.
PUT {endpoint}/face/{apiVersion}/largefacelists/{largeFaceListId}

URI Parameters

Name In Required Type Description
apiVersion
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).

largeFaceListId
path True

string

Valid character is letter in lower case or digit or '-' or '_', maximum length is 64.

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

Request Body

Name Required Type Description
name True

string

User defined name, maximum length is 128.

recognitionModel

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

FaceErrorResponse

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 LargeFaceList

Sample request

PUT {endpoint}/face/v1.1-preview.1/largefacelists/your_large_face_list_id

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

Sample response

Definitions

Name Description
CreateCollectionRequest

Model for creating face collection.

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.

FaceErrorResponse

A response containing error details.

RecognitionModel

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

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

FaceError

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.