Giter Club home page Giter Club logo

kby-ai / facelivenessdetection-ios Goto Github PK

View Code? Open in Web Editor NEW
21.0 7.0 33.0 18.2 MB

The project for 3D passive face liveness detection, face anti-spoofing, face fraudulent check, face liveness check and face fraud detection on iOS

Objective-C 3.82% Swift 96.18%
anti-spoofing face-liveness-detection ios liveness-detection liveness-detection-sdk passive-liveness face face-detection face-recognition fraud-detection fraud-prevention fraudulent liveness liveness-checker

facelivenessdetection-ios's Introduction

📚 Product & Resources - Here

🛟 Help Center - Here

💼 KYC Verification Demo - Here

🙋‍♀️ Docker Hub - Here

FaceLivenessDetection-iOS

Overview

This repository showcases real-time face liveness detection technology on iOS device.

In this repository, we integrated KBY-AI's face liveness(face anti-spoofing) solution into iOS platform.

◾FaceSDK(Mobile) Details

🔽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

◾FaceSDK(Mobile) Product List

No. Repository SDK Details
1 Face Liveness Detection - Android Basic SDK
➡️ Face Liveness Detection - iOS Basic SDK
3 Face Recognition - Android Standard SDK
4 Face Recognition - iOS Standard SDK
5 Face Recognition - Flutter Standard SDK
6 Face Recognition - React-Native Standard SDK
7 Face Attribute - Android Premium SDK
8 Face Attribute - iOS Premium SDK

To get Face SDK(server), please visit products here.

Download on the App Store

Performance Video

You can visit our YouTube video here to see how well our demo app works.

Face Recognition Android

Screenshots

SDK License

This project uses kby-ai's liveness detection SDK. The SDK requires a license per bundle ID.

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)

func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
guard let pixelBuffer: CVPixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else { return }
CVPixelBufferLockBaseAddress(pixelBuffer, CVPixelBufferLockFlags.readOnly)
let image = CIImage(cvPixelBuffer: pixelBuffer).oriented(CGImagePropertyOrientation.leftMirrored)
let capturedImage = UIImage(ciImage: image)
CVPixelBufferUnlockBaseAddress(pixelBuffer, CVPixelBufferLockFlags.readOnly)
let faceBoxes = FaceSDK.faceDetection(capturedImage)
DispatchQueue.main.sync {
self.faceView.setFrameSize(frameSize: capturedImage.size)
self.faceView.setFaceBoxes(faceBoxes: faceBoxes)
}
}

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.

facelivenessdetection-ios's People

Contributors

justin200914 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.