Skip to content

Settings#

System settings#

Parameter Description Type Default value
verboseLogging Level of log verbosity. 1 - Errors, 2 - Warnings, 3 - Info, 4 - Debug. "Value::Int1" 2

Verbosity level sets the upper limit of what type of messages may be printed out by the Luna SDK. For example, if user set verboseLogging to 3, it means that Errors, Warnings and Info messages will be printed out to the console. Verbose level of 0 indicates that there are no logging messages printed out at all.

Example:

<section name="system">
    <param name="verboseLogging" type="Value::Int1" x="0" />
</section>

Descriptor factory settings#

Descriptor factory is a facility that creates descriptor extractors and matchers. Both of them utilize algorithms that require a number of coefficients ("weights") to operate properly.

Parameter Description Type Default value
model CNN face descriptor version. "Value::Int1" 59
Possible values: 59
useMobileNet MobileNet is faster but less accurate. Possible values: 0 - don't use mobile net version, 1 - use mobile net version. "Value::Int1" 1
distance Distance between descriptors on matching. L1 faster, L2 make better precision. Possible values: L1, L2. Model 59 supports just L2 distance. "Value::String" "L2"
descriptorCount WarningLevel Threshold, that limits the ratio of created descriptors to the amount, defined by your license. When the threshold is exceeded, FSDK prints the warning. "Value::Float1" 0.9
calcSimilarity Enable similarity calculation during matching process. Possible values: 1 - enable, 0 - disable. "Value::Int1" 1
calcDistanceSqrt Enable calculation of the square root of distance. Possible values: 1 - enable, 0 - disable "Value::Int1" 1

Example:

<section name="DescriptorFactory::Settings">
    <param name="model" type="Value::Int1" x="59" />
    <param name="useMobileNet" type="Value::Int1" x="1" />
    <param name="distance" type="Value::String" text="L2" />
    <param name="descriptorCountWarningLevel" type="Value::Float1" x="0.9" />
    <param name="calcSimilarity" type="Value::Int1" x="1" />
    <param name="calcDistanceSqrt" type="Value::Int1" x="1" />
</section>

FaceDetV2 detector settings#

Parameter Description Type Default value
FirstThreshold 1-st threshold in [0..1] range. "Value::Float1" 0.6
SecondThreshold 2-nd threshold in [0..1] range. "Value::Float1" 0.7
ThirdThreshold 3-d threshold in [0..1] range. "Value::Float1" 0.6
minFaceSize Minimum face size in pixels. "Value::Int1" 50
strictlyMinSize Enforce Minimum face size. "Value::Int1" 0
scaleFactor Image scale factor. "Value::Float1" 0.7
paddings Extension of rectangle. Do not change. "Value::Float4" see below
redetectTolerance Redetection threshold. "Value::Int1" 0
useLNet Whether to use LNet or not. "Value::Int" 1

minFaceSize and scaleFactor accelerate face detection at the cost of lower recall for smaller faces.

If the strictlyMinSize parameter is enabled (the value is equal to 1), all detections with a size (max of width/height ) smaller than minFaceSize will be excluded from the final result.

Example:

<section name="FaceDetV2::Settings">
        <param name="FirstThreshold" type="Value::Float1" x="0.51385"/>
        <param name="SecondThreshold" type="Value::Float1" x="0.248"/>
        <param name="ThirdThreshold" type="Value::Float1" x="0.76"/>
        <param name="minFaceSize" type="Value::Int1" x="50" />
        <param name="strictlyMinSize" type="Value::Int1" x="0" />
        <param name="scaleFactor" type="Value::Float1" x="0.7" />
        <param name="paddings" type="Value::Float4" x="-0.20099958" y="0.10210337" z="0.20363552" w="0.08490226" />
        <param name="redetectTolerance" type="Value::Int1" x="0" />
        <param name="useLNet" type="Value::Int1" x="0" />
</section>

LNet#

This group of parameters is non-public. Do not change any of the parameters.

HeadPoseEstimator settings#

In mobile mode, HeadPose estimator is able to compute head pose angles using raw input image data.

EyeEstimator settings#

This estimator aims to determine:

  • Eye state: Open, Closed, Occluded;
  • Precise eye iris location as an array of landmarks;
  • Precise eyelid location as an array of landmarks.

To determine more exact eye state additional auxiliary model eye_status_estimation_flwr*.plan is used. You can enable this auxiliary model through config (faceengine.conf).

Parameter Description Type Default value
useStatusPlan 0 - Off, 1 - On "Value::Int1" 1

Example:

<section name="EyeEstimator::Settings">
    <param name="useStatusPlan" type="Value::Int1" x="1"/>
</section>

Medical mask estimator settings#

Medical mask estimator predicts predominant mask features.

Estimator accuracy depends on thresholds listed below.

If accuracy (low FPR) is more important, TPR could be sacrificed by heightening the threshold.

Corresponding FPR and TPR values are also listed below.

Thresholds for MedicalMaskEstimation#

The below parameters specify parameter thresholds in the [0..1] range and are of the "Value::Float1" type.

Parameter Threshold range Default threshold FPR range TPR range
maskThreshold 0.65 - 0.9 0.65 0.014 - 0.01 0.976 - 0.886
noMaskThreshold 0.65 - 0.79 0.65 0.01 - 0.005 0.94 - 0.903
occludedFaceThreshold 0.5 - 0.602 0.5 0.016 - 0.01 0.924 - 0.881

Thresholds for MedicalMaskEstimationExtended#

The below parameters specify parameter thresholds in the [0..1] range and are of the "Value::Float1" type.

Parameter Threshold range Default threshold FPR range TPR range
maskExtendedThreshold 0.65 - 0.784 0.65 0.013 - 0.01 0.923 - 0.894
noMaskExtendedThreshold 0.65 - 0.79 0.65 0.01 - 0.005 0.94 - 0.903
maskNotInPlaceExtendedThreshold 0.65 - 0.85 0.65 0.009 - 0.005 0.918 - 0.833
occludedFaceExtendedThreshold 0.5 - 0.602 0.5 0.016 - 0.01 0.924 - 0.881

Example:

<section name="MedicalMaskEstimatorV3::Settings">
        <param name="maskExtendedThreshold" type="Value::Float1" x="0.65"/>
        <param name="noMaskExtendedThreshold" type="Value::Float1" x="0.65"/>
        <param name="maskNotInPlaceExtendedThreshold" type="Value::Float1" x="0.65"/>
        <param name="occludedFaceExtendedThreshold" type="Value::Float1" x="0.5"/>
        <param name="maskThreshold" type="Value::Float1" x="0.65"/>
        <param name="noMaskThreshold" type="Value::Float1" x="0.65"/>
        <param name="occludedFaceThreshold" type="Value::Float1" x="0.65"/>
</section>

Mouth Estimator settings#

Mouth estimator predicts predominant mouth state.

Estimator accuracy depends on thresholds listed below.

FPR and TPR values are specified for 0.5 threshold

"Thresholds for MouthEstimation"

Parameter Description Type Default value Threshold range TPR FPR
occlusionThreshold Threshold in the [0..1] range "Value::Float1" 0.5 0.4 - 0.6 0.96 0.009
smileThreshold Threshold in the [0..1] range. "Value::Float1" 0.5 0.4 - 0.6 0.97 0.04
openThreshold Threshold in the [0..1] range. "Value::Float1" 0.5 0.4 - 0.6 0.986 0.01

Example:

<section name="MouthEstimator::Settings">
    <param name="occlusionThreshold" type="Value::Float1" x="0.5"/>
    <param name="smileThreshold" type="Value::Float1" x="0.5"/>
    <param name="openThreshold" type="Value::Float1" x="0.5"/>
</section>

## Face Occlusion Estimator Settings {#face-occlusion-estimator-settings} The Face Occlusion estimator predicts occlusion of various face areas such as the forehead, eyes, nose, mouth, and lower face.

Estimator accuracy depends on thresholds listed below.

Parameter Description Type Default Threshold range
normalHairCoeff Threshold for hair*. "Value::Float1" 0.15 0.0 - 1.0
overallOcclusionThreshold Overall threshold. "Value::Float1" 0.07 0.0 - 1.0
foreheadThreshold Threshold for forehead. "Value::Float1" 0.2 0.0 - 1.0
eyeThreshold Threshold for eye. "Value::Float1" 0.15 0.0 - 1.0
noseThreshold Threshold for nose. "Value::Float1" 0.2 0.0 - 1.0
mouthThreshold Threshold for mouth. "Value::Float1" 0.15 0.0 - 1.0
lowerFaceThreshold Threshold for lower face. "Value::Float1" 0.2 0.0 - 1.0

Note: The normalHairCoeff parameter defines whether the presence of hair is considered when analyzing face occlusion. If hair occlusion percentage is lower than normalHairCoeff the presence of hair is not taken into account. Otherwise the surplus of hair occlusion is added to the overall face occlusion percentage. For instance, if overall face occlusion score without hair is 0.05, overall face occlusion score with hair is 0.2, and normalHairCoeff is 0.15, then the resulting overall face occlusion score will be 0.05 + (0.2 - 0.15) = 0.1.

Example:

<section name="FaceOcclusionEstimator::Settings">
    <param name="normalHairCoeff" type="Value::Float1" x="0.15"/>
    <param name="overallOcclusionThreshold" type="Value::Float1" x="0.07"/>
    <param name="foreheadThreshold" type="Value::Float1" x="0.2"/>
    <param name="eyeThreshold" type="Value::Float1" x="0.15"/>
    <param name="noseThreshold" type="Value::Float1" x="0.2"/>
    <param name="mouthThreshold" type="Value::Float1" x="0.15"/>
    <param name="lowerFaceThreshold" type="Value::Float1" x="0.2"/>
</section>

Quality estimator settings#

Quality estimator looks at several image parameters, like lightness (think overexposure), darkness (think underexposure), blurriness, illumination uniformity value, specularity value. Every float value is comparing with according threshold.

Parameter Type Default value
blurThreshold "Value::Float1" x="0.61"
lightThreshold "Value::Float1" x="0.57"
darknessThreshold "Value::Float1" x="0.50"
illuminationThreshold "Value::Float1" x="0.1"
specularityThreshold "Value::Float1" x="0.1"
usePlanV1 "Value::Int1" x="1"
usePlanV2 "Value::Int1" x="1"

Example:

<section name="QualityEstimator::Settings">
    <param name="blurThreshold" type="Value::Float1" x="0.61"/>
    <param name="lightThreshold" type="Value::Float1" x="0.57"/>
    <param name="darknessThreshold" type="Value::Float1" x="0.50"/>
    <param name="illuminationThreshold" type="Value::Float1" x="0.1"/>
    <param name="specularityThreshold" type="Value::Float1" x="0.1"/>
    <param name="usePlanV1" type="Value::Int1" x="1" />
    <param name="usePlanV2" type="Value::Int1" x="1" />
</section>

Note: usePlanV1 toggles the Quality estimation, usePlanV2 toggles the SubjectiveQuality estimation. Note that you cannot disable both the parameters at the same time. In case you do this, you will receive the fsdk::FSDKError::InvalidConfig error code and the following logs:

[27.06.2024 12:38:59] [Error] QualityEstimator::Settings Failed to create QualityEstimator! The both parameters: "usePlanV1" and "usePlanV2" in section "QualityEstimator::Settings" are disabled at the same time.

GlassesEstimator settings#

The glasses estimator estimates what types of glasses, if any, a person is currently wearing. Estimation quality depends on threshold values listed below. These threshold values are set to optimal by default.

Parameter Description Type Default value
noGlassesThreshold noGlasses threshold in [0..1] range. "Value::Float1" 1
eyeGlassesThreshold eyeGlasses threshold in [0..1] range. "Value::Float1" 1
sunGlassesThreshold sunGlasses threshold in [0..1] range. "Value::Float1" 1

Example:

<section name="GlassesEstimator::Settings">
    <param name="noGlassesThreshold" type="Value::Float1" x="1"/>
    <param name="eyeGlassesThreshold" type="Value::Float1" x="1"/>
    <param name="sunGlassesThreshold" type="Value::Float1" x="1"/>
</section>

LivenessOneShotRGBEstimator settings#

This estimator tells whether the person's face is real or fake (photo, printed image). Thresholds are listed below.

Liveness protects from presentation attacks - when user tries to cheat biometric system by demonstrating fake face to the face capturing camera, but not from image substitution attacks - when fake image is sent directly to the system, bypassing the camera.

LivenessOneShotRGBEstimator supports images, which are captured on Mobile devices or Webcam (PC or laptop). Correct working of the estimator with other source images is not guaranteed.

Supported shooting mode: cooperative, which means that user must interact with the camera and look at it.

User scenarios examples: authentication in mobile application, confirmation of transactions with biometric facial verification.

Image resolution minimum requirements:

  • Mobile devices - 720 × 960 px
  • Webcam (PC or laptop) - 1280 x 720 px
Parameter Description Type Default value
netType NET version. "Value::Int1" 0
realThreshold Threshold in [0..1] range. "Value::Float1" 0.5
qualityThreshold Threshold in [0..1] range. "Value::Float1" 0.5
calibrationCoeff Coefficient in [0..1] range. "Value::Float1" 0.89
mobileRealThreshold Threshold in [0..1] range. "Value::Float1" 0.5
mobileQualityThreshold Threshold in [0..1] range. "Value::Float1" 0.5
mobileCalibrationCoeff Coefficient in [0..1] range. "Value::Float1" 0.968
liteRealThreshold Threshold in [0..1] range. "Value::Float1" 0.5
liteQualityThreshold Threshold in [0..1] range. "Value::Float1" 0.5
liteCalibrationCoeff Coefficient in [0..1] range. "Value::Float1" 0.991
<section name="LivenessOneShotRGBEstimator::Settings">
    <param name="netType" type="Value::Int1" x="0" />
    <!--Parameters for backend version (netType == 0) -->
    <param name="realThreshold" type="Value::Float1" x="0.5"/>
    <param name="qualityThreshold" type="Value::Float1" x="0.5" />
    <param name="calibrationCoeff" type="Value::Float1" x="0.89"/>
    <!--Parameters for mobile version (netType == 1) -->
    <param name="mobileRealThreshold" type="Value::Float1" x="0.5"/>
    <param name="mobileQualityThreshold" type="Value::Float1" x="0.5" />
    <param name="mobileCalibrationCoeff" type="Value::Float1" x="0.968"/>
    <!--Parameters for lite version (netType == 2) -->
    <param name="liteRealThreshold" type="Value::Float1" x="0.5"/>
    <param name="liteQualityThreshold" type="Value::Float1" x="0.5" />
    <param name="liteCalibrationCoeff" type="Value::Float1" x="0.991"/>
</section>