create

fun create(livenessFormat: Bitmap.CompressFormat = DEFAULT_LIVENESS_FORMAT, compressionQuality: Int = DEFAULT_LIVENESS_COMPRESSION_QUALITY, detectorStep: Int = DEFAULT_DETECTOR_STEP, skipFrames: Int = DEFAULT_SKIP_FRAMES, minimalTrackLength: Int = DEFAULT_MINIMAL_TRACK_LENGTH, bestShotsCount: Int = DEFAULT_BEST_SHOTS_COUNT, bestShotInterval: Long = DEFAULT_BEST_SHOTS_INTERVAL, headPitch: Float = DEFAULT_HEAD_PITCH, headYaw: Float = DEFAULT_HEAD_YAW, headRoll: Float = DEFAULT_HEAD_ROLL, ags: Float = DEFAULT_AGS, livenessType: LivenessType = DEFAULT_LIVENESS_TYPE, acceptOneEyed: Boolean = DEFAULT_ACCEPT_ONE_EYED, acceptOccludedFaces: Boolean = DEFAULT_ACCEPT_OCCLUDED_FACES, acceptMask: Boolean = DEFAULT_ACCEPT_MASK, foundFaceDelay: Long = DEFAULT_FOUND_FACE_DELAY, interactionDelayMs: Long = DEFAULT_INTERACTION_DELAY_MS, acceptEyesClosed: Boolean = DEFAULT_ACCEPT_EYES_CLOSED, glassesChecks: Set<GlassesCheckType> = DEFAULT_GLASSES_CHECKS, usePrimaryFaceTracking: Boolean = DEFAULT_USE_PRIMARY_FACE_TRACKING, faceSimilarityThreshold: Float = DEFAULT_SIMILARITY_THRESHOLD, livenessQuality: Float = DEFAULT_LIVENESS_QUALITY, livenessNetVersion: LivenessNetVersion = DEFAULT_LIVENESS_NET, multipartBestShotsEnabled: Boolean = DEFAULT_MULTIPART_BEST_SHOTS_ENABLED, eyesAggregationEnabled: Boolean = DEFAULT_EYE_AGGREGATION_ENABLED, glassesAggregationEnabled: Boolean = DEFAULT_GLASSES_AGGREGATION_ENABLED, faceOcclusionAggregationEnabled: Boolean = DEFAULT_FACE_OCCLUSION_AGGREGATION_ENABLED, savingInteractionFrames: Boolean = DEFAULT_SAVING_INTERACTION_FRAMES, strictlyMinSize: Boolean = DEFAULT_STRICTLY_MIN_SIZE, blurThreshold: Float = DEFAULT_BLUR_THRESHOLD, lightThreshold: Float = DEFAULT_LIGHT_THRESHOLD, darknessThreshold: Float = DEFAULT_DARKNESS_THRESHOLD, minFaceSize: Int = DEFAULT_MIN_FACE_SIZE, descriptorVersion: Int = DEFAULT_DESCRIPTOR_VERSION, useDescriptors: Boolean = DEFAULT_USE_DESCRIPTORS): LunaConfig

Create config with given parameters and validate it.

Parameters

livenessFormat

Format for saving liveness images.

compressionQuality

Quality of the image sent to liveness. The value 0 represents the maximum compression.

detectorStep

The count of frames between frames with full detection.

skipFrames

If there is no detection in estimated area, wait this number of frames and stop the track.

minimalTrackLength

Minimum detections count to consider track as a real face.

bestShotsCount

Number of the best shots that need to be collected for liveness.

bestShotInterval

Time interval between taking best shots for liveness.

headPitch

Head pitch threshold in degrees.

headYaw

Head yaw threshold in degrees.

headRoll

Head roll threshold in degrees.

ags

AGS threshold.

livenessType

Liveness type.

acceptOneEyed

Whether one-eyed faces are accepted.

acceptOccludedFaces

Whether occluded faces are accepted.

acceptMask

Whether faces wearing a mask are accepted..

foundFaceDelay

Delay after a face is detected before starting best shots collection for liveness.

interactionDelayMs

Delay between interactions in milliseconds.

acceptEyesClosed

Whether faces with eyes closed are accepted.

glassesChecks

Frames where the detected face matches a glasses type from this set will not be included in the best shots collection

usePrimaryFaceTracking

Security feature. If true, the flow will be performed on the primary face only.

faceSimilarityThreshold

Similarity threshold used when usePrimaryFaceTracking is enabled. Determines how closely the detected face must match the previous frame to be considered the same face.

livenessQuality

Liveness quality threshold.

livenessNetVersion

Version of the liveness network.

multipartBestShotsEnabled

Enable multipart best shots collection.

eyesAggregationEnabled

Enable eye check aggregation.

glassesAggregationEnabled

Enable eye check aggregation.

faceOcclusionAggregationEnabled

Enable face occlusion checking aggregation.

savingInteractionFrames

If true, frames where the user interacts will be saved.

strictlyMinSize

Enforced minimum face size.

blurThreshold

The blur threshold.

lightThreshold

The light threshold.

darknessThreshold

The darkness threshold.

minFaceSize

Minimum face size in pixels.