PersonGroupOperations class
Class representing a PersonGroupOperations.
Constructors
Person |
Create a PersonGroupOperations. |
Methods
create(string, string, Person |
Create a new person group with specified personGroupId, name, user-provided userData and
recognitionModel.
Person group quota:
|
create(string, string, Person |
|
create(string, string, Service |
|
delete |
Delete an existing person group. Persisted face features of all people in the person group will also be deleted. |
delete |
|
delete |
|
get(string, Person |
Retrieve person group name, userData and recognitionModel. To get person information under this personGroup, use PersonGroup Person - List. |
get(string, Person |
|
get(string, Service |
|
get |
Retrieve the training status of a person group (completed or ongoing). |
get |
|
get |
|
list(Person |
List person groups’ personGroupId, name, userData and recognitionModel.
|
list(Person |
|
list(Service |
|
train(string, Request |
Queue a person group training task, the training task may not be started immediately. |
train(string, Request |
|
train(string, Service |
|
update(string, Person |
Update an existing person group's display name and userData. The properties which does not appear in request body will not be updated. |
update(string, Person |
|
update(string, Service |
Constructor Details
PersonGroupOperations(FaceClientContext)
Create a PersonGroupOperations.
new PersonGroupOperations(client: FaceClientContext)
Parameters
- client
- FaceClientContext
Reference to the service client.
Method Details
create(string, string, PersonGroupCreateOptionalParams)
Create a new person group with specified personGroupId, name, user-provided userData and
recognitionModel.
A person group is the container of the uploaded person data, including face recognition
features.
After creation, use PersonGroup Person -
Create to add persons
into the group, and then call PersonGroup -
Train to get this group ready
for Face - Identify.
No image will be stored. Only the person's extracted face features and userData will be
stored on server until PersonGroup Person -
Delete or PersonGroup -
Delete 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 features in a person group can't be updated to features extracted by another version of
recognition model.
Person group quota:
- 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 LargePersonGroup.
function create(personGroupId: string, name: string, options?: PersonGroupCreateOptionalParams): Promise<RestResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- name
-
string
User defined name, maximum length is 128.
- options
- PersonGroupCreateOptionalParams
The optional parameters
Returns
Promise<RestResponse>
Promise<msRest.RestResponse>
create(string, string, PersonGroupCreateOptionalParams, ServiceCallback<void>)
function create(personGroupId: string, name: string, options: PersonGroupCreateOptionalParams, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- name
-
string
User defined name, maximum length is 128.
- options
- PersonGroupCreateOptionalParams
The optional parameters
- callback
-
ServiceCallback<void>
The callback
create(string, string, ServiceCallback<void>)
function create(personGroupId: string, name: string, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- name
-
string
User defined name, maximum length is 128.
- callback
-
ServiceCallback<void>
The callback
deleteMethod(string, RequestOptionsBase)
Delete an existing person group. Persisted face features of all people in the person group will also be deleted.
function deleteMethod(personGroupId: string, options?: RequestOptionsBase): Promise<RestResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- options
- RequestOptionsBase
The optional parameters
Returns
Promise<RestResponse>
Promise<msRest.RestResponse>
deleteMethod(string, RequestOptionsBase, ServiceCallback<void>)
function deleteMethod(personGroupId: string, options: RequestOptionsBase, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- options
- RequestOptionsBase
The optional parameters
- callback
-
ServiceCallback<void>
The callback
deleteMethod(string, ServiceCallback<void>)
function deleteMethod(personGroupId: string, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- callback
-
ServiceCallback<void>
The callback
get(string, PersonGroupGetOptionalParams)
Retrieve person group name, userData and recognitionModel. To get person information under this personGroup, use PersonGroup Person - List.
function get(personGroupId: string, options?: PersonGroupGetOptionalParams): Promise<PersonGroupGetResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- options
- PersonGroupGetOptionalParams
The optional parameters
Returns
Promise<PersonGroupGetResponse>
Promise<Models.PersonGroupGetResponse>
get(string, PersonGroupGetOptionalParams, ServiceCallback<PersonGroup>)
function get(personGroupId: string, options: PersonGroupGetOptionalParams, callback: ServiceCallback<PersonGroup>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- options
- PersonGroupGetOptionalParams
The optional parameters
- callback
The callback
get(string, ServiceCallback<PersonGroup>)
function get(personGroupId: string, callback: ServiceCallback<PersonGroup>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- callback
The callback
getTrainingStatus(string, RequestOptionsBase)
Retrieve the training status of a person group (completed or ongoing).
function getTrainingStatus(personGroupId: string, options?: RequestOptionsBase): Promise<PersonGroupGetTrainingStatusResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- options
- RequestOptionsBase
The optional parameters
Returns
Promise<PersonGroupGetTrainingStatusResponse>
Promise<Models.PersonGroupGetTrainingStatusResponse>
getTrainingStatus(string, RequestOptionsBase, ServiceCallback<TrainingStatus>)
function getTrainingStatus(personGroupId: string, options: RequestOptionsBase, callback: ServiceCallback<TrainingStatus>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- options
- RequestOptionsBase
The optional parameters
- callback
The callback
getTrainingStatus(string, ServiceCallback<TrainingStatus>)
function getTrainingStatus(personGroupId: string, callback: ServiceCallback<TrainingStatus>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- callback
The callback
list(PersonGroupListOptionalParams)
List person groups’ personGroupId, name, userData and recognitionModel.
- Person groups are stored in alphabetical order of personGroupId.
- "start" parameter (string, optional) is a user-provided personGroupId value that returned entries have larger ids by string comparison. "start" set to empty to indicate return from the first item.
- "top" parameter (int, optional) specifies the number of entries to return. A maximal of 1000
entries can be returned in one call. To fetch more, you can specify "start" with the last
returned entry’s Id of the current call.
For example, total 5 person groups: "group1", ..., "group5".
"start=&top=" will return all 5 groups.
"start=&top=2" will return "group1", "group2".
"start=group2&top=3" will return "group3", "group4", "group5".
function list(options?: PersonGroupListOptionalParams): Promise<PersonGroupListResponse>
Parameters
- options
- PersonGroupListOptionalParams
The optional parameters
Returns
Promise<PersonGroupListResponse>
Promise<Models.PersonGroupListResponse>
list(PersonGroupListOptionalParams, ServiceCallback<PersonGroup[]>)
function list(options: PersonGroupListOptionalParams, callback: ServiceCallback<PersonGroup[]>)
Parameters
- options
- PersonGroupListOptionalParams
The optional parameters
- callback
The callback
list(ServiceCallback<PersonGroup[]>)
function list(callback: ServiceCallback<PersonGroup[]>)
Parameters
- callback
The callback
train(string, RequestOptionsBase)
Queue a person group training task, the training task may not be started immediately.
function train(personGroupId: string, options?: RequestOptionsBase): Promise<RestResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- options
- RequestOptionsBase
The optional parameters
Returns
Promise<RestResponse>
Promise<msRest.RestResponse>
train(string, RequestOptionsBase, ServiceCallback<void>)
function train(personGroupId: string, options: RequestOptionsBase, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- options
- RequestOptionsBase
The optional parameters
- callback
-
ServiceCallback<void>
The callback
train(string, ServiceCallback<void>)
function train(personGroupId: string, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- callback
-
ServiceCallback<void>
The callback
update(string, PersonGroupUpdateOptionalParams)
Update an existing person group's display name and userData. The properties which does not appear in request body will not be updated.
function update(personGroupId: string, options?: PersonGroupUpdateOptionalParams): Promise<RestResponse>
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- options
- PersonGroupUpdateOptionalParams
The optional parameters
Returns
Promise<RestResponse>
Promise<msRest.RestResponse>
update(string, PersonGroupUpdateOptionalParams, ServiceCallback<void>)
function update(personGroupId: string, options: PersonGroupUpdateOptionalParams, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- options
- PersonGroupUpdateOptionalParams
The optional parameters
- callback
-
ServiceCallback<void>
The callback
update(string, ServiceCallback<void>)
function update(personGroupId: string, callback: ServiceCallback<void>)
Parameters
- personGroupId
-
string
Id referencing a particular person group.
- callback
-
ServiceCallback<void>
The callback