Integration with Face API
The integration of the Face API with the Document Reader SDK enables automatic face matching and search using a portrait. The portrait can be extracted from the document Visual Zone or RFID chip, a submitted selfie, or a facial image captured during a liveness transaction. The Document Reader Web Service applies these settings at startup.
To provide the Face API parameters in an individual processing request, see the Usage section.
Add the faceApi section to config.yaml under sdk.processParam:
config.yaml
sdk:
processParam:
faceApi:
livenessTransactionId: "liveness-transaction_id"
url: "https://faceapi.regulaforensics.com"
mode: "match+search"
search: {"limit": 10, "groupIds": ["guid1", "guid2"]}
proxy: "https://proxy:8080"
proxy_userpwd: "Regula%20User:StrongPassword"
proxy_type: "CURLPROXY_SOCKS5"
threshold: 80
serviceTimeout: 2500
childAgeThreshold: 12
childDocValidityYears: 6
The table below describes the faceApi parameters.
| Parameter | Type | Default | Description |
|---|---|---|---|
livenessTransactionId |
string | — | The ID of the liveness transaction from which the captured facial image is used for face matching instead of a submitted selfie. In match+search mode, the facial image captured during the liveness transaction is not returned in the response. |
url |
string | https://faceapi.regulaforensics.com |
The default https://faceapi.regulaforensics.com URL is for demo purposes only. For production use, purchase an appropriate license. Contact Regula about a Face SDK license. |
mode |
string | match |
The processing mode: match or match+search. match compares the persons passed in the request. This mode works by default. match+search matches the persons passed in the request and searches by image. If only one person is available, match is not performed and only the search is carried out. If no search parameters are specified, the search is conducted over the entire database with the default parameters. Learn more in OpenAPI documentation. |
search |
string | — | The search filter applies when the match+search mode is enabled. It may include the limit, threshold, and groupIds parameters. By default, the service searches the default group. If `group IDs are specified, the service searches only these groups. For more information about search operations, see the OpenAPI documentation. |
proxy |
string | — | The proxy to use. Set it according to the cURL standard. |
proxy_userpwd |
string | — | The username and password for proxy authentication. Set them according to the cURL standard. |
proxy_type |
string | — | The proxy protocol type. Set it according to the cURL standard. |
threshold |
integer | 75 |
The similarity threshold is a value from 0 to 100. By default, values above 75 verify face similarity, values below 75 do not verify face similarity. |
serviceTimeout |
integer | 3000 |
The service request timeout, ms. |
childAgeThreshold |
integer | 13 |
The minimum age of a child at which photo comparison is initiated. |
childDocValidityYears |
integer | 5 |
Estimated duration of validity for a child's passport, years. |