SFaceCompare 2.5.0

SFaceCompare 2.5.0

Maintained by Geek Owl.


GitHub

Stars0
Watchers2
Forks0
Issues0
Contributors2
Pull Requests0



  • By
  • Bohdan Mihiliev

SFaceCompare: compare faces on your iOS device

CI Status iOS 11.3+ Swift 4.0+ Version License Platform

SFaceCompare is an simple library for iOS to find and compare faces. SFaceCompare works on top of dlib and OpenCV libraries. With usage of trained model.

Features

  • Face detecting / extracting
  • Face aligment
  • Face matching

Used Libraries

  • dlib - Image processing
  • openCV - Detecting face landmarks and face alignment

These libraries were used to create SameFace.framework which src on CVDlibUtils branch

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

CocoaPods 1.1+ is required to build SFaceCompare.

To install library, simply add the following line to your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.3'
use_frameworks!

target '<Your Target Name>' do
    pod 'SFaceCompare'
end

Then, run the following command:

$ pod install

Usage Example

Faces are the same Faces are different
AppDelegate.swift

In Your App delegate call SFaceCompare.opncvwrp.loadData() to load model related data. This Operation is long and async. So better put this before using methods from pod.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    SFaceCompare.prepareData()
    return true
}

As simple as possible

// 1: Create compare object
let faceComparator = SFaceCompare(on: image1, and: image2)
// 2: Call compareFaces method with success and error handlers
faceComparator.compareFaces(success: { results in }, failure: {  error in })

Credits

SFaceCompare is owned and maintained by Bohdan Mihiliev & Anton Khrolenko

License

SFaceCompare is available under the MIT license. See the LICENSE file for more info.