BWS 3 Face Recognition is in preview now!
Performs a biometric enrollment (or training) of a single class with one or more images containing the face of the person to enroll. With this method a new biometric face template is created and stored. It can be used to create a completely new biometric template, to update an existing template or even to upgrade an existing template to a newer encoder version.
The created template is persisted to a storage, addressed by its Biometric Class ID (BCID). Beside of a compact version of the biometric template (used for face matching purposes), an enhanced version of the template is stored. The enhanced version contains at least all calculated face features (standard template) and optionally also the thumbnails of the enrolled faces (full version), which are needed for upgrades to newer encoder versions. The enhanced template versions are always encrypted, the compact version is encrypted if required by the configuration of the client (slows down search requests).
POST /api/face/v1/enroll/{classId}
classId
The unique class ID of the enrolled person. The class ID is a 64-bit positive number, managed by the client.
This ID, together with a storage name and a partition ID will make up the Biometric Class ID (BCID), which is used to address the created biometric template.
The HTTP request body contains the array of images to enroll.
Content type: application/json
[
{
"image": "string"
}
]
An array of one or more base64 encoded images with the faces to enroll.
Each image should contain a single face and all faces, of course, should belong to the same person.
Images with no face or multiple faces on it will be ignored.
An empty array is allowed. In this case this method simply returns the status of an existing template and,
if possible, upgrades an existing template to a newer encoder version.
The maximum API request size is 50 MB
.
This API requires a valid JWT in the Authorization request header and accepts an optional reference number.
Authorization | Required Bearer authentication. Please refer to BWS API Authentication for a description of how to provide a valid JWT here. |
Reference-Number | Optional, client specific reference number, which will be added to the BWS bookkeeping as well as to the response header. You typically use this reference to link the resulting BWS bookkeeping entries with your logs. |
Content type: application/json
{
"status": "SUCCEEDED",
"errors": [
{
"errorCode": "string",
"message": "string"
}
],
"imageProperties": [
{
"rotated": 0,
"faces": [
{
"leftEye": {
"x": 0,
"y": 0
},
"rightEye": {
"x": 0,
"y": 0
},
"textureLivenessScore": 0,
"motionLivenessScore": 0,
"movementDirection": 0
}
],
"qualityScore": 0,
"qualityAssessments": [
{
"check": "string",
"score": 0,
"message": "string"
}
],
"frameNumber": 0
}
],
"performedAction": "NONE",
"enrolledImages": 0,
"templateStatus": {
"classId": 0,
"available": true,
"enrolled": "string",
"tags": [
"string"
],
"encoderVersion": 0,
"featureVectors": 0,
"thumbnailsStored": 0,
"thumbnails": [
{
"enrolled": "string",
"image": "string"
}
]
}
}
On success the API returns an Enrollment response object with the fields as follows:
status
errors
imageProperties
performedAction
The actual action performed. This is a value out of the EnrollmentAction
enumeration:
NONE
NEW_TEMPLATE_CREATED
TEMPLATE_UPDATED
TEMPLATE_UPGRADED
ENROLLMENT_FAILED
errors
field) and no action was performed.
enrolledImages
templateStatus
In case that the performed_action
field is set to ENROLLMENT_FAILED
, at least one of the following errors is reported in the errors
field:
The call returns one of the standard HTTP status codes, e.g.:
code
and message
.All successful BWS calls return a response header containing additional information about the request:
jobid | The Job-ID (a GUID) that has been assigned to this BWS call. |
bws-version | The version of the BWS gRPC service. |
reference-number | An optional reference number as provided in the request header. |
date | The timestamp when the request has been received at the server. |
... | Other headers that might have been added by the server (NGINX, Kestrel, ...) that was handling the request. |