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
|   └── searchParams
|   |   └── limit
|   |   └── threshold
|   |   └── groupIDs    
|   └── threshold    
|   └── serviceTimeout
|   └── proxy
|   └── proxyPassword
|   └── proxyType
Parameter Default Description
url https://faceapi.regulaforensics.com The URL of the Regula Face SDK service instance to be used.

Note that the default https://faceapi.regulaforensics.com 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
searchParams 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.
proxyPassword 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:

let faceApiParams = FaceAPIParams()
faceApiParams.url = "url"
faceApiParams.mode = "match"
faceApiParams.threshold = 90
faceApiParams.proxy = "proxy"
faceApiParams.proxyPassword = "user_pwd"
faceApiParams.proxyType = 1

let faceApiSearchParams = RGLFaceAPISearchParams()
faceApiSearchParams.limit = 100
faceApiSearchParams.threshold = 0.9
faceApiSearchParams.groupIDs = [1, 2, 3]
faceApiParams.searchParams = faceApiSearchParams

DocReader.shared.processParams.useFaceApi = true
DocReader.shared.processParams.faceApiParams = faceApiParams
RGLFaceAPIParams *faceApiParams = [[RGLFaceAPIParams alloc] init];
faceApiParams.url = @"url";
faceApiParams.mode = @"match";
faceApiParams.threshold = @90;
faceApiParams.proxy = @"proxy";
faceApiParams.proxyPassword = @"user_pwd";
faceApiParams.proxyType = @1;

RGLFaceAPISearchParams *faceApiSearchParams = [[RGLFaceAPISearchParams alloc] init];
faceApiSearchParams.limit = @100;
faceApiSearchParams.threshold = @0.9f;
faceApiSearchParams.groupIDs = @[@1, @2, @3];
faceApiParams.searchParams = faceApiSearchParams;

RGLDocReader.shared.processParams.useFaceApi = @YES;
RGLDocReader.shared.processParams.faceApiParams = faceApiParams;