FaceListOperations class

Class representing a FaceListOperations.

Constructors

FaceListOperations(FaceClientContext)

Create a FaceListOperations.

Methods

addFaceFromStream(string, msRest.HttpRequestBody, FaceListAddFaceFromStreamOptionalParams, ServiceCallback<PersistedFace>)
addFaceFromStream(string, msRest.HttpRequestBody, Models.FaceListAddFaceFromStreamOptionalParams)

Add a face to a specified face list, up to 1,000 faces.
To deal with an image contains multiple faces, input face can be specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until FaceList - Delete Face or FaceList - Delete is called.
Note persistedFaceId is different from faceId generated by Face - Detect.

  • Higher face image quality means better detection and recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger.
  • JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB.
  • "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" rectangle is not returned from Face - Detect, there’s no guarantee to detect and add the face successfully.
  • Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures.
  • Adding/deleting faces to/from a same face list are processed sequentially and to/from different face lists are in parallel.
  • The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size.
  • Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to How to specify a detection model.
addFaceFromStream(string, msRest.HttpRequestBody, ServiceCallback<PersistedFace>)
addFaceFromUrl(string, string, FaceListAddFaceFromUrlOptionalParams, ServiceCallback<PersistedFace>)
addFaceFromUrl(string, string, Models.FaceListAddFaceFromUrlOptionalParams)

Add a face to a specified face list, up to 1,000 faces.
To deal with an image contains multiple faces, input face can be specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until FaceList - Delete Face or FaceList - Delete is called.
Note persistedFaceId is different from faceId generated by Face - Detect.

  • Higher face image quality means better detection and recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger.
  • JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB.
  • "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" rectangle is not returned from Face - Detect, there’s no guarantee to detect and add the face successfully.
  • Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures.
  • Adding/deleting faces to/from a same face list are processed sequentially and to/from different face lists are in parallel.
  • The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size.
  • Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to How to specify a detection model.
addFaceFromUrl(string, string, ServiceCallback<PersistedFace>)
create(string, FaceListCreateOptionalParams, ServiceCallback<void>)
create(string, Models.FaceListCreateOptionalParams)

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 Face - Find Similar.
After creation, user should use FaceList - Add Face to import the faces. No image will be stored. Only the extracted face features are stored on server until FaceList - Delete 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 PersonGroup / LargePersonGroup and Face - Identify.
Please consider LargeFaceList when the face number is large. It can support up to 1,000,000 faces.
'recognitionModel' should be specified to associate with this face list. 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 face list will use the recognition model that's already associated with the collection. Existing face features in a face list can't be updated to features extracted by another version of recognition model. Please Refer to Specify a face recognition model.

create(string, ServiceCallback<void>)
deleteFace(string, string, msRest.RequestOptionsBase)

Delete a face from a face list by specified faceListId and persistedFaceId.
Adding/deleting faces to/from a same face list are processed sequentially and to/from different face lists are in parallel.

deleteFace(string, string, RequestOptionsBase, ServiceCallback<void>)
deleteFace(string, string, ServiceCallback<void>)
deleteMethod(string, msRest.RequestOptionsBase)

Delete a specified face list.

deleteMethod(string, RequestOptionsBase, ServiceCallback<void>)
deleteMethod(string, ServiceCallback<void>)
get(string, FaceListGetOptionalParams, ServiceCallback<FaceList>)
get(string, Models.FaceListGetOptionalParams)

Retrieve a face list’s faceListId, name, userData, recognitionModel and faces in the face list.

get(string, ServiceCallback<FaceList>)
list(FaceListListOptionalParams, ServiceCallback<FaceList[]>)
list(Models.FaceListListOptionalParams)

List face lists’ faceListId, name, userData and recognitionModel.
To get face information inside faceList use FaceList - Get

list(ServiceCallback<FaceList[]>)
update(string, FaceListUpdateOptionalParams, ServiceCallback<void>)
update(string, Models.FaceListUpdateOptionalParams)

Update information of a face list.

update(string, ServiceCallback<void>)

Constructor Details

FaceListOperations(FaceClientContext)

Create a FaceListOperations.

new FaceListOperations(client: FaceClientContext)

Parameters

client
FaceClientContext

Reference to the service client.

Method Details

addFaceFromStream(string, msRest.HttpRequestBody, FaceListAddFaceFromStreamOptionalParams, ServiceCallback<PersistedFace>)

function addFaceFromStream(faceListId: string, image: msRest.HttpRequestBody, options: FaceListAddFaceFromStreamOptionalParams, callback: ServiceCallback<PersistedFace>)

Parameters

faceListId

string

Id referencing a particular face list.

image
msRest.HttpRequestBody

An image stream.

options
FaceListAddFaceFromStreamOptionalParams

The optional parameters

callback

ServiceCallback<PersistedFace>

The callback

addFaceFromStream(string, msRest.HttpRequestBody, Models.FaceListAddFaceFromStreamOptionalParams)

Add a face to a specified face list, up to 1,000 faces.
To deal with an image contains multiple faces, input face can be specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until FaceList - Delete Face or FaceList - Delete is called.
Note persistedFaceId is different from faceId generated by Face - Detect.

  • Higher face image quality means better detection and recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger.
  • JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB.
  • "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" rectangle is not returned from Face - Detect, there’s no guarantee to detect and add the face successfully.
  • Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures.
  • Adding/deleting faces to/from a same face list are processed sequentially and to/from different face lists are in parallel.
  • The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size.
  • Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to How to specify a detection model.
function addFaceFromStream(faceListId: string, image: msRest.HttpRequestBody, options?: Models.FaceListAddFaceFromStreamOptionalParams)

Parameters

faceListId

string

Id referencing a particular face list.

image
msRest.HttpRequestBody

An image stream.

options
Models.FaceListAddFaceFromStreamOptionalParams

Returns

Promise<Models.FaceListAddFaceFromStreamResponse>

Promise<Models.FaceListAddFaceFromStreamResponse>

addFaceFromStream(string, msRest.HttpRequestBody, ServiceCallback<PersistedFace>)

function addFaceFromStream(faceListId: string, image: msRest.HttpRequestBody, callback: ServiceCallback<PersistedFace>)

Parameters

faceListId

string

Id referencing a particular face list.

image
msRest.HttpRequestBody

An image stream.

callback

ServiceCallback<PersistedFace>

The callback

addFaceFromUrl(string, string, FaceListAddFaceFromUrlOptionalParams, ServiceCallback<PersistedFace>)

function addFaceFromUrl(faceListId: string, url: string, options: FaceListAddFaceFromUrlOptionalParams, callback: ServiceCallback<PersistedFace>)

Parameters

faceListId

string

Id referencing a particular face list.

url

string

Publicly reachable URL of an image

options
FaceListAddFaceFromUrlOptionalParams

The optional parameters

callback

ServiceCallback<PersistedFace>

The callback

addFaceFromUrl(string, string, Models.FaceListAddFaceFromUrlOptionalParams)

Add a face to a specified face list, up to 1,000 faces.
To deal with an image contains multiple faces, input face can be specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face. No image will be stored. Only the extracted face feature will be stored on server until FaceList - Delete Face or FaceList - Delete is called.
Note persistedFaceId is different from faceId generated by Face - Detect.

  • Higher face image quality means better detection and recognition precision. Please consider high-quality faces: frontal, clear, and face size is 200x200 pixels (100 pixels between eyes) or bigger.
  • JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB.
  • "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" rectangle is not returned from Face - Detect, there’s no guarantee to detect and add the face successfully.
  • Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures.
  • Adding/deleting faces to/from a same face list are processed sequentially and to/from different face lists are in parallel.
  • The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size.
  • Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to How to specify a detection model.
function addFaceFromUrl(faceListId: string, url: string, options?: Models.FaceListAddFaceFromUrlOptionalParams)

Parameters

faceListId

string

Id referencing a particular face list.

url

string

Publicly reachable URL of an image

options
Models.FaceListAddFaceFromUrlOptionalParams

Returns

Promise<Models.FaceListAddFaceFromUrlResponse>

Promise<Models.FaceListAddFaceFromUrlResponse>

addFaceFromUrl(string, string, ServiceCallback<PersistedFace>)

function addFaceFromUrl(faceListId: string, url: string, callback: ServiceCallback<PersistedFace>)

Parameters

faceListId

string

Id referencing a particular face list.

url

string

Publicly reachable URL of an image

callback

ServiceCallback<PersistedFace>

The callback

create(string, FaceListCreateOptionalParams, ServiceCallback<void>)

function create(faceListId: string, options: FaceListCreateOptionalParams, callback: ServiceCallback<void>)

Parameters

faceListId

string

Id referencing a particular face list.

options
FaceListCreateOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

create(string, Models.FaceListCreateOptionalParams)

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 Face - Find Similar.
After creation, user should use FaceList - Add Face to import the faces. No image will be stored. Only the extracted face features are stored on server until FaceList - Delete 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 PersonGroup / LargePersonGroup and Face - Identify.
Please consider LargeFaceList when the face number is large. It can support up to 1,000,000 faces.
'recognitionModel' should be specified to associate with this face list. 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 face list will use the recognition model that's already associated with the collection. Existing face features in a face list can't be updated to features extracted by another version of recognition model. Please Refer to Specify a face recognition model.

function create(faceListId: string, options?: Models.FaceListCreateOptionalParams)

Parameters

faceListId

string

Id referencing a particular face list.

options
Models.FaceListCreateOptionalParams

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

create(string, ServiceCallback<void>)

function create(faceListId: string, callback: ServiceCallback<void>)

Parameters

faceListId

string

Id referencing a particular face list.

callback

ServiceCallback<void>

The callback

deleteFace(string, string, msRest.RequestOptionsBase)

Delete a face from a face list by specified faceListId and persistedFaceId.
Adding/deleting faces to/from a same face list are processed sequentially and to/from different face lists are in parallel.

function deleteFace(faceListId: string, persistedFaceId: string, options?: msRest.RequestOptionsBase)

Parameters

faceListId

string

Id referencing a particular face list.

persistedFaceId

string

Id referencing a particular persistedFaceId of an existing face.

options
msRest.RequestOptionsBase

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

deleteFace(string, string, RequestOptionsBase, ServiceCallback<void>)

function deleteFace(faceListId: string, persistedFaceId: string, options: RequestOptionsBase, callback: ServiceCallback<void>)

Parameters

faceListId

string

Id referencing a particular face list.

persistedFaceId

string

Id referencing a particular persistedFaceId of an existing face.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<void>

The callback

deleteFace(string, string, ServiceCallback<void>)

function deleteFace(faceListId: string, persistedFaceId: string, callback: ServiceCallback<void>)

Parameters

faceListId

string

Id referencing a particular face list.

persistedFaceId

string

Id referencing a particular persistedFaceId of an existing face.

callback

ServiceCallback<void>

The callback

deleteMethod(string, msRest.RequestOptionsBase)

Delete a specified face list.

function deleteMethod(faceListId: string, options?: msRest.RequestOptionsBase)

Parameters

faceListId

string

Id referencing a particular face list.

options
msRest.RequestOptionsBase

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

deleteMethod(string, RequestOptionsBase, ServiceCallback<void>)

function deleteMethod(faceListId: string, options: RequestOptionsBase, callback: ServiceCallback<void>)

Parameters

faceListId

string

Id referencing a particular face list.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<void>

The callback

deleteMethod(string, ServiceCallback<void>)

function deleteMethod(faceListId: string, callback: ServiceCallback<void>)

Parameters

faceListId

string

Id referencing a particular face list.

callback

ServiceCallback<void>

The callback

get(string, FaceListGetOptionalParams, ServiceCallback<FaceList>)

function get(faceListId: string, options: FaceListGetOptionalParams, callback: ServiceCallback<FaceList>)

Parameters

faceListId

string

Id referencing a particular face list.

options
FaceListGetOptionalParams

The optional parameters

callback

ServiceCallback<FaceList>

The callback

get(string, Models.FaceListGetOptionalParams)

Retrieve a face list’s faceListId, name, userData, recognitionModel and faces in the face list.

function get(faceListId: string, options?: Models.FaceListGetOptionalParams)

Parameters

faceListId

string

Id referencing a particular face list.

options
Models.FaceListGetOptionalParams

Returns

Promise<Models.FaceListGetResponse>

Promise<Models.FaceListGetResponse>

get(string, ServiceCallback<FaceList>)

function get(faceListId: string, callback: ServiceCallback<FaceList>)

Parameters

faceListId

string

Id referencing a particular face list.

callback

ServiceCallback<FaceList>

The callback

list(FaceListListOptionalParams, ServiceCallback<FaceList[]>)

function list(options: FaceListListOptionalParams, callback: ServiceCallback<FaceList[]>)

Parameters

options
FaceListListOptionalParams

The optional parameters

callback

ServiceCallback<FaceList[]>

The callback

list(Models.FaceListListOptionalParams)

List face lists’ faceListId, name, userData and recognitionModel.
To get face information inside faceList use FaceList - Get

function list(options?: Models.FaceListListOptionalParams)

Parameters

options
Models.FaceListListOptionalParams

Returns

Promise<Models.FaceListListResponse>

Promise<Models.FaceListListResponse>

list(ServiceCallback<FaceList[]>)

function list(callback: ServiceCallback<FaceList[]>)

Parameters

callback

ServiceCallback<FaceList[]>

The callback

update(string, FaceListUpdateOptionalParams, ServiceCallback<void>)

function update(faceListId: string, options: FaceListUpdateOptionalParams, callback: ServiceCallback<void>)

Parameters

faceListId

string

Id referencing a particular face list.

options
FaceListUpdateOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

update(string, Models.FaceListUpdateOptionalParams)

Update information of a face list.

function update(faceListId: string, options?: Models.FaceListUpdateOptionalParams)

Parameters

faceListId

string

Id referencing a particular face list.

options
Models.FaceListUpdateOptionalParams

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

update(string, ServiceCallback<void>)

function update(faceListId: string, callback: ServiceCallback<void>)

Parameters

faceListId

string

Id referencing a particular face list.

callback

ServiceCallback<void>

The callback