Optional quality checks¶
Supported optional checks¶
public enum OptionalCheck {
/// The eyes are closed.
case eyesClosed
/// The image is too dark.
case darkImage
/// The face is too blurry.
case faceBlurry
/// The mouth is open.
case mouthOpen
/// Sunglasses are detected.
case sunglassesDetected
}
By default optional quality checks are disabled. You can enable an optional quality check using IDLiveFaceDetectionSettings.OptionalCheck
:
let vc = IDCameraController.instantiate()
let optionalChecks: Set<IDLiveFaceDetectionSettings.OptionalCheck> = [.eyesClosed, .mouthOpen]
let newFaceDetectionSetting = IDLiveFaceDetectionSettings(optionalChecks: optionalChecks)
vc.faceDetectorSettings.faceDetectionSdkSettings = newFaceDetectionSetting
NOTE: this setting must be set before you change the
vc.captureMode
or override the default detection engine withvc.faceDetectorSettings.useEngines(...)
.