3.2 STSilentLivenessDetector

- (instancetype)initWithDetectionModelPath:(NSString )detectionModelPath alignmentModelPath:(NSString )alignmentModelPath frameSelectorModelPath:(NSString )frameSelectorModelPath antiSpoofingModelPath:(NSString )antiSpoofingModelPath licensePath:(NSString *)licensePath setDelegate:(id <STSilentLivenessDetectorDelegate>)delegate;

Initialization method.

- (void)setImageProcessRule:(STSilentLivenessImageProcessRule *)rule;

Set the processing rule for image cropping.

- (void)setBrowOcclusionEnable:(BOOL)enable;

Set whether to perform eyebrow occlusion detection during liveness detection, NO by default.

- (void)setBlurryFilterEnable:(BOOL)enable threshold:(float)threshold;

Set whether to perform blurriness detection during liveness detection, NO by default. The threshold is 1.4 by default.

- (void)setIlluminationFilterEnable:(BOOL)enable darkLightThreshold:(float)darkLightThreshold strongLightThreshold:(float)strongLightThreshold;

Set whether to perform brightness detection during liveness detection, NO by default. The dark light threshold is 1.899 by default. The strong light threshold is 4.997 by default.

- (void)setEyeOpenFilterEnable:(BOOL)enable threshold:(float)threshold;

Set whether to perform eye-opening detection during liveness detection, NO by default. The threshold is 0.47 by default.

- (void)setOcclusionEnable:(BOOL)enable;

Set whether to perform occlusion detection during liveness detection, NO by default.

- (void)setHackThreshold:(float)threshold;

Set the threshold for liveness detection. Need to be called before start to take effect, if not set, 0.88 by default.

- (void)setDetectTimeout:(NSInteger)duration;

The maximum detection time allowed for each module, the default value is 10s, the unit is in seconds.

- (void)setFaceDistanceRateWithFarRate:(CGFloat) farRate closeRate:(CGFloat) closeRate;

Set the judgment conditions for the face distance.

- (void)setPassConditionMinDuration:(NSInteger)minDuration minFrames:(NSInteger)minFrames;

Set the pass condition for the Silent liveness detection.

- (void)inputDataWithSampleBuffer:(CMSampleBufferRef)sampleBuffer faceOrientaion:(STIDSilentLivenessFaceOrientaion)faceOrientation imagePrepareRect:(CGRect)imagePrepareRect;

Liveness detector configuration. Input image for detection.

- (void)start;

Start the detection.

- (void)stop;

Stop the detection.

- (BOOL)isBrowOcclusionEnable;

Obtain the eyebrow occlusion detection switch status.

- (BOOL)isBlurryFilterEnable;

Obtain the blurriness detection switch status.

- (BOOL)isIlluminationFilterEnable;

Obtain the brightness detection switch status.

- (BOOL)isEyeOpenFilterEnable;

Obtain the eye opening detection switch status.

- (BOOL)isOcclusionEnable;

Obtain the occlusion detection switch status.

- (CGFloat)hackThreshold;

Obtain the threshold for liveness detection. Need to be called before start to take effect, if not set, 0.88 by default. If the liveness score is higher than the threshold value, it is judged as a living body, and if the score is lower than the threshold value, detection failed will be displayed.

- (NSInteger)detectTimeout;

Obtain the timeout time.

- (NSInteger)passMinDuration;

Obtain the shortest detection time that can pass the liveness detection.

- (NSInteger)passMinFrames;

Obtain the minimum number of detection frames that can pass the liveness detection.

- (CGFloat)faceFarRate;

Obtain the farthest face distance threshold in the judgment condition.

- (CGFloat)faceCloseRate;

Obtain the closest face distance threshold in the judgment condition.

+ (NSString*)sdkVersion;

Obtain the SDK version.

+ (NSString*)libraryVersion;

Obtain the underlying library version.

Last updated