Service configuration#
Configure Selinux and Firewall so that they do not block the service.
Navigate to the /lunapassapi directory:
cd /var/lib/luna-pass/current/lunapassapi
In the configuration files lunapassapi.config.toml
, lunapassvideo.config.toml
, lunapassvideo.task.py
, make the necessary settings corresponding to the actual parameters (Table 10).
Table 10. LUNA PASS configuration parameters
Parameter |
Description |
---|---|
LUNA PASS configuration parameters |
|
env |
Mode:
For more information see the "Logging and debugging" section Default: production |
host |
IP address where the service will be launched Default: 0.0.0.0 |
port |
Port on which the service will be launched Default: 8321 |
logLevel |
Logging level Available values:
Default: 1 |
logFile |
Logging file By default, logs are written to the console. Enable the Default: - |
FACEENGINE configuration parameters |
|
sdkBindingsPath |
Path to Python bindings Default: /fsdk/pythonBindings/build |
sdkDataPath |
Path to data directory Default: /fsdk/data |
sdkLicensePath |
Path to the license file. Default: /fsdk/data/license.conf |
Configuration parameters LUNA_PASS.JWT |
|
algorithm |
Successful frame encryption algorithm Default: HS256 |
key |
Successful frame encryption secret Default: secret |
LIVENESS configuration parameters |
|
maxAttempts |
Maximum number of frames received within 1 session. If the value is exceeded, the current frame is sent as is and the connection is terminated. If no value is present, the frames are checked until there is a successfully passed Liveness Default: 100 |
maxLivenessAttempts |
The maximum number of frames that have reached the Liveness estimation. If the value is exceeded, the current frame is sent as is and the connection is terminated. If no value is present, the frames are checked until there is a successfully passed Liveness Default: 75 |
LIVENESS.THRESHOLDS estimation thresholds |
|
blur |
Photo blurring Default: 0.61 |
light |
Backlighting of the photo image Default: 0.57 |
dark |
Darkening of the photo image Default: 0.5 |
illumination |
Uniformity of image illumination, 0 – uniform, 1 – there are overexposures Default: 0.1 |
specularity |
Glare on the image, 0 – no glare, 1 – there are glare Default: 0.1 |
ags |
Predictive estimation of whether an incoming image is suitable for further comparing Default: 0.8 |
Face parameters |
|
faceWidth |
Face frame width Default: 150 |
faceHeight |
Face frame height Default: 150 |
yaw |
Rotation around the vertical axis of the head Default: 20 |
pitch |
Rotation around the transverse axis of the head Default: 20 |
roll |
Rotation around the longitudinal axis of the head Default: 20 |
mouth |
Required accuracy of mouth status assessment Default: 0.4 |
glasses |
Availability of glasses. Available values:
Default: ['GlassesEstimation.NoGlasses', 'GlassesEstimation.EyeGlasses'] |
deepfake |
Required accuracy of the Deepfake estimation. Comment out the line the corresponding threshold to disable checking Default: 0.7 |
livenessScore |
Thresholds for the OneShot Liveness test result at which a person will be considered «alive» Default: 0.7 |
multifacePolicy |
Policy for selecting a person to check Liveness. Available values:
Default: 0 |
LIVENESS.THRESHOLDS.ROI—configuration of the face recognition zone |
|
centerX |
The center of the ROI zone along the X axis Default: 50 The
Default: |
centerY |
The center of the ROI zone along the Y axis Default: 50 The
Default: |
width |
The width of the ROI zone Default: 90 The
Default: |
height |
Height of the ROI zone Default: 90 The
Default: |
Configuration options for query plugins |
|
MIDDLEWARES.REQUEST.BasicAuth plugin |
|
isEnabled |
BASIC authorization Default: 0 |
args.username |
Login for Basic Auth Default: - |
args.password |
Password for Basic Auth Default: - |
args.origin |
ORIGIN header to protect against Cross-Site WebSocket Hijacking. Can represent the ip address of the server when accessed by ip address or the domain when accessed by domain name Default: - |
MIDDLEWARES.WS.FaceMatcher plugin |
|
isEnabled |
This feature increases resource consumption and may result in poor performance. Number of faces allowed per session:
Default: 1 |
args.similarity |
Similarity threshold. If the similarity value is below the threshold, then it is considered that the frames have different faces and the session is terminated Default: 0.85 |
MIDDLEWARES.WS.VirtualCameraChecker plugin |
|
isEnabled |
Check frames for use of a virtual camera Default: 1 |
MIDDLEWARES.WS.FileLogger plugin |
|
isEnabled |
Saves all incoming photos and the results of their estimation within one session to a file Default: 1 |
args.path |
Path for saving file logs Default: './LOGS' |
MIDDLEWARES.WS.AggregateLiveness plugin |
|
isEnabled |
Aggregation of Liveness by N frames Default: 1 |
args.framesCount |
Number of frames to be aggregated Default: 5 |
Plugin MIDDLEWARES.WS.ActiveLiveness |
|
isEnabled |
Active Liveness Default: 1 |
args.cooldownFramesCount |
Minimum number of frames after passing active Liveness Default: 0 |
args.interactionsCount |
Number of user interactions used, maximum 5 Default: 2 |
args.acceptOneEyed |
Allow user interaction with one eye to blink Default: 0 |
args.yawStartDeg |
Initial angle of rotation at which it is possible to begin interaction with head turns Default: 10 |
args.yawThresholdDeg |
Threshold angle of rotation at which interaction on head turns is considered completed Default: 20 |
args.pitchStartDeg |
The initial head tilt angle at which it is possible to begin head tilt interaction Default: 10 |
args.pitchThresholdDeg |
The head tilt angle threshold at which the head tilt interaction is considered completed Default: 20 |
MIDDLEWARES.WS.VideoRedis |
|
isEnabled |
Plugin for sending session frames to Redis Default: 1 |
args.connectionString |
Redis connection string Default: |
args.queueName |
Redis queue name for working with video Default: default |
args.resultTtl |
How long does Redis store information about the success of tasks and their results Default:500s |
args.failureTtl |
How long Redis stores information about unsuccessful tasks Default: 1y |
args.sessionTimeout |
Number of seconds to start building video after session termination if no bestshot is available Default: 300 |
args.workerTask |
The name of the task that lunapassworker will run when it receives a task to build a video Default: task.run |
args.framesLimit |
Limit the maximum number of frames in a video:
Default: 0 |