Skip to content

Face SDK Integration

The integration of Face SDK to Document Reader adds an automatic face match and search by a portrait taken from the document (Visual Zone and RFID-chip) or a live owner photo.

└── FaceApiParams
|   └── url
|   └── mode
|   └── search
|   |   └── limit
|   |   └── threshold
|   |   └── groupIds    
|   └── threshold    
|   └── serviceTimeout
|   └── proxy
|   └── proxyUserPwd
|   └── proxyType
Parameter Default Description
url The URL of the Regula Face SDK service instance to be used.

Note that the default can be used for demo purposes only. For production use, you should purchase an appropriate license. Please contact us here.
mode match The processing mode: "match" or "match+search".

match is a comparison of persons that are passed in the request, works by default.

match+search performs both matching and searching 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 not set A search filter that can be applied if the "match+search" mode is enabled. May include limit, threshold, group_ids. If the group_ids are specified, the search is performed only in these groups. Find more information in the OpenAPI documentation.
threshold 75 The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not.
serviceTimeout 3000 The service request timeout, ms.
proxy not set Proxy to use, should be set according to the cURL standard.
proxyUserPwd not set Username and password to use for proxy authentication, should be set according to the cURL standard.
proxyType not set Proxy protocol type, should be set according to the cURL standard.

To add the Face API integration, invoke:

FaceApiParams faceApiParams = new FaceApiParams();

FaceApiParams.Search search = new FaceApiParams.Search();
search.setGroupIds(new int[]{1, 2, 3});


DocumentReader.Instance().processParams().faceApiParams = faceApiParams;
val faceApiParams = FaceApiParams()
faceApiParams.url = "url"
faceApiParams.mode = "mode"
faceApiParams.serviceTimeout = 4000
faceApiParams.threshold = 90
faceApiParams.proxy = "proxy"
faceApiParams.proxyUserPwd = "user_pwd"
faceApiParams.proxyType = 1

val search = FaceApiParams.Search()
search.limit = 100
search.threshold = 0.9f
search.groupIds = intArrayOf(1, 2, 3) = search

DocumentReader.Instance().processParams().faceApiParams = faceApiParams