Face List Operations - Create Face List

Create an empty Face List with user-specified faceListId, name, an optional userData and recognitionModel.
Up to 64 Face Lists are allowed in one subscription.

Face List is a list of faces, up to 1,000 faces, and used by "Find Similar From Face List".

After creation, user should use "Add Face List Face" to import the faces. No image will be stored. Only the extracted face feature(s) will be stored on server until "Delete 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".

Please consider Large Face List when the face number is large. It can support up to 1,000,000 faces.

PUT {endpoint}/face/{apiVersion}/facelists/{faceListId}

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).

faceListId
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 FaceList

Sample Request

PUT {endpoint}/face/v1.1-preview.1/facelists/your_face_list_id

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

Sample Response

Definitions

Name Description
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.

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.