ActivePassiveLivenessDetectionModel

A class derived from LivenessDetectionModel containing details specific to active passive liveness detection

Declaration

@objc final public class ActivePassiveLivenessDetectionModel : LivenessDetectionModel {
    @objc final public var livenessConfidence: Float { get }
    @objc final public var livenessDetectionQuestions: [LivenessDetectionQuestion] { get }
    
    @objc final public func actionImages() -> [UIImage]
    @objc final public func focusImages() -> [UIImage]
    @objc override final public func saveImages()
    override final public func encode(to encoder: Encoder) throws
}

Only relevant details are shown, boilerplate or standard Swift generated code is omitted

Summary

Public variables

Public methods

Public variables

livenessConfidence

@objc final public var livenessConfidence: Float { get }

The liveness confidence of the passive liveness detection.

Range: 0 - 1

Due to the laws of physics and limitations that exists between humans and machines, values will rarely be exactly 1 or 0 but should not be discredited.

The closer the value is to 0 the more the subject is perceived to be a spoof. The closer the value is to 1 the more the subject is perceived to be genuine.

livenessDetectionQuestions

@objc final public var livenessDetectionQuestions: [LivenessDetectionQuestion] { get }

An array containing all the actions that were executed during active liveness detection.

Public methods

actionImages()

@objc final public func actionImages() -> [UIImage]

Returns an array of images from the liveness detection question action images.

focusImages()

@objc final public func focusImages() -> [UIImage]

Returns an array of images from the liveness detection question focus images.

saveImages()

@objc override final public func saveImages()

This function also calls its super function

Iterates through all the liveness detection questions and calls saveImages() on each question.

encode(to encoder: Encoder)

override final public func encode(to encoder: Encoder) throws

This function also calls its super function

Encodes the model using the encoder provided. Used to convert the model to JSON.

See also

Where this is used

Last updated