Bulk editing LUNA ID parameters#
Applies to LUNA ID for iOS only.
LUNA ID allows you to configure runtime parameters in two ways:
- Programmatically in your code
- Declaratively via the LCLunaConfiguration.plist file
Important: These approaches are mutually exclusive at runtime. Changing parameter values in your code will not automatically change them in the LCLunaConfiguration.plist file.
Configuration file#
Using the the LCLunaConfiguration.plist file allows you to bulk edit all the LUNA ID parameters in one place. The file is located in the following directory:
.\luna-id-sdk_ios_v.X.X.X\frameworks\LunaCore.xcframework\ios-arm64\LunaCore.framework\LCLunaConfiguration.plist
To apply the parameters, pass them to the LCLunaConfiguration object:
LCLunaConfiguration(plistFromDocuments: plist)
Example structure of LCLunaConfiguration.plist
Below is an example structure of the file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LCLunaConfiguration</key>
<dict>
<key>multipartBestShotsEnabled</key>
<false/>
<key>glassesCheckEnabled</key>
<false/>
<key>aggregationEnabled</key>
<false/>
<key>ocrEnabled</key>
<false/>
<key>interactionEnabled</key>
<true/>
<key>saveOnlyFaceVideo</key>
<false/>
<key>trackFaceIdentity</key>
<false/>
<key>occludeCheck</key>
<true/>
<key>advancedSunglasses</key>
<false/>
<key>eyeInjury</key>
<true/>
<key>startDelay</key>
<integer>0</integer>
<key>faceTime</key>
<integer>0</integer>
<key>compressionQuality</key>
<real>0.8</real>
<key>documentVerificationMatch</key>
<real>0.7</real>
<key>primaryFaceMatching</key>
<real>0.7</real>
<key>plistLicenseFileName</key>
<string>vllicense.plist</string>
<key>videoRecordLength</key>
<integer>0</integer>
<key>emptyFrameTime</key>
<integer>0</integer>
</dict>
<key>LCBestShotConfiguration</key>
<dict>
<key>livenessType</key>
<integer>1</integer>
<key>eyesCheck</key>
<true/>
<key>borderDistance</key>
<integer>10</integer>
<key>minDetSize</key>
<integer>200</integer>
<key>minFaceSize</key>
<integer>200</integer>
<key>numberOfBestShots</key>
<integer>3</integer>
<key>bestShotInterval</key>
<integer>5</integer>
<key>livenessQuality</key>
<integer>0</integer>
</dict>
<key>LCInteractionsConfig</key>
<dict>
<key>stepsNumber</key>
<integer>3</integer>
<key>interactionTimeout</key>
<integer>5</integer>
<key>timeoutBetweenInteractions</key>
<integer>0</integer>
</dict>
<key>LCEstimationThreshold</key>
<dict>
<key>headPitch</key>
<integer>25</integer>
<key>headYaw</key>
<integer>25</integer>
<key>headRoll</key>
<integer>25</integer>
<key>ags</key>
<real>0.5</real>
</dict>
</dict>
</plist>
Configuration parameters#
The parameters listed in LCLunaConfiguration.plist are as follows:
LCLunaConfiguration section#
| Parameter | Default value | Description |
|---|---|---|
multipartBestShotsEnabled |
false |
Enables or disables the capture of multiple best shots during a single session. For details, see Sending multiple frames for estimation aggregation to the backend. |
emptyFrameTime |
0 | Specifies a timeout within which a face should appear in the frame, otherwise the video session will be terminated. |
glassesCheckEnabled |
false |
Specifies whether the glasses estimation is enabled. |
aggregationEnabled |
false |
Specifies whether aggregation for sunglasses and eye state estimation is enabled. |
ocrEnabled |
false |
Specifies whether OCR (Optical Character Recognition) is enabled. |
interactionEnabled |
true |
Specifies whether Dynamic Liveness interactions with a camera are enabled. |
saveOnlyFaceVideo |
false |
Specifies whether to save video files only with a face detected. |
trackFaceIdentity |
false |
Specifies whether face identity tracking is enabled. |
occludeCheck |
true |
Specifies whether the face occlusion estimation is enabled. |
advancedSunglasses |
false |
Enables or disables advanced sunglasses detection logic. For details, see Getting the best shot with faces with occluded eyes. |
videoRecordLength |
5 | Specifies a video stream length, in seconds. |
eyeInjury |
true |
Specifies whether images with a closed eye can be considered the best shots. For details, see Getting the best shot with faces with closed eyes. |
startDelay |
0 | Specifies a timeout, in seconds, before face recognition begins. |
faceTime |
0 | Specifies a delay, in seconds, to define for how long a user's face should be placed in the face detection bounding box before the best shot is taken. |
plistLicenseFileName |
vllicense.plist |
Specifies the license file. |
compressionQuality |
0.8 | Controls the JPEG compression quality of captured best-shot images, with values typically ranging from 0.0 (lowest quality, smallest file size) to 1.0 (highest quality, largest file size). |
documentVerificationMatch |
0.7 | Determines the match threshold between a face and a photo in a document (when using OCR). |
primaryFaceMatching |
0.7 | Specifies the comparison threshold for 1:1 user verification. |
LCBestShotConfiguration section#
| Parameter | Default value | Description |
|---|---|---|
livenessType |
1 | Specifies the type of OneShotLiveness estimation. |
eyesCheck |
true |
Enables or disables eye state estimation. |
borderDistance |
10 | Specifies the distance from the frame edges and is based on the face detection bounding box size estimation. |
minDetSize |
200 | Specifies a bounding box size. |
minFaceSize |
200 | Specifies the minimum face size in pixels. |
numberOfBestShots |
3 | Specifies the number of frames from which the best shot will be selected. |
bestShotInterval |
5 | Specifies the time interval between attempts to obtain the best shot. |
livenessQuality |
0 | Defines the threshold below which the system will consider the result to be an attempted spoofing attack. |
LCInteractionsConfig section#
| Parameter | Default value | Description |
|---|---|---|
stepsNumber |
3 | Specifies a number of Dynamic Liveness interactions to be performed. |
interactionTimeout |
5 | Specifies a timeout for every Dynamic Liveness interaction to be performed in a random sequence. |
timeoutBetweenInteractions |
0 | Specifies a timeout between Dynamic Liveness interactions. |
LCEstimationThreshold section#
| Parameter | Default value | Description |
|---|---|---|
headPitch |
25 | Specifies the head rotation along the X axis. |
headYaw |
25 | Specifies the head rotation along the Y axis. |
headRoll |
25 | Specifies the head rotation along the Z axis. |
ags |
0,2 | Specifies the source image score for further descriptor extraction and matching. |