mauricewells / FaceRecognition-iOS

This is the project of facial recognition technology and 3D passive liveness detection in iOS. The system functions similarly to a time-attendance system.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nest Logo

👏 We have published the Face Livness Detection, Face Recognition SDK and ID Card Recognition SDK for the server.

FaceRecognition-iOS

The demo project demonstrates both Face Liveness Detection and Face Recognition Technology.

The demo is integrated with KBY-AI's Standard Face Mobile SDK.

Basic Standard Premium
Face Detection Face Detection Face Detection
Face Liveness Detection Face Liveness Detection Face Liveness Detection
Pose Estimation Pose Estimation Pose Estimation
Face Recognition Face Recognition
68 points Face Landmark Detection
Face Quality Calculation
Face Occlusion Detection
Eye Closure Detection
Age, Gender Estimation

For other solutions, please explore the following:

Download on the App Store

Screenshots

SDK License

The face recognition project relies on kby-ai's SDK, which requires a license for each bundle ID.

Email: contact@kby-ai.com

Telegram: @kbyai

WhatsApp: +19092802609

Skype: live:.cid.66e2522354b1049b

About SDK

Set up

  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

image

  1. Add the bridging header to your project settings

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

image

Initializing an SDK

  • 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.

  • 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.

Face Detection and Liveness Detection

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

let faceBoxes = FaceSDK.faceDetection(image)

https://github.com/kby-ai/FaceRecognition-iOS/blob/40b54da44a0c72c6bef275a060fc6b1ff8b3360c/FaceRecognition/CameraViewController.swift#L101-L113

This function takes a single parameter, which is a UIImage object. The return value of the function is a list of FaceBox objects. Each FaceBox object contains the detected face rectangle, liveness score, and facial angles such as yaw, roll, and pitch.

Create Templates

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)

https://github.com/kby-ai/FaceRecognition-iOS/blob/40b54da44a0c72c6bef275a060fc6b1ff8b3360c/FaceRecognition/CameraViewController.swift#L128-L132

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

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

Calculation similiarity

The "similarityCalculation" function takes a byte array of two templates as a parameter.

let similarity = FaceSDK.similarityCalculation(templates, templates2: personTemplates)

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

About

This is the project of facial recognition technology and 3D passive liveness detection in iOS. The system functions similarly to a time-attendance system.


Languages

Language:Swift 97.1%Language:Objective-C 2.9%