FaceListOperations class
Class representing a FaceListOperations.
Constructors
Face |
Create a FaceListOperations. |
Methods
add |
Add a face to a specified face list, up to 1,000 faces.
|
add |
|
add |
|
add |
Add a face to a specified face list, up to 1,000 faces.
|
add |
|
add |
|
create(string, string, Face |
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.
|
create(string, string, Face |
|
create(string, string, Service |
|
delete |
Delete a face from a face list by specified faceListId and persistedFaceId.
|
delete |
|
delete |
|
delete |
Delete a specified face list. |
delete |
|
delete |
|
get(string, Face |
Retrieve a face list’s faceListId, name, userData, recognitionModel and faces in the face list. |
get(string, Face |
|
get(string, Service |
|
list(Face |
List face lists’ faceListId, name, userData and recognitionModel. |
list(Face |
|
list(Service |
|
update(string, Face |
Update information of a face list. |
update(string, Face |
|
update(string, Service |
Constructor Details
FaceListOperations(FaceClientContext)
Create a FaceListOperations.
new FaceListOperations(client: FaceClientContext)
Parameters
- client
- FaceClientContext
Reference to the service client.
Method Details
addFaceFromStream(string, HttpRequestBody, 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: HttpRequestBody, options?: FaceListAddFaceFromStreamOptionalParams): Promise<FaceListAddFaceFromStreamResponse>
Parameters
- faceListId
-
string
Id referencing a particular face list.
- image
- HttpRequestBody
An image stream.
The optional parameters
Returns
Promise<FaceListAddFaceFromStreamResponse>
Promise<Models.FaceListAddFaceFromStreamResponse>
addFaceFromStream(string, HttpRequestBody, FaceListAddFaceFromStreamOptionalParams, ServiceCallback<PersistedFace>)
function addFaceFromStream(faceListId: string, image: HttpRequestBody, options: FaceListAddFaceFromStreamOptionalParams, callback: ServiceCallback<PersistedFace>)
Parameters
- faceListId
-
string
Id referencing a particular face list.
- image
- HttpRequestBody
An image stream.
The optional parameters
- callback
The callback
addFaceFromStream(string, HttpRequestBody, ServiceCallback<PersistedFace>)
function addFaceFromStream(faceListId: string, image: HttpRequestBody, callback: ServiceCallback<PersistedFace>)
Parameters
- faceListId
-
string
Id referencing a particular face list.
- image
- HttpRequestBody
An image stream.
- callback
The callback
addFaceFromUrl(string, string, 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?: FaceListAddFaceFromUrlOptionalParams): Promise<FaceListAddFaceFromUrlResponse>
Parameters
- faceListId
-
string
Id referencing a particular face list.
- url
-
string
Publicly reachable URL of an image
The optional parameters
Returns
Promise<FaceListAddFaceFromUrlResponse>
Promise<Models.FaceListAddFaceFromUrlResponse>
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
The optional parameters
- callback
The callback
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
The callback
create(string, string, 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, name: string, options?: FaceListCreateOptionalParams): Promise<RestResponse>
Parameters
- faceListId
-
string
Id referencing a particular face list.
- name
-
string
User defined name, maximum length is 128.
- options
- FaceListCreateOptionalParams
The optional parameters
Returns
Promise<RestResponse>
Promise<msRest.RestResponse>
create(string, string, FaceListCreateOptionalParams, ServiceCallback<void>)
function create(faceListId: string, name: string, options: FaceListCreateOptionalParams, callback: ServiceCallback<void>)
Parameters
- faceListId
-
string
Id referencing a particular face list.
- name
-
string
User defined name, maximum length is 128.
- options
- FaceListCreateOptionalParams
The optional parameters
- callback
-
ServiceCallback<void>
The callback
create(string, string, ServiceCallback<void>)
function create(faceListId: string, name: string, callback: ServiceCallback<void>)
Parameters
- faceListId
-
string
Id referencing a particular face list.
- name
-
string
User defined name, maximum length is 128.
- callback
-
ServiceCallback<void>
The callback
deleteFace(string, string, 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?: RequestOptionsBase): Promise<RestResponse>
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
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, RequestOptionsBase)
Delete a specified face list.
function deleteMethod(faceListId: string, options?: RequestOptionsBase): Promise<RestResponse>
Parameters
- faceListId
-
string
Id referencing a particular face list.
- options
- RequestOptionsBase
The optional parameters
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)
Retrieve a face list’s faceListId, name, userData, recognitionModel and faces in the face list.
function get(faceListId: string, options?: FaceListGetOptionalParams): Promise<FaceListGetResponse>
Parameters
- faceListId
-
string
Id referencing a particular face list.
- options
- FaceListGetOptionalParams
The optional parameters
Returns
Promise<FaceListGetResponse>
Promise<Models.FaceListGetResponse>
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
The callback
get(string, ServiceCallback<FaceList>)
function get(faceListId: string, callback: ServiceCallback<FaceList>)
Parameters
- faceListId
-
string
Id referencing a particular face list.
- callback
The callback
list(FaceListListOptionalParams)
List face lists’ faceListId, name, userData and recognitionModel.
To get face information inside faceList use FaceList -
Get
function list(options?: FaceListListOptionalParams): Promise<FaceListListResponse>
Parameters
- options
- FaceListListOptionalParams
The optional parameters
Returns
Promise<FaceListListResponse>
Promise<Models.FaceListListResponse>
list(FaceListListOptionalParams, ServiceCallback<FaceList[]>)
function list(options: FaceListListOptionalParams, callback: ServiceCallback<FaceList[]>)
Parameters
- options
- FaceListListOptionalParams
The optional parameters
- callback
The callback
list(ServiceCallback<FaceList[]>)
function list(callback: ServiceCallback<FaceList[]>)
Parameters
- callback
The callback
update(string, FaceListUpdateOptionalParams)
Update information of a face list.
function update(faceListId: string, options?: FaceListUpdateOptionalParams): Promise<RestResponse>
Parameters
- faceListId
-
string
Id referencing a particular face list.
- options
- FaceListUpdateOptionalParams
The optional parameters
Returns
Promise<RestResponse>
Promise<msRest.RestResponse>
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, ServiceCallback<void>)
function update(faceListId: string, callback: ServiceCallback<void>)
Parameters
- faceListId
-
string
Id referencing a particular face list.
- callback
-
ServiceCallback<void>
The callback