Faceplugin Docs
  • Welcome to Faceplugin
  • Face Recognition SDK
    • Face Recognition Android SDK
    • Face Recognition iOS SDK
    • Face Recognition React Native SDK
    • Face Recognition Flutter SDK
    • Face Recognition Ionic-Cordova SDK
    • Face Recognition Dot Net SDK
    • Open Source Face Recognition Windows SDK
    • Open Source Face Recognition Linux SDK
    • Open Source Face Recognition Javascript SDK
    • Open Source Face Recognition React SDK
    • Open Source Face Recognition Vue SDK
  • Liveness Detection SDK
    • Liveness Detection Android SDK
    • Liveness Detection iOS SDK
    • Liveness Detection Linux SDK
  • Palm Recognition SDK
    • Palm Recognition SDK
  • Request a License & Support
  • Contact US
Powered by GitBook
On this page
  • Code
  • Setup
  • APIs
  1. Liveness Detection SDK

Liveness Detection iOS SDK

Face Liveness Detection iOS SDK

PreviousLiveness Detection Android SDKNextLiveness Detection Linux SDK

Last updated 2 months ago

Code

Setup

  1. Copy facesdk.frameworkdirectory to the root folder of your project.

  2. Add SDK framework to the project in Xcode

  3. Add FaceDemo-Bridging-Header.h to Build Settings

APIs

setActivation: This API is used to activate the SDK

+(int)setActivation:(NSString*)license;

Input

  • license (NSString*): The license string

Return value

The SDK activation status code.

  • 0: Success

  • Non-zero: Activation failed

initSDK: This API is used to initialize the SDK

+(int)initSDK;

Input

None

Return value

The SDK initialization status code.

  • 0: Success

  • -1: License Key Error

  • -2: License AppID Error

  • -3: License Expired

  • -4: Activate Error

  • -5: Initialize SDK Error

faceDetection: This API is used to detect faces and determine if the faces are real or fake

+(NSMutableArray*)faceDetection:(UIImage*)image;

Input

  • image (UIImage*): The input image

Return value

An array of FaceBox objects representing the detected faces and their liveness scores.

FaceBox

@interface FaceBox : NSObject

@property (nonatomic) int x1;
@property (nonatomic) int y1;
@property (nonatomic) int x2;
@property (nonatomic) int y2;
@property (nonatomic) float liveness;
@property (nonatomic) float yaw;
@property (nonatomic) float roll;
@property (nonatomic) float pitch;
@end

The liveness score ranges from 0.0 to 1.0

If it's greater than the threshold, it's real face

LogoGitHub - Faceplugin-ltd/FaceLivenessDetection-iOS: Liveness detection SDK iOS- iBeta level 2 certified 3D passive liveness detection engine which can detect printed photos, video replay, 3D masks, and deepfake threatsGitHub