Help Center
  • Welcome to KBY-AI
  • Product
    • Face Liveness Detection SDK, Face Recognition SDK
      • Basic SDK - Mobile
        • Basic SDK - Android
        • Basic SDK - iOS
      • Standard SDK - Mobile
        • Standard SDK - Android
        • Standard SDK - iOS
      • Premium SDK - Mobile
        • Premium SDK - Android
        • Premium SDK - iOS
      • Face Liveness Detection SDK - Server
      • Face Recognition SDK - Server
    • ID Card Recognition SDK
      • ID Card Recognition SDK - Android
      • ID Card Recognition SDK - iOS
      • ID Card Recognition SDK - Server
      • Supported Documents
      • Result Parsing
    • ID Document Liveness Detection SDK
    • ID Document Auto Capture Web
    • Palm Recognition SDK
      • Palmprint Recognition SDK - Server
      • Palmvein Recognition SDK - Server
    • Automatic License Plate/Number Recognition SDK
      • License Plate Recognition-Server
      • License Plate Recognition-Flutter
      • License Plate Recognition-Android
    • Computer Vision Solutions
      • Fire/Smoke Detection-Server
  • Demo Projects
    • Mobile (Android, iOS)
      • FaceLivenessDetection - Android
      • FaceLivenessDetection - iOS
      • FaceRecognition - Android
      • FaceRecognition - iOS
      • FaceRecognition - Flutter
      • FaceRecognition - Ionic-Cordova
      • FaceRecognition - React-Native
      • FaceAttribute - Android
      • FaceAttribute - iOS
      • FaceAttribute - Flutter
      • IDCardRecognition - Android
      • IDCardRecognition - iOS
      • License Plate Recognition-Flutter
      • License Plate Recognition-Android
    • Server (Windows, Linux)
      • FaceLivenessDetection - Windows
      • FaceLivenessDetection - Docker
      • FaceLivenessDetection - C# - .NET
      • FaceRecognition - Windows
      • FaceRecognition - Docker
      • FaceRecognition - C# - .NET
      • IDCardRecognition - Windows
      • IDCardRecognition - Docker
      • IDCardRecognition - C# - .NET
      • Palm Print Recognition SDK - Docker
      • Palm Vein Recognition SDK - Docker
      • License Plate Recognition-Docker
      • License Plate Recognition - C# - .NET
  • FAQ
    • How can I set up a Kubernetes system?
    • Has KBY-AI's facial algorithm been certified by a reliable standard measurement authority?
    • Accelerating KBY-AI SDKs with Kubernetes Configuration
Powered by GitBook
On this page
  • Features
  • License
  • System Requirements
  • Setup
  • Initializing SDK
  • Enums and Classes
  • 1. SDK_ERROR
  • 2. FaceBox
  • APIs
  • 1. setActivation
  • 2. initSDK
  • 3. faceDetection
  • 4. templateExtraction
  • 5. similarityCalucation
  • Default Thresholds
  1. Product
  2. Face Liveness Detection SDK, Face Recognition SDK
  3. Premium SDK - Mobile

Premium SDK - iOS

Face anti-spoofing, liveness check, face recognition, age/gender estimation, face landmark extraction, face occlusion detection, face quality calculation, eye closure detection, post estimation

Features

License

We offer lifetime license(perpetual license) based on bundle ID for iOS SDKs. The license is available for one-time payment. In other words, once you purchase license from me, you can use our SDK permanently.

To request a license, please contact us:

Email: contact@kby-ai.com

Telegram: @kbyai

WhatsApp: +19092802609

System Requirements

  • CPU: 2 cores or more

  • RAM: 150MB or more

  • OS: iOS 13.0 or later

  • Architecture: arm64-v8a

Setup

  1. Copy the SDK (facesdk.framework folder) to the root folder of your project.

  2. Add SDK framework to the project in Xcode.

Project Navigator -> General -> Frameworks, Libraries, and Embedded Content

  1. Add the bridging header to your project settings

Project Navigator -> Build Settings -> Swift Compiler - General

Initializing SDK

  1. Step one

  • To begin, you need to activate the SDK using the license that you have received.

FaceSDK.setActivation("...")
  • If activation is successful, the return value will be SDK_SUCCESS. Otherwise, an error value will be returned.

  1. Step Two

  • After activation, call the SDK's initialization function.

FaceSDK.initSDK()
  • If initialization is successful, the return value will be SDK_SUCCESS. Otherwise, an error value will be returned.

Enums and Classes

1. SDK_ERROR

This enumeration represents the return value of the initSDK and setActivation functions.

Feature
Value
Name

Successful activation or initialization

0

SDK_SUCCESS

License key error

-1

SDK_LICENSE_KEY_ERROR

AppID error (Not used in Server SDK)

-2

SDK_LICENSE_APPID_ERROR

License expiration

-3

SDK_LICENSE_EXPIRED

Not activated

-4

SDK_NO_ACTIVATED

Failed to initialize SDK

-5

SDK_INIT_ERROR

2. FaceBox

This class represents the output of the face detection function that contains the detected face rectangle, liveness score, and facial angles such as yaw, roll, and pitch`.

Feature
Type
Name

Face rectangle

int

x1, y1, x2, y2

Face angles (-45 ~ 45)

float

yaw, roll, pitch

Liveness score (0 ~ 1)

float

liveness

Face quality (0 ~ 1)

float

face_quality

Face luminance (0 ~ 255)

float

face_luminance

Face occlusion (0 ~ 1)

float

face_occlusion

Eye closure (0 ~ 1)

float

left_eye, right_eye

Mouth opening (0 ~ 1)

float

mouth_opened

Age, Gender

int

age, gender

68 points facial landmark

Data

landmark

APIs

1. setActivation

To begin, you need to activate the SDK using the license that you have received.

var ret = FaceSDK.setActivation("...")

If activation is successful, the return value will be SDK_SUCCESS. Otherwise, an error value will be returned.

2. initSDK

After activation, call the SDK's initialization function.

ret = FaceSDK.initSDK()

If initialization is successful, the return value will be SDK_SUCCESS. Otherwise, an error value will be returned.

3. faceDetection

The SDK offers a single function for detecting face and liveness detection, which can be used as follows:

let templates = FaceSDK.templateExtraction(image, faceBox: faceBox)

This function takes a single parameter, which is a UIImage object.

The return value of the function is a list of FaceBox objects.

4. templateExtraction

The FaceSDK provides a function that can generate a template from a UIImage.

This template can then be used to verify the identity of the individual captured in the image.

let templates = FaceSDK.templateExtraction(capturedImage, faceBox: faceBox)

The SDK's template extraction function takes two parameters: a UIImage object and an object of FaceBox.

The function returns Data, which contains the template that can be used for person verification.

5. similarityCalucation

The similarityCalculation function takes a Data of two templates as a parameter.

float similarity = FaceSDK.similarityCalucation(templates1, templates1);

It returns the similarity value between the two templates, which can be used to determine the degree of similarity between the two individuals.

Default Thresholds

let livenessThreshold = 0.7
let identifyThreshold = 0.8
let yawThreshold = 10.0
let rollThreshold = 10.0
let pitchThreshold = 10.0
let occlusionThreshold = 0.5
let eyeCloseThreshold = 0.8
let mouthOpeningThreshold = 0.5
  • If the liveness score exceeds 0.7, the face is a real face.

  • If the similarity between two faces is higher than 0.8, the face matching is successful.

  • If the absolute values of the face angles are less than 10.0, the face is identified as a fronted face.

  • If the occlusion value is higher than 0.5, the face is occluded.

  • If the eye close value is higher than 0.8, it indicates that the eyes are closed.

  • If the mouth opening value is higher than 0.5, it indicates that the mouth is open.

PreviousPremium SDK - AndroidNextFace Liveness Detection SDK - Server

Last updated 2 months ago

Face angles
68 points facial landmark