├── .DS_Store ├── FaceLiveness-Bridging-Header.h ├── FaceLiveness.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ ├── dipankar.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ ├── sbldev02.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── user.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── dipankar.xcuserdatad │ └── xcschemes │ │ └── xcschememanagement.plist │ ├── sbldev02.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ └── xcschememanagement.plist │ └── user.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── FaceLiveness ├── AboutViewController.swift ├── AppDelegate.swift ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── 114.png │ │ ├── 120 1.png │ │ ├── 120.png │ │ ├── 180.png │ │ ├── 40.png │ │ ├── 58.png │ │ ├── 60.png │ │ ├── 76.png │ │ ├── 80.png │ │ ├── 87.png │ │ ├── Contents.json │ │ └── appstore.png │ ├── Contents.json │ ├── back_arw.imageset │ │ ├── Contents.json │ │ └── icons8-left-arrow-100(2).png │ ├── camera_switch.imageset │ │ ├── Contents.json │ │ └── switch-camera.png │ ├── clr_bg.colorset │ │ └── Contents.json │ ├── clr_main_button_bg1.colorset │ │ └── Contents.json │ ├── clr_main_button_bg2.colorset │ │ └── Contents.json │ ├── clr_roi_circle.colorset │ │ └── Contents.json │ ├── clr_roi_line.colorset │ │ └── Contents.json │ ├── clr_text.colorset │ │ └── Contents.json │ ├── clr_toast_bg.colorset │ │ └── Contents.json │ ├── gradient_bg.imageset │ │ ├── Contents.json │ │ └── gradient(2).png │ ├── ic_enroll.imageset │ │ ├── Contents.json │ │ └── icons8-add-friend-100.png │ ├── ic_faceplugin.imageset │ │ ├── Contents.json │ │ └── Square png file_2.png │ ├── ic_github.imageset │ │ ├── Contents.json │ │ ├── ic_github 1.png │ │ ├── ic_github 2.png │ │ └── ic_github.png │ ├── ic_skype.imageset │ │ ├── Contents.json │ │ ├── ic_skype 1.png │ │ ├── ic_skype 2.png │ │ └── ic_skype.png │ ├── ic_telegram.imageset │ │ ├── Contents.json │ │ ├── ic_telegram 1.png │ │ ├── ic_telegram 2.png │ │ └── ic_telegram.png │ └── ic_whatsapp.imageset │ │ ├── Contents.json │ │ ├── ic_whatsapp 1.png │ │ ├── ic_whatsapp 2.png │ │ └── ic_whatsapp.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── BottomPopupController │ ├── BottomPopupDismissAnimator.swift │ ├── BottomPopupDismissInteractionController.swift │ ├── BottomPopupNavigationController.swift │ ├── BottomPopupPresentAnimator.swift │ ├── BottomPopupPresentationController.swift │ ├── BottomPopupTransitionHandler.swift │ ├── BottomPopupUtils.swift │ └── BottomPopupViewController.swift ├── CameraViewController.swift ├── ContactUsVC.swift ├── FaceLiveness.xcdatamodeld │ ├── .xccurrentversion │ └── FaceRecognition.xcdatamodel │ │ └── contents ├── FaceView.swift ├── Info.plist ├── Model.xcdatamodeld │ └── Model.xcdatamodel │ │ └── contents ├── SceneDelegate.swift ├── SettingsViewController.swift ├── ToastView.swift ├── UIImageExtension.swift └── ViewController.swift ├── FaceLivenessTests └── FaceLivenessTests.swift ├── FaceLivenessUITests ├── FaceLivenessUITests.swift └── FaceLivenessUITestsLaunchTests.swift ├── README.md └── facesdk.framework ├── Headers ├── facesdk.h └── facesdk_api.h ├── Info.plist ├── Modules └── module.modulemap ├── _CodeSignature └── CodeResources ├── ag.bin ├── detection.bin ├── detection.param ├── ec.bin ├── ec.param.bin ├── facesdk ├── landmark.bin ├── landmark.param ├── liveness.bin ├── mfn.bin └── occ.bin /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/.DS_Store -------------------------------------------------------------------------------- /FaceLiveness-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | #import "facesdk/facesdk.h" 5 | -------------------------------------------------------------------------------- /FaceLiveness.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 725418DE2BA1F77F00FEC59C /* ContactUsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 725418DC2BA1F77F00FEC59C /* ContactUsVC.swift */; }; 11 | 725418E92BA1F84900FEC59C /* BottomPopupUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 725418E12BA1F84900FEC59C /* BottomPopupUtils.swift */; }; 12 | 725418EA2BA1F84900FEC59C /* BottomPopupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 725418E22BA1F84900FEC59C /* BottomPopupViewController.swift */; }; 13 | 725418EB2BA1F84900FEC59C /* BottomPopupDismissInteractionController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 725418E32BA1F84900FEC59C /* BottomPopupDismissInteractionController.swift */; }; 14 | 725418EC2BA1F84900FEC59C /* BottomPopupNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 725418E42BA1F84900FEC59C /* BottomPopupNavigationController.swift */; }; 15 | 725418ED2BA1F84900FEC59C /* BottomPopupDismissAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 725418E52BA1F84900FEC59C /* BottomPopupDismissAnimator.swift */; }; 16 | 725418EE2BA1F84900FEC59C /* BottomPopupPresentAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 725418E62BA1F84900FEC59C /* BottomPopupPresentAnimator.swift */; }; 17 | 725418EF2BA1F84900FEC59C /* BottomPopupTransitionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 725418E72BA1F84900FEC59C /* BottomPopupTransitionHandler.swift */; }; 18 | 725418F02BA1F84900FEC59C /* BottomPopupPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 725418E82BA1F84900FEC59C /* BottomPopupPresentationController.swift */; }; 19 | 72F3AD6F2BA7D276005DB72B /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72F3AD6E2BA7D276005DB72B /* AboutViewController.swift */; }; 20 | CE08D25A29ED8D4F0071F025 /* ToastView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE08D25929ED8D4F0071F025 /* ToastView.swift */; }; 21 | CE29C50529ECD0A5008EDB5A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C50429ECD0A5008EDB5A /* AppDelegate.swift */; }; 22 | CE29C50729ECD0A5008EDB5A /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C50629ECD0A5008EDB5A /* SceneDelegate.swift */; }; 23 | CE29C50929ECD0A5008EDB5A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C50829ECD0A5008EDB5A /* ViewController.swift */; }; 24 | CE29C50C29ECD0A5008EDB5A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE29C50A29ECD0A5008EDB5A /* Main.storyboard */; }; 25 | CE29C50F29ECD0A5008EDB5A /* FaceLiveness.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = CE29C50D29ECD0A5008EDB5A /* FaceLiveness.xcdatamodeld */; }; 26 | CE29C51129ECD0FB008EDB5A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE29C51029ECD0FB008EDB5A /* Assets.xcassets */; }; 27 | CE29C51429ECD0FB008EDB5A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE29C51229ECD0FB008EDB5A /* LaunchScreen.storyboard */; }; 28 | CE29C51F29ECD0FC008EDB5A /* FaceLivenessTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C51E29ECD0FC008EDB5A /* FaceLivenessTests.swift */; }; 29 | CE29C52929ECD0FC008EDB5A /* FaceLivenessUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C52829ECD0FC008EDB5A /* FaceLivenessUITests.swift */; }; 30 | CE29C52B29ECD0FC008EDB5A /* FaceLivenessUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C52A29ECD0FC008EDB5A /* FaceLivenessUITestsLaunchTests.swift */; }; 31 | CE29C53929ECE135008EDB5A /* facesdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE29C53829ECE134008EDB5A /* facesdk.framework */; }; 32 | CE29C53A29ECE135008EDB5A /* facesdk.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CE29C53829ECE134008EDB5A /* facesdk.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 33 | CE29C54229ECE15C008EDB5A /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C53D29ECE158008EDB5A /* SettingsViewController.swift */; }; 34 | CE29C54329ECE15C008EDB5A /* CameraViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C53E29ECE159008EDB5A /* CameraViewController.swift */; }; 35 | CE29C54429ECE15C008EDB5A /* UIImageExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C53F29ECE15A008EDB5A /* UIImageExtension.swift */; }; 36 | CE29C54529ECE15C008EDB5A /* FaceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C54029ECE15B008EDB5A /* FaceView.swift */; }; 37 | /* End PBXBuildFile section */ 38 | 39 | /* Begin PBXContainerItemProxy section */ 40 | CE29C51B29ECD0FC008EDB5A /* PBXContainerItemProxy */ = { 41 | isa = PBXContainerItemProxy; 42 | containerPortal = CE29C4F929ECD0A5008EDB5A /* Project object */; 43 | proxyType = 1; 44 | remoteGlobalIDString = CE29C50029ECD0A5008EDB5A; 45 | remoteInfo = FaceRecognition; 46 | }; 47 | CE29C52529ECD0FC008EDB5A /* PBXContainerItemProxy */ = { 48 | isa = PBXContainerItemProxy; 49 | containerPortal = CE29C4F929ECD0A5008EDB5A /* Project object */; 50 | proxyType = 1; 51 | remoteGlobalIDString = CE29C50029ECD0A5008EDB5A; 52 | remoteInfo = FaceRecognition; 53 | }; 54 | /* End PBXContainerItemProxy section */ 55 | 56 | /* Begin PBXCopyFilesBuildPhase section */ 57 | CE29C53B29ECE136008EDB5A /* Embed Frameworks */ = { 58 | isa = PBXCopyFilesBuildPhase; 59 | buildActionMask = 2147483647; 60 | dstPath = ""; 61 | dstSubfolderSpec = 10; 62 | files = ( 63 | CE29C53A29ECE135008EDB5A /* facesdk.framework in Embed Frameworks */, 64 | ); 65 | name = "Embed Frameworks"; 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXCopyFilesBuildPhase section */ 69 | 70 | /* Begin PBXFileReference section */ 71 | 725418DC2BA1F77F00FEC59C /* ContactUsVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContactUsVC.swift; sourceTree = ""; }; 72 | 725418E12BA1F84900FEC59C /* BottomPopupUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BottomPopupUtils.swift; sourceTree = ""; }; 73 | 725418E22BA1F84900FEC59C /* BottomPopupViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BottomPopupViewController.swift; sourceTree = ""; }; 74 | 725418E32BA1F84900FEC59C /* BottomPopupDismissInteractionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BottomPopupDismissInteractionController.swift; sourceTree = ""; }; 75 | 725418E42BA1F84900FEC59C /* BottomPopupNavigationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BottomPopupNavigationController.swift; sourceTree = ""; }; 76 | 725418E52BA1F84900FEC59C /* BottomPopupDismissAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BottomPopupDismissAnimator.swift; sourceTree = ""; }; 77 | 725418E62BA1F84900FEC59C /* BottomPopupPresentAnimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BottomPopupPresentAnimator.swift; sourceTree = ""; }; 78 | 725418E72BA1F84900FEC59C /* BottomPopupTransitionHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BottomPopupTransitionHandler.swift; sourceTree = ""; }; 79 | 725418E82BA1F84900FEC59C /* BottomPopupPresentationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BottomPopupPresentationController.swift; sourceTree = ""; }; 80 | 72F3AD6E2BA7D276005DB72B /* AboutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = ""; }; 81 | CE08D25929ED8D4F0071F025 /* ToastView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastView.swift; sourceTree = ""; }; 82 | CE29C50129ECD0A5008EDB5A /* FaceLiveness.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FaceLiveness.app; sourceTree = BUILT_PRODUCTS_DIR; }; 83 | CE29C50429ECD0A5008EDB5A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 84 | CE29C50629ECD0A5008EDB5A /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 85 | CE29C50829ECD0A5008EDB5A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 86 | CE29C50B29ECD0A5008EDB5A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 87 | CE29C50E29ECD0A5008EDB5A /* FaceRecognition.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = FaceRecognition.xcdatamodel; sourceTree = ""; }; 88 | CE29C51029ECD0FB008EDB5A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 89 | CE29C51329ECD0FB008EDB5A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 90 | CE29C51529ECD0FB008EDB5A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 91 | CE29C51A29ECD0FC008EDB5A /* FaceLivenessTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FaceLivenessTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 92 | CE29C51E29ECD0FC008EDB5A /* FaceLivenessTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaceLivenessTests.swift; sourceTree = ""; }; 93 | CE29C52429ECD0FC008EDB5A /* FaceLivenessUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FaceLivenessUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 94 | CE29C52829ECD0FC008EDB5A /* FaceLivenessUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaceLivenessUITests.swift; sourceTree = ""; }; 95 | CE29C52A29ECD0FC008EDB5A /* FaceLivenessUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaceLivenessUITestsLaunchTests.swift; sourceTree = ""; }; 96 | CE29C53829ECE134008EDB5A /* facesdk.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = facesdk.framework; sourceTree = ""; }; 97 | CE29C53D29ECE158008EDB5A /* SettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = ""; }; 98 | CE29C53E29ECE159008EDB5A /* CameraViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CameraViewController.swift; sourceTree = ""; }; 99 | CE29C53F29ECE15A008EDB5A /* UIImageExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageExtension.swift; sourceTree = ""; }; 100 | CE29C54029ECE15B008EDB5A /* FaceView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FaceView.swift; sourceTree = ""; }; 101 | /* End PBXFileReference section */ 102 | 103 | /* Begin PBXFrameworksBuildPhase section */ 104 | CE29C4FE29ECD0A5008EDB5A /* Frameworks */ = { 105 | isa = PBXFrameworksBuildPhase; 106 | buildActionMask = 2147483647; 107 | files = ( 108 | CE29C53929ECE135008EDB5A /* facesdk.framework in Frameworks */, 109 | ); 110 | runOnlyForDeploymentPostprocessing = 0; 111 | }; 112 | CE29C51729ECD0FC008EDB5A /* Frameworks */ = { 113 | isa = PBXFrameworksBuildPhase; 114 | buildActionMask = 2147483647; 115 | files = ( 116 | ); 117 | runOnlyForDeploymentPostprocessing = 0; 118 | }; 119 | CE29C52129ECD0FC008EDB5A /* Frameworks */ = { 120 | isa = PBXFrameworksBuildPhase; 121 | buildActionMask = 2147483647; 122 | files = ( 123 | ); 124 | runOnlyForDeploymentPostprocessing = 0; 125 | }; 126 | /* End PBXFrameworksBuildPhase section */ 127 | 128 | /* Begin PBXGroup section */ 129 | 725418E02BA1F84900FEC59C /* BottomPopupController */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 725418E12BA1F84900FEC59C /* BottomPopupUtils.swift */, 133 | 725418E22BA1F84900FEC59C /* BottomPopupViewController.swift */, 134 | 725418E32BA1F84900FEC59C /* BottomPopupDismissInteractionController.swift */, 135 | 725418E42BA1F84900FEC59C /* BottomPopupNavigationController.swift */, 136 | 725418E52BA1F84900FEC59C /* BottomPopupDismissAnimator.swift */, 137 | 725418E62BA1F84900FEC59C /* BottomPopupPresentAnimator.swift */, 138 | 725418E72BA1F84900FEC59C /* BottomPopupTransitionHandler.swift */, 139 | 725418E82BA1F84900FEC59C /* BottomPopupPresentationController.swift */, 140 | ); 141 | path = BottomPopupController; 142 | sourceTree = ""; 143 | }; 144 | CE29C4F829ECD0A4008EDB5A = { 145 | isa = PBXGroup; 146 | children = ( 147 | CE29C50329ECD0A5008EDB5A /* FaceLiveness */, 148 | CE29C51D29ECD0FC008EDB5A /* FaceLivenessTests */, 149 | CE29C52729ECD0FC008EDB5A /* FaceLivenessUITests */, 150 | CE29C50229ECD0A5008EDB5A /* Products */, 151 | CE29C53729ECE131008EDB5A /* Frameworks */, 152 | ); 153 | sourceTree = ""; 154 | }; 155 | CE29C50229ECD0A5008EDB5A /* Products */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | CE29C50129ECD0A5008EDB5A /* FaceLiveness.app */, 159 | CE29C51A29ECD0FC008EDB5A /* FaceLivenessTests.xctest */, 160 | CE29C52429ECD0FC008EDB5A /* FaceLivenessUITests.xctest */, 161 | ); 162 | name = Products; 163 | sourceTree = ""; 164 | }; 165 | CE29C50329ECD0A5008EDB5A /* FaceLiveness */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | 725418E02BA1F84900FEC59C /* BottomPopupController */, 169 | CE29C50429ECD0A5008EDB5A /* AppDelegate.swift */, 170 | CE08D25929ED8D4F0071F025 /* ToastView.swift */, 171 | CE29C50629ECD0A5008EDB5A /* SceneDelegate.swift */, 172 | CE29C50829ECD0A5008EDB5A /* ViewController.swift */, 173 | CE29C53E29ECE159008EDB5A /* CameraViewController.swift */, 174 | CE29C54029ECE15B008EDB5A /* FaceView.swift */, 175 | 72F3AD6E2BA7D276005DB72B /* AboutViewController.swift */, 176 | CE29C53D29ECE158008EDB5A /* SettingsViewController.swift */, 177 | 725418DC2BA1F77F00FEC59C /* ContactUsVC.swift */, 178 | CE29C53F29ECE15A008EDB5A /* UIImageExtension.swift */, 179 | CE29C50A29ECD0A5008EDB5A /* Main.storyboard */, 180 | CE29C51029ECD0FB008EDB5A /* Assets.xcassets */, 181 | CE29C51229ECD0FB008EDB5A /* LaunchScreen.storyboard */, 182 | CE29C51529ECD0FB008EDB5A /* Info.plist */, 183 | CE29C50D29ECD0A5008EDB5A /* FaceLiveness.xcdatamodeld */, 184 | ); 185 | path = FaceLiveness; 186 | sourceTree = ""; 187 | }; 188 | CE29C51D29ECD0FC008EDB5A /* FaceLivenessTests */ = { 189 | isa = PBXGroup; 190 | children = ( 191 | CE29C51E29ECD0FC008EDB5A /* FaceLivenessTests.swift */, 192 | ); 193 | path = FaceLivenessTests; 194 | sourceTree = ""; 195 | }; 196 | CE29C52729ECD0FC008EDB5A /* FaceLivenessUITests */ = { 197 | isa = PBXGroup; 198 | children = ( 199 | CE29C52829ECD0FC008EDB5A /* FaceLivenessUITests.swift */, 200 | CE29C52A29ECD0FC008EDB5A /* FaceLivenessUITestsLaunchTests.swift */, 201 | ); 202 | path = FaceLivenessUITests; 203 | sourceTree = ""; 204 | }; 205 | CE29C53729ECE131008EDB5A /* Frameworks */ = { 206 | isa = PBXGroup; 207 | children = ( 208 | CE29C53829ECE134008EDB5A /* facesdk.framework */, 209 | ); 210 | name = Frameworks; 211 | sourceTree = ""; 212 | }; 213 | /* End PBXGroup section */ 214 | 215 | /* Begin PBXNativeTarget section */ 216 | CE29C50029ECD0A5008EDB5A /* FaceLiveness */ = { 217 | isa = PBXNativeTarget; 218 | buildConfigurationList = CE29C52E29ECD0FC008EDB5A /* Build configuration list for PBXNativeTarget "FaceLiveness" */; 219 | buildPhases = ( 220 | CE29C4FD29ECD0A5008EDB5A /* Sources */, 221 | CE29C4FE29ECD0A5008EDB5A /* Frameworks */, 222 | CE29C4FF29ECD0A5008EDB5A /* Resources */, 223 | CE29C53B29ECE136008EDB5A /* Embed Frameworks */, 224 | ); 225 | buildRules = ( 226 | ); 227 | dependencies = ( 228 | ); 229 | name = FaceLiveness; 230 | productName = FaceRecognition; 231 | productReference = CE29C50129ECD0A5008EDB5A /* FaceLiveness.app */; 232 | productType = "com.apple.product-type.application"; 233 | }; 234 | CE29C51929ECD0FC008EDB5A /* FaceLivenessTests */ = { 235 | isa = PBXNativeTarget; 236 | buildConfigurationList = CE29C53129ECD0FC008EDB5A /* Build configuration list for PBXNativeTarget "FaceLivenessTests" */; 237 | buildPhases = ( 238 | CE29C51629ECD0FC008EDB5A /* Sources */, 239 | CE29C51729ECD0FC008EDB5A /* Frameworks */, 240 | CE29C51829ECD0FC008EDB5A /* Resources */, 241 | ); 242 | buildRules = ( 243 | ); 244 | dependencies = ( 245 | CE29C51C29ECD0FC008EDB5A /* PBXTargetDependency */, 246 | ); 247 | name = FaceLivenessTests; 248 | productName = FaceRecognitionTests; 249 | productReference = CE29C51A29ECD0FC008EDB5A /* FaceLivenessTests.xctest */; 250 | productType = "com.apple.product-type.bundle.unit-test"; 251 | }; 252 | CE29C52329ECD0FC008EDB5A /* FaceLivenessUITests */ = { 253 | isa = PBXNativeTarget; 254 | buildConfigurationList = CE29C53429ECD0FC008EDB5A /* Build configuration list for PBXNativeTarget "FaceLivenessUITests" */; 255 | buildPhases = ( 256 | CE29C52029ECD0FC008EDB5A /* Sources */, 257 | CE29C52129ECD0FC008EDB5A /* Frameworks */, 258 | CE29C52229ECD0FC008EDB5A /* Resources */, 259 | ); 260 | buildRules = ( 261 | ); 262 | dependencies = ( 263 | CE29C52629ECD0FC008EDB5A /* PBXTargetDependency */, 264 | ); 265 | name = FaceLivenessUITests; 266 | productName = FaceRecognitionUITests; 267 | productReference = CE29C52429ECD0FC008EDB5A /* FaceLivenessUITests.xctest */; 268 | productType = "com.apple.product-type.bundle.ui-testing"; 269 | }; 270 | /* End PBXNativeTarget section */ 271 | 272 | /* Begin PBXProject section */ 273 | CE29C4F929ECD0A5008EDB5A /* Project object */ = { 274 | isa = PBXProject; 275 | attributes = { 276 | BuildIndependentTargetsInParallel = 1; 277 | LastSwiftUpdateCheck = 1420; 278 | LastUpgradeCheck = 1420; 279 | TargetAttributes = { 280 | CE29C50029ECD0A5008EDB5A = { 281 | CreatedOnToolsVersion = 14.2; 282 | }; 283 | CE29C51929ECD0FC008EDB5A = { 284 | CreatedOnToolsVersion = 14.2; 285 | TestTargetID = CE29C50029ECD0A5008EDB5A; 286 | }; 287 | CE29C52329ECD0FC008EDB5A = { 288 | CreatedOnToolsVersion = 14.2; 289 | TestTargetID = CE29C50029ECD0A5008EDB5A; 290 | }; 291 | }; 292 | }; 293 | buildConfigurationList = CE29C4FC29ECD0A5008EDB5A /* Build configuration list for PBXProject "FaceLiveness" */; 294 | compatibilityVersion = "Xcode 14.0"; 295 | developmentRegion = en; 296 | hasScannedForEncodings = 0; 297 | knownRegions = ( 298 | en, 299 | Base, 300 | ); 301 | mainGroup = CE29C4F829ECD0A4008EDB5A; 302 | productRefGroup = CE29C50229ECD0A5008EDB5A /* Products */; 303 | projectDirPath = ""; 304 | projectRoot = ""; 305 | targets = ( 306 | CE29C50029ECD0A5008EDB5A /* FaceLiveness */, 307 | CE29C51929ECD0FC008EDB5A /* FaceLivenessTests */, 308 | CE29C52329ECD0FC008EDB5A /* FaceLivenessUITests */, 309 | ); 310 | }; 311 | /* End PBXProject section */ 312 | 313 | /* Begin PBXResourcesBuildPhase section */ 314 | CE29C4FF29ECD0A5008EDB5A /* Resources */ = { 315 | isa = PBXResourcesBuildPhase; 316 | buildActionMask = 2147483647; 317 | files = ( 318 | CE29C51429ECD0FB008EDB5A /* LaunchScreen.storyboard in Resources */, 319 | CE29C51129ECD0FB008EDB5A /* Assets.xcassets in Resources */, 320 | CE29C50C29ECD0A5008EDB5A /* Main.storyboard in Resources */, 321 | ); 322 | runOnlyForDeploymentPostprocessing = 0; 323 | }; 324 | CE29C51829ECD0FC008EDB5A /* Resources */ = { 325 | isa = PBXResourcesBuildPhase; 326 | buildActionMask = 2147483647; 327 | files = ( 328 | ); 329 | runOnlyForDeploymentPostprocessing = 0; 330 | }; 331 | CE29C52229ECD0FC008EDB5A /* Resources */ = { 332 | isa = PBXResourcesBuildPhase; 333 | buildActionMask = 2147483647; 334 | files = ( 335 | ); 336 | runOnlyForDeploymentPostprocessing = 0; 337 | }; 338 | /* End PBXResourcesBuildPhase section */ 339 | 340 | /* Begin PBXSourcesBuildPhase section */ 341 | CE29C4FD29ECD0A5008EDB5A /* Sources */ = { 342 | isa = PBXSourcesBuildPhase; 343 | buildActionMask = 2147483647; 344 | files = ( 345 | 725418EA2BA1F84900FEC59C /* BottomPopupViewController.swift in Sources */, 346 | CE29C50F29ECD0A5008EDB5A /* FaceLiveness.xcdatamodeld in Sources */, 347 | CE29C50929ECD0A5008EDB5A /* ViewController.swift in Sources */, 348 | CE29C50529ECD0A5008EDB5A /* AppDelegate.swift in Sources */, 349 | 725418EF2BA1F84900FEC59C /* BottomPopupTransitionHandler.swift in Sources */, 350 | CE29C54429ECE15C008EDB5A /* UIImageExtension.swift in Sources */, 351 | 725418DE2BA1F77F00FEC59C /* ContactUsVC.swift in Sources */, 352 | CE08D25A29ED8D4F0071F025 /* ToastView.swift in Sources */, 353 | 725418EB2BA1F84900FEC59C /* BottomPopupDismissInteractionController.swift in Sources */, 354 | 72F3AD6F2BA7D276005DB72B /* AboutViewController.swift in Sources */, 355 | 725418E92BA1F84900FEC59C /* BottomPopupUtils.swift in Sources */, 356 | 725418ED2BA1F84900FEC59C /* BottomPopupDismissAnimator.swift in Sources */, 357 | 725418F02BA1F84900FEC59C /* BottomPopupPresentationController.swift in Sources */, 358 | CE29C54329ECE15C008EDB5A /* CameraViewController.swift in Sources */, 359 | CE29C50729ECD0A5008EDB5A /* SceneDelegate.swift in Sources */, 360 | 725418EC2BA1F84900FEC59C /* BottomPopupNavigationController.swift in Sources */, 361 | CE29C54229ECE15C008EDB5A /* SettingsViewController.swift in Sources */, 362 | 725418EE2BA1F84900FEC59C /* BottomPopupPresentAnimator.swift in Sources */, 363 | CE29C54529ECE15C008EDB5A /* FaceView.swift in Sources */, 364 | ); 365 | runOnlyForDeploymentPostprocessing = 0; 366 | }; 367 | CE29C51629ECD0FC008EDB5A /* Sources */ = { 368 | isa = PBXSourcesBuildPhase; 369 | buildActionMask = 2147483647; 370 | files = ( 371 | CE29C51F29ECD0FC008EDB5A /* FaceLivenessTests.swift in Sources */, 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | }; 375 | CE29C52029ECD0FC008EDB5A /* Sources */ = { 376 | isa = PBXSourcesBuildPhase; 377 | buildActionMask = 2147483647; 378 | files = ( 379 | CE29C52929ECD0FC008EDB5A /* FaceLivenessUITests.swift in Sources */, 380 | CE29C52B29ECD0FC008EDB5A /* FaceLivenessUITestsLaunchTests.swift in Sources */, 381 | ); 382 | runOnlyForDeploymentPostprocessing = 0; 383 | }; 384 | /* End PBXSourcesBuildPhase section */ 385 | 386 | /* Begin PBXTargetDependency section */ 387 | CE29C51C29ECD0FC008EDB5A /* PBXTargetDependency */ = { 388 | isa = PBXTargetDependency; 389 | target = CE29C50029ECD0A5008EDB5A /* FaceLiveness */; 390 | targetProxy = CE29C51B29ECD0FC008EDB5A /* PBXContainerItemProxy */; 391 | }; 392 | CE29C52629ECD0FC008EDB5A /* PBXTargetDependency */ = { 393 | isa = PBXTargetDependency; 394 | target = CE29C50029ECD0A5008EDB5A /* FaceLiveness */; 395 | targetProxy = CE29C52529ECD0FC008EDB5A /* PBXContainerItemProxy */; 396 | }; 397 | /* End PBXTargetDependency section */ 398 | 399 | /* Begin PBXVariantGroup section */ 400 | CE29C50A29ECD0A5008EDB5A /* Main.storyboard */ = { 401 | isa = PBXVariantGroup; 402 | children = ( 403 | CE29C50B29ECD0A5008EDB5A /* Base */, 404 | ); 405 | name = Main.storyboard; 406 | sourceTree = ""; 407 | }; 408 | CE29C51229ECD0FB008EDB5A /* LaunchScreen.storyboard */ = { 409 | isa = PBXVariantGroup; 410 | children = ( 411 | CE29C51329ECD0FB008EDB5A /* Base */, 412 | ); 413 | name = LaunchScreen.storyboard; 414 | sourceTree = ""; 415 | }; 416 | /* End PBXVariantGroup section */ 417 | 418 | /* Begin XCBuildConfiguration section */ 419 | CE29C52C29ECD0FC008EDB5A /* Debug */ = { 420 | isa = XCBuildConfiguration; 421 | buildSettings = { 422 | ALWAYS_SEARCH_USER_PATHS = NO; 423 | CLANG_ANALYZER_NONNULL = YES; 424 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 425 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 426 | CLANG_ENABLE_MODULES = YES; 427 | CLANG_ENABLE_OBJC_ARC = YES; 428 | CLANG_ENABLE_OBJC_WEAK = YES; 429 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 430 | CLANG_WARN_BOOL_CONVERSION = YES; 431 | CLANG_WARN_COMMA = YES; 432 | CLANG_WARN_CONSTANT_CONVERSION = YES; 433 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 434 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 435 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 436 | CLANG_WARN_EMPTY_BODY = YES; 437 | CLANG_WARN_ENUM_CONVERSION = YES; 438 | CLANG_WARN_INFINITE_RECURSION = YES; 439 | CLANG_WARN_INT_CONVERSION = YES; 440 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 441 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 442 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 443 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 444 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 445 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 446 | CLANG_WARN_STRICT_PROTOTYPES = YES; 447 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 448 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 449 | CLANG_WARN_UNREACHABLE_CODE = YES; 450 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 451 | COPY_PHASE_STRIP = NO; 452 | DEBUG_INFORMATION_FORMAT = dwarf; 453 | ENABLE_STRICT_OBJC_MSGSEND = YES; 454 | ENABLE_TESTABILITY = YES; 455 | GCC_C_LANGUAGE_STANDARD = gnu11; 456 | GCC_DYNAMIC_NO_PIC = NO; 457 | GCC_NO_COMMON_BLOCKS = YES; 458 | GCC_OPTIMIZATION_LEVEL = 0; 459 | GCC_PREPROCESSOR_DEFINITIONS = ( 460 | "DEBUG=1", 461 | "$(inherited)", 462 | ); 463 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 464 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 465 | GCC_WARN_UNDECLARED_SELECTOR = YES; 466 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 467 | GCC_WARN_UNUSED_FUNCTION = YES; 468 | GCC_WARN_UNUSED_VARIABLE = YES; 469 | IPHONEOS_DEPLOYMENT_TARGET = 16.2; 470 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 471 | MTL_FAST_MATH = YES; 472 | ONLY_ACTIVE_ARCH = YES; 473 | SDKROOT = iphoneos; 474 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 475 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 476 | }; 477 | name = Debug; 478 | }; 479 | CE29C52D29ECD0FC008EDB5A /* Release */ = { 480 | isa = XCBuildConfiguration; 481 | buildSettings = { 482 | ALWAYS_SEARCH_USER_PATHS = NO; 483 | CLANG_ANALYZER_NONNULL = YES; 484 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 485 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 486 | CLANG_ENABLE_MODULES = YES; 487 | CLANG_ENABLE_OBJC_ARC = YES; 488 | CLANG_ENABLE_OBJC_WEAK = YES; 489 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 490 | CLANG_WARN_BOOL_CONVERSION = YES; 491 | CLANG_WARN_COMMA = YES; 492 | CLANG_WARN_CONSTANT_CONVERSION = YES; 493 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 494 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 495 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 496 | CLANG_WARN_EMPTY_BODY = YES; 497 | CLANG_WARN_ENUM_CONVERSION = YES; 498 | CLANG_WARN_INFINITE_RECURSION = YES; 499 | CLANG_WARN_INT_CONVERSION = YES; 500 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 501 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 502 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 503 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 504 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 505 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 506 | CLANG_WARN_STRICT_PROTOTYPES = YES; 507 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 508 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 509 | CLANG_WARN_UNREACHABLE_CODE = YES; 510 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 511 | COPY_PHASE_STRIP = NO; 512 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 513 | ENABLE_NS_ASSERTIONS = NO; 514 | ENABLE_STRICT_OBJC_MSGSEND = YES; 515 | GCC_C_LANGUAGE_STANDARD = gnu11; 516 | GCC_NO_COMMON_BLOCKS = YES; 517 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 518 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 519 | GCC_WARN_UNDECLARED_SELECTOR = YES; 520 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 521 | GCC_WARN_UNUSED_FUNCTION = YES; 522 | GCC_WARN_UNUSED_VARIABLE = YES; 523 | IPHONEOS_DEPLOYMENT_TARGET = 16.2; 524 | MTL_ENABLE_DEBUG_INFO = NO; 525 | MTL_FAST_MATH = YES; 526 | SDKROOT = iphoneos; 527 | SWIFT_COMPILATION_MODE = wholemodule; 528 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 529 | VALIDATE_PRODUCT = YES; 530 | }; 531 | name = Release; 532 | }; 533 | CE29C52F29ECD0FC008EDB5A /* Debug */ = { 534 | isa = XCBuildConfiguration; 535 | buildSettings = { 536 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 537 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 538 | CODE_SIGN_IDENTITY = "Apple Development"; 539 | CODE_SIGN_STYLE = Automatic; 540 | CURRENT_PROJECT_VERSION = 3; 541 | DEVELOPMENT_TEAM = SZU3WP325N; 542 | FRAMEWORK_SEARCH_PATHS = ( 543 | "$(inherited)", 544 | "$(PROJECT_DIR)", 545 | ); 546 | GENERATE_INFOPLIST_FILE = YES; 547 | INFOPLIST_FILE = FaceLiveness/Info.plist; 548 | INFOPLIST_KEY_CFBundleDisplayName = "Face Liveness Detection"; 549 | INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; 550 | INFOPLIST_KEY_NSCameraUsageDescription = "The application utilizes the camera for performing facial recognition.\n\n\n\n\nThe app utilizes the camera for performing facial recognition."; 551 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 552 | INFOPLIST_KEY_UILaunchStoryboardName = " "; 553 | INFOPLIST_KEY_UIMainStoryboardFile = Main; 554 | INFOPLIST_KEY_UIStatusBarHidden = NO; 555 | INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent; 556 | INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; 557 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 558 | LD_RUNPATH_SEARCH_PATHS = ( 559 | "$(inherited)", 560 | "@executable_path/Frameworks", 561 | ); 562 | MARKETING_VERSION = 1.0; 563 | PRODUCT_BUNDLE_IDENTIFIER = com.faceplugin.faceliveness; 564 | PRODUCT_NAME = "$(TARGET_NAME)"; 565 | PROVISIONING_PROFILE_SPECIFIER = ""; 566 | SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; 567 | SUPPORTS_MACCATALYST = NO; 568 | SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; 569 | SWIFT_EMIT_LOC_STRINGS = YES; 570 | SWIFT_OBJC_BRIDGING_HEADER = "FaceLiveness-Bridging-Header.h"; 571 | SWIFT_VERSION = 5.0; 572 | TARGETED_DEVICE_FAMILY = 1; 573 | }; 574 | name = Debug; 575 | }; 576 | CE29C53029ECD0FC008EDB5A /* Release */ = { 577 | isa = XCBuildConfiguration; 578 | buildSettings = { 579 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 580 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 581 | CODE_SIGN_IDENTITY = "Apple Development"; 582 | CODE_SIGN_STYLE = Automatic; 583 | CURRENT_PROJECT_VERSION = 3; 584 | DEVELOPMENT_TEAM = SZU3WP325N; 585 | FRAMEWORK_SEARCH_PATHS = ( 586 | "$(inherited)", 587 | "$(PROJECT_DIR)", 588 | ); 589 | GENERATE_INFOPLIST_FILE = YES; 590 | INFOPLIST_FILE = FaceLiveness/Info.plist; 591 | INFOPLIST_KEY_CFBundleDisplayName = "Face Liveness Detection"; 592 | INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; 593 | INFOPLIST_KEY_NSCameraUsageDescription = "The application utilizes the camera for performing facial recognition.\n\n\n\n\nThe app utilizes the camera for performing facial recognition."; 594 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 595 | INFOPLIST_KEY_UILaunchStoryboardName = " "; 596 | INFOPLIST_KEY_UIMainStoryboardFile = Main; 597 | INFOPLIST_KEY_UIStatusBarHidden = NO; 598 | INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent; 599 | INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; 600 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 601 | LD_RUNPATH_SEARCH_PATHS = ( 602 | "$(inherited)", 603 | "@executable_path/Frameworks", 604 | ); 605 | MARKETING_VERSION = 1.0; 606 | PRODUCT_BUNDLE_IDENTIFIER = com.faceplugin.faceliveness; 607 | PRODUCT_NAME = "$(TARGET_NAME)"; 608 | PROVISIONING_PROFILE_SPECIFIER = ""; 609 | SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; 610 | SUPPORTS_MACCATALYST = NO; 611 | SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; 612 | SWIFT_EMIT_LOC_STRINGS = YES; 613 | SWIFT_OBJC_BRIDGING_HEADER = "FaceLiveness-Bridging-Header.h"; 614 | SWIFT_VERSION = 5.0; 615 | TARGETED_DEVICE_FAMILY = 1; 616 | }; 617 | name = Release; 618 | }; 619 | CE29C53229ECD0FC008EDB5A /* Debug */ = { 620 | isa = XCBuildConfiguration; 621 | buildSettings = { 622 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 623 | BUNDLE_LOADER = "$(TEST_HOST)"; 624 | CODE_SIGN_STYLE = Automatic; 625 | CURRENT_PROJECT_VERSION = 1; 626 | DEVELOPMENT_TEAM = SZU3WP325N; 627 | GENERATE_INFOPLIST_FILE = YES; 628 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 629 | MARKETING_VERSION = 1.0; 630 | PRODUCT_BUNDLE_IDENTIFIER = com.faceplugin.FaceLivenessTests; 631 | PRODUCT_NAME = "$(TARGET_NAME)"; 632 | SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; 633 | SUPPORTS_MACCATALYST = NO; 634 | SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; 635 | SWIFT_EMIT_LOC_STRINGS = NO; 636 | SWIFT_VERSION = 5.0; 637 | TARGETED_DEVICE_FAMILY = 1; 638 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FaceLiveness.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/FaceLiveness"; 639 | }; 640 | name = Debug; 641 | }; 642 | CE29C53329ECD0FC008EDB5A /* Release */ = { 643 | isa = XCBuildConfiguration; 644 | buildSettings = { 645 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 646 | BUNDLE_LOADER = "$(TEST_HOST)"; 647 | CODE_SIGN_STYLE = Automatic; 648 | CURRENT_PROJECT_VERSION = 1; 649 | DEVELOPMENT_TEAM = SZU3WP325N; 650 | GENERATE_INFOPLIST_FILE = YES; 651 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 652 | MARKETING_VERSION = 1.0; 653 | PRODUCT_BUNDLE_IDENTIFIER = com.faceplugin.FaceLivenessTests; 654 | PRODUCT_NAME = "$(TARGET_NAME)"; 655 | SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; 656 | SUPPORTS_MACCATALYST = NO; 657 | SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; 658 | SWIFT_EMIT_LOC_STRINGS = NO; 659 | SWIFT_VERSION = 5.0; 660 | TARGETED_DEVICE_FAMILY = 1; 661 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FaceLiveness.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/FaceLiveness"; 662 | }; 663 | name = Release; 664 | }; 665 | CE29C53529ECD0FC008EDB5A /* Debug */ = { 666 | isa = XCBuildConfiguration; 667 | buildSettings = { 668 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 669 | CODE_SIGN_STYLE = Automatic; 670 | CURRENT_PROJECT_VERSION = 1; 671 | DEVELOPMENT_TEAM = SZU3WP325N; 672 | GENERATE_INFOPLIST_FILE = YES; 673 | MARKETING_VERSION = 1.0; 674 | PRODUCT_BUNDLE_IDENTIFIER = com.faceplugin.FaceLivenessUITests; 675 | PRODUCT_NAME = "$(TARGET_NAME)"; 676 | SWIFT_EMIT_LOC_STRINGS = NO; 677 | SWIFT_VERSION = 5.0; 678 | TARGETED_DEVICE_FAMILY = "1,2"; 679 | TEST_TARGET_NAME = FaceLiveness; 680 | }; 681 | name = Debug; 682 | }; 683 | CE29C53629ECD0FC008EDB5A /* Release */ = { 684 | isa = XCBuildConfiguration; 685 | buildSettings = { 686 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 687 | CODE_SIGN_STYLE = Automatic; 688 | CURRENT_PROJECT_VERSION = 1; 689 | DEVELOPMENT_TEAM = SZU3WP325N; 690 | GENERATE_INFOPLIST_FILE = YES; 691 | MARKETING_VERSION = 1.0; 692 | PRODUCT_BUNDLE_IDENTIFIER = com.faceplugin.FaceLivenessUITests; 693 | PRODUCT_NAME = "$(TARGET_NAME)"; 694 | SWIFT_EMIT_LOC_STRINGS = NO; 695 | SWIFT_VERSION = 5.0; 696 | TARGETED_DEVICE_FAMILY = "1,2"; 697 | TEST_TARGET_NAME = FaceLiveness; 698 | }; 699 | name = Release; 700 | }; 701 | /* End XCBuildConfiguration section */ 702 | 703 | /* Begin XCConfigurationList section */ 704 | CE29C4FC29ECD0A5008EDB5A /* Build configuration list for PBXProject "FaceLiveness" */ = { 705 | isa = XCConfigurationList; 706 | buildConfigurations = ( 707 | CE29C52C29ECD0FC008EDB5A /* Debug */, 708 | CE29C52D29ECD0FC008EDB5A /* Release */, 709 | ); 710 | defaultConfigurationIsVisible = 0; 711 | defaultConfigurationName = Release; 712 | }; 713 | CE29C52E29ECD0FC008EDB5A /* Build configuration list for PBXNativeTarget "FaceLiveness" */ = { 714 | isa = XCConfigurationList; 715 | buildConfigurations = ( 716 | CE29C52F29ECD0FC008EDB5A /* Debug */, 717 | CE29C53029ECD0FC008EDB5A /* Release */, 718 | ); 719 | defaultConfigurationIsVisible = 0; 720 | defaultConfigurationName = Release; 721 | }; 722 | CE29C53129ECD0FC008EDB5A /* Build configuration list for PBXNativeTarget "FaceLivenessTests" */ = { 723 | isa = XCConfigurationList; 724 | buildConfigurations = ( 725 | CE29C53229ECD0FC008EDB5A /* Debug */, 726 | CE29C53329ECD0FC008EDB5A /* Release */, 727 | ); 728 | defaultConfigurationIsVisible = 0; 729 | defaultConfigurationName = Release; 730 | }; 731 | CE29C53429ECD0FC008EDB5A /* Build configuration list for PBXNativeTarget "FaceLivenessUITests" */ = { 732 | isa = XCConfigurationList; 733 | buildConfigurations = ( 734 | CE29C53529ECD0FC008EDB5A /* Debug */, 735 | CE29C53629ECD0FC008EDB5A /* Release */, 736 | ); 737 | defaultConfigurationIsVisible = 0; 738 | defaultConfigurationName = Release; 739 | }; 740 | /* End XCConfigurationList section */ 741 | 742 | /* Begin XCVersionGroup section */ 743 | CE29C50D29ECD0A5008EDB5A /* FaceLiveness.xcdatamodeld */ = { 744 | isa = XCVersionGroup; 745 | children = ( 746 | CE29C50E29ECD0A5008EDB5A /* FaceRecognition.xcdatamodel */, 747 | ); 748 | currentVersion = CE29C50E29ECD0A5008EDB5A /* FaceRecognition.xcdatamodel */; 749 | path = FaceLiveness.xcdatamodeld; 750 | sourceTree = ""; 751 | versionGroupType = wrapper.xcdatamodel; 752 | }; 753 | /* End XCVersionGroup section */ 754 | }; 755 | rootObject = CE29C4F929ECD0A5008EDB5A /* Project object */; 756 | } 757 | -------------------------------------------------------------------------------- /FaceLiveness.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FaceLiveness.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /FaceLiveness.xcodeproj/project.xcworkspace/xcuserdata/dipankar.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness.xcodeproj/project.xcworkspace/xcuserdata/dipankar.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FaceLiveness.xcodeproj/project.xcworkspace/xcuserdata/sbldev02.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness.xcodeproj/project.xcworkspace/xcuserdata/sbldev02.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FaceLiveness.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FaceLiveness.xcodeproj/xcuserdata/dipankar.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FaceAttribute.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | FaceLiveness.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 0 16 | 17 | FaceRecognition.xcscheme_^#shared#^_ 18 | 19 | orderHint 20 | 0 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /FaceLiveness.xcodeproj/xcuserdata/sbldev02.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /FaceLiveness.xcodeproj/xcuserdata/sbldev02.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FaceAttribute.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | FaceLiveness.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 0 16 | 17 | FaceRecognition.xcscheme_^#shared#^_ 18 | 19 | orderHint 20 | 0 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /FaceLiveness.xcodeproj/xcuserdata/user.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /FaceLiveness.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FaceAttribute.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | FaceRecognition.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 0 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /FaceLiveness/AboutViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import AVFoundation 3 | 4 | class AboutViewController: UIViewController{ 5 | 6 | @IBOutlet weak var ContactUsBtn: UIButton! 7 | 8 | override func viewDidLoad() { 9 | super.viewDidLoad() 10 | 11 | self.ContactUsBtn.clipsToBounds = true 12 | self.ContactUsBtn.layer.cornerRadius = 25 13 | } 14 | 15 | @IBAction func contactUs_clicked(_ sender: Any) { 16 | guard let popupNavController = storyboard?.instantiateViewController(withIdentifier: "ContactUsVC") as? ContactUsVC else { return } 17 | present(popupNavController, animated: true, completion: nil) 18 | } 19 | 20 | @IBAction func done_clicked(_ sender: Any) { 21 | if let vc = self.presentingViewController as? ViewController { 22 | self.dismiss(animated: true, completion: nil) 23 | } 24 | } 25 | } 26 | 27 | extension AboutViewController: BottomPopupDelegate { 28 | 29 | func bottomPopupViewLoaded() { 30 | print("bottomPopupViewLoaded") 31 | } 32 | 33 | func bottomPopupWillAppear() { 34 | print("bottomPopupWillAppear") 35 | } 36 | 37 | func bottomPopupDidAppear() { 38 | print("bottomPopupDidAppear") 39 | } 40 | 41 | func bottomPopupWillDismiss() { 42 | print("bottomPopupWillDismiss") 43 | } 44 | 45 | func bottomPopupDidDismiss() { 46 | print("bottomPopupDidDismiss") 47 | } 48 | 49 | func bottomPopupDismissInteractionPercentChanged(from oldValue: CGFloat, to newValue: CGFloat) { 50 | print("bottomPopupDismissInteractionPercentChanged fromValue: \(oldValue) to: \(newValue)") 51 | } 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /FaceLiveness/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | 2 | import UIKit 3 | import CoreData 4 | 5 | @main 6 | class AppDelegate: UIResponder, UIApplicationDelegate { 7 | 8 | 9 | 10 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 11 | // Override point for customization after application launch. 12 | return true 13 | } 14 | 15 | // MARK: UISceneSession Lifecycle 16 | 17 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 18 | // Called when a new scene session is being created. 19 | // Use this method to select a configuration to create the new scene with. 20 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 21 | } 22 | 23 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 24 | // Called when the user discards a scene session. 25 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 26 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 27 | } 28 | 29 | // MARK: - Core Data stack 30 | 31 | lazy var persistentContainer: NSPersistentContainer = { 32 | /* 33 | The persistent container for the application. This implementation 34 | creates and returns a container, having loaded the store for the 35 | application to it. This property is optional since there are legitimate 36 | error conditions that could cause the creation of the store to fail. 37 | */ 38 | let container = NSPersistentContainer(name: "FaceLiveness") 39 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 40 | if let error = error as NSError? { 41 | // Replace this implementation with code to handle the error appropriately. 42 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 43 | 44 | /* 45 | Typical reasons for an error here include: 46 | * The parent directory does not exist, cannot be created, or disallows writing. 47 | * The persistent store is not accessible, due to permissions or data protection when the device is locked. 48 | * The device is out of space. 49 | * The store could not be migrated to the current model version. 50 | Check the error message to determine what the actual problem was. 51 | */ 52 | fatalError("Unresolved error \(error), \(error.userInfo)") 53 | } 54 | }) 55 | return container 56 | }() 57 | 58 | // MARK: - Core Data Saving support 59 | 60 | func saveContext () { 61 | let context = persistentContainer.viewContext 62 | if context.hasChanges { 63 | do { 64 | try context.save() 65 | } catch { 66 | // Replace this implementation with code to handle the error appropriately. 67 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 68 | let nserror = error as NSError 69 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)") 70 | } 71 | } 72 | } 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "0.500", 8 | "blue" : "0.890", 9 | "green" : "0.255", 10 | "red" : "0.749" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AppIcon.appiconset/120 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/AppIcon.appiconset/120 1.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "40.png", 5 | "idiom" : "universal", 6 | "platform" : "ios", 7 | "scale" : "2x", 8 | "size" : "20x20" 9 | }, 10 | { 11 | "filename" : "60.png", 12 | "idiom" : "universal", 13 | "platform" : "ios", 14 | "scale" : "3x", 15 | "size" : "20x20" 16 | }, 17 | { 18 | "filename" : "58.png", 19 | "idiom" : "universal", 20 | "platform" : "ios", 21 | "scale" : "2x", 22 | "size" : "29x29" 23 | }, 24 | { 25 | "filename" : "87.png", 26 | "idiom" : "universal", 27 | "platform" : "ios", 28 | "scale" : "3x", 29 | "size" : "29x29" 30 | }, 31 | { 32 | "filename" : "76.png", 33 | "idiom" : "universal", 34 | "platform" : "ios", 35 | "scale" : "2x", 36 | "size" : "38x38" 37 | }, 38 | { 39 | "filename" : "114.png", 40 | "idiom" : "universal", 41 | "platform" : "ios", 42 | "scale" : "3x", 43 | "size" : "38x38" 44 | }, 45 | { 46 | "filename" : "80.png", 47 | "idiom" : "universal", 48 | "platform" : "ios", 49 | "scale" : "2x", 50 | "size" : "40x40" 51 | }, 52 | { 53 | "filename" : "120.png", 54 | "idiom" : "universal", 55 | "platform" : "ios", 56 | "scale" : "3x", 57 | "size" : "40x40" 58 | }, 59 | { 60 | "filename" : "120 1.png", 61 | "idiom" : "universal", 62 | "platform" : "ios", 63 | "scale" : "2x", 64 | "size" : "60x60" 65 | }, 66 | { 67 | "filename" : "180.png", 68 | "idiom" : "universal", 69 | "platform" : "ios", 70 | "scale" : "3x", 71 | "size" : "60x60" 72 | }, 73 | { 74 | "idiom" : "universal", 75 | "platform" : "ios", 76 | "scale" : "2x", 77 | "size" : "64x64" 78 | }, 79 | { 80 | "idiom" : "universal", 81 | "platform" : "ios", 82 | "scale" : "3x", 83 | "size" : "64x64" 84 | }, 85 | { 86 | "idiom" : "universal", 87 | "platform" : "ios", 88 | "scale" : "2x", 89 | "size" : "68x68" 90 | }, 91 | { 92 | "idiom" : "universal", 93 | "platform" : "ios", 94 | "scale" : "2x", 95 | "size" : "76x76" 96 | }, 97 | { 98 | "idiom" : "universal", 99 | "platform" : "ios", 100 | "scale" : "2x", 101 | "size" : "83.5x83.5" 102 | }, 103 | { 104 | "filename" : "appstore.png", 105 | "idiom" : "universal", 106 | "platform" : "ios", 107 | "size" : "1024x1024" 108 | } 109 | ], 110 | "info" : { 111 | "author" : "xcode", 112 | "version" : 1 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/AppIcon.appiconset/appstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/AppIcon.appiconset/appstore.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/back_arw.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icons8-left-arrow-100(2).png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/back_arw.imageset/icons8-left-arrow-100(2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/back_arw.imageset/icons8-left-arrow-100(2).png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/camera_switch.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "switch-camera.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/camera_switch.imageset/switch-camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/camera_switch.imageset/switch-camera.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/clr_bg.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x33", 9 | "green" : "0x30", 10 | "red" : "0x30" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0x33", 27 | "green" : "0x30", 28 | "red" : "0x30" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/clr_main_button_bg1.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.890", 9 | "green" : "0.255", 10 | "red" : "0.749" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.890", 27 | "green" : "0.255", 28 | "red" : "0.749" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/clr_main_button_bg2.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.890", 9 | "green" : "0.255", 10 | "red" : "0.749" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.890", 27 | "green" : "0.255", 28 | "red" : "0.749" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/clr_roi_circle.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x32", 9 | "green" : "0x24", 10 | "red" : "0x49" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0x32", 27 | "green" : "0x24", 28 | "red" : "0x49" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/clr_roi_line.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xFF", 9 | "green" : "0xDD", 10 | "red" : "0xEA" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0xFF", 27 | "green" : "0xDD", 28 | "red" : "0xEA" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/clr_text.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xE5", 9 | "green" : "0xE1", 10 | "red" : "0xE6" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0xE5", 27 | "green" : "0xE1", 28 | "red" : "0xE6" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/clr_toast_bg.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x32", 9 | "green" : "0x24", 10 | "red" : "0x49" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0x32", 27 | "green" : "0x24", 28 | "red" : "0x49" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/gradient_bg.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "gradient(2).png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/gradient_bg.imageset/gradient(2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/gradient_bg.imageset/gradient(2).png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_enroll.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icons8-add-friend-100.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_enroll.imageset/icons8-add-friend-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_enroll.imageset/icons8-add-friend-100.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_faceplugin.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Square png file_2.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_faceplugin.imageset/Square png file_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_faceplugin.imageset/Square png file_2.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_github.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ic_github.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "ic_github 1.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "ic_github 2.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_github.imageset/ic_github 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_github.imageset/ic_github 1.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_github.imageset/ic_github 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_github.imageset/ic_github 2.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_github.imageset/ic_github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_github.imageset/ic_github.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_skype.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ic_skype.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "ic_skype 1.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "ic_skype 2.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_skype.imageset/ic_skype 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_skype.imageset/ic_skype 1.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_skype.imageset/ic_skype 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_skype.imageset/ic_skype 2.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_skype.imageset/ic_skype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_skype.imageset/ic_skype.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_telegram.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ic_telegram.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "ic_telegram 1.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "ic_telegram 2.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_telegram.imageset/ic_telegram 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_telegram.imageset/ic_telegram 1.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_telegram.imageset/ic_telegram 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_telegram.imageset/ic_telegram 2.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_telegram.imageset/ic_telegram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_telegram.imageset/ic_telegram.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_whatsapp.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ic_whatsapp.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "ic_whatsapp 1.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "ic_whatsapp 2.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp 1.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp 2.png -------------------------------------------------------------------------------- /FaceLiveness/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/FaceLiveness/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp.png -------------------------------------------------------------------------------- /FaceLiveness/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /FaceLiveness/BottomPopupController/BottomPopupDismissAnimator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DraggableDismissAnimator.swift 3 | // PresentationController 4 | // 5 | // Created by Emre on 11.09.2018. 6 | // Copyright © 2018 Emre. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class BottomPopupDismissAnimator: NSObject, UIViewControllerAnimatedTransitioning { 12 | private unowned var attributesOwner: BottomPresentableViewController 13 | 14 | init(attributesOwner: BottomPresentableViewController) { 15 | self.attributesOwner = attributesOwner 16 | } 17 | 18 | func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { 19 | attributesOwner.popupDismissDuration 20 | } 21 | 22 | func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { 23 | let fromVC = transitionContext.viewController(forKey: .from)! 24 | let dismissFrame = CGRect(origin: CGPoint(x: 0, y: UIScreen.main.bounds.size.height), size: fromVC.view.frame.size) 25 | 26 | UIView.animate(withDuration: transitionDuration(using: transitionContext), animations: { 27 | fromVC.view.frame = dismissFrame 28 | }) { (_) in 29 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /FaceLiveness/BottomPopupController/BottomPopupDismissInteractionController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DraggableDismissInteractionController.swift 3 | // PresentationController 4 | // 5 | // Created by Emre on 11.09.2018. 6 | // Copyright © 2018 Emre. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | protocol BottomPopupDismissInteractionControllerDelegate: class { 12 | func dismissInteractionPercentChanged(from oldValue: CGFloat, to newValue: CGFloat) 13 | } 14 | 15 | final class BottomPopupDismissInteractionController: UIPercentDrivenInteractiveTransition { 16 | private weak var presentedViewController: BottomPresentableViewController? 17 | private weak var delegate: BottomPopupDismissInteractionControllerDelegate? 18 | private weak var transitioningDelegate: BottomPopupTransitionHandler? 19 | private unowned var attributesDelegate: BottomPopupAttributesDelegate 20 | private (set) var isInteractiveDismissStarted: Bool = false 21 | 22 | private var currentPercent: CGFloat = 0 { 23 | didSet { 24 | delegate?.dismissInteractionPercentChanged(from: oldValue, to: currentPercent) 25 | } 26 | } 27 | 28 | init(presentedViewController: BottomPresentableViewController?, delegate: BottomPopupDismissInteractionControllerDelegate?, attributesDelegate: BottomPopupAttributesDelegate) { 29 | self.presentedViewController = presentedViewController 30 | self.transitioningDelegate = presentedViewController?.transitioningDelegate as? BottomPopupTransitionHandler 31 | self.delegate = delegate 32 | self.attributesDelegate = attributesDelegate 33 | super.init() 34 | preparePanGesture(in: presentedViewController?.view) 35 | } 36 | 37 | private func finishAnimation(withVelocity velocity: CGPoint) { 38 | if currentPercent > BottomPopupConstants.minPercentOfVisiblePartToCompleteAnimation || velocity.y > BottomPopupConstants.swipeDownThreshold { 39 | finish() 40 | } else { 41 | cancel() 42 | } 43 | } 44 | 45 | private func preparePanGesture(in view: UIView?) { 46 | let panGesture = UIPanGestureRecognizer(target: self, action: #selector(handlePanGesture(_:))) 47 | presentedViewController?.view?.addGestureRecognizer(panGesture) 48 | } 49 | 50 | @objc private func handlePanGesture(_ pan: UIPanGestureRecognizer) { 51 | guard attributesDelegate.popupShouldBeganDismiss else { return } 52 | 53 | let translationY = pan.translation(in: presentedViewController?.view).y 54 | currentPercent = min(max(translationY/(presentedViewController?.view.frame.size.height ?? 0), 0), 1) 55 | 56 | switch pan.state { 57 | case .began: 58 | isInteractiveDismissStarted = true 59 | presentedViewController?.dismiss(animated: true, completion: nil) 60 | case .changed: 61 | update(currentPercent) 62 | default: 63 | let velocity = pan.velocity(in: presentedViewController?.view) 64 | isInteractiveDismissStarted = false 65 | finishAnimation(withVelocity: velocity) 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /FaceLiveness/BottomPopupController/BottomPopupNavigationController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BottomPopupNavigationController.swift 3 | // BottomPopup 4 | // 5 | // Created by Emre on 11.10.2018. 6 | // Copyright © 2018 Emre. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class BottomPopupNavigationController: UINavigationController, BottomPopupAttributesDelegate { 12 | private var transitionHandler: BottomPopupTransitionHandler? 13 | open weak var popupDelegate: BottomPopupDelegate? 14 | 15 | // MARK: Initializations 16 | 17 | override public init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { 18 | super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) 19 | 20 | initialize() 21 | } 22 | 23 | required public init?(coder aDecoder: NSCoder) { 24 | super.init(coder: aDecoder) 25 | 26 | initialize() 27 | } 28 | 29 | open override func viewDidLoad() { 30 | super.viewDidLoad() 31 | transitionHandler?.notifyViewLoaded() 32 | popupDelegate?.bottomPopupViewLoaded() 33 | self.view.accessibilityIdentifier = popupViewAccessibilityIdentifier 34 | } 35 | 36 | override open func viewWillAppear(_ animated: Bool) { 37 | super.viewWillAppear(animated) 38 | 39 | curveTopCorners() 40 | popupDelegate?.bottomPopupWillAppear() 41 | } 42 | 43 | open override func viewDidAppear(_ animated: Bool) { 44 | super.viewDidAppear(animated) 45 | 46 | popupDelegate?.bottomPopupDidAppear() 47 | } 48 | 49 | open override func viewWillDisappear(_ animated: Bool) { 50 | super.viewWillDisappear(animated) 51 | 52 | popupDelegate?.bottomPopupWillDismiss() 53 | } 54 | 55 | open override func viewDidDisappear(_ animated: Bool) { 56 | super.viewDidDisappear(animated) 57 | 58 | popupDelegate?.bottomPopupDidDismiss() 59 | } 60 | 61 | //MARK: Private Methods 62 | 63 | private func initialize() { 64 | transitionHandler = BottomPopupTransitionHandler(popupViewController: self, popupDelegate: popupDelegate) 65 | transitioningDelegate = transitionHandler 66 | modalPresentationStyle = .custom 67 | } 68 | 69 | private func curveTopCorners() { 70 | let path = UIBezierPath(roundedRect: self.view.bounds, byRoundingCorners: [.topLeft, .topRight], cornerRadii: CGSize(width: popupTopCornerRadius, height: 0)) 71 | let maskLayer = CAShapeLayer() 72 | maskLayer.frame = self.view.bounds 73 | maskLayer.path = path.cgPath 74 | self.view.layer.mask = maskLayer 75 | } 76 | 77 | // MARK: - BottomPopupAttributesDelegate Variables 78 | open var popupHeight: CGFloat { BottomPopupConstants.defaultHeight } 79 | open var popupTopCornerRadius: CGFloat { BottomPopupConstants.defaultTopCornerRadius } 80 | open var popupPresentDuration: Double { BottomPopupConstants.defaultPresentDuration } 81 | open var popupDismissDuration: Double { BottomPopupConstants.defaultDismissDuration } 82 | open var popupShouldDismissInteractivelty: Bool { BottomPopupConstants.dismissInteractively } 83 | open var popupDimmingViewAlpha: CGFloat { BottomPopupConstants.dimmingViewDefaultAlphaValue } 84 | open var popupShouldBeganDismiss: Bool { BottomPopupConstants.shouldBeganDismiss } 85 | open var popupViewAccessibilityIdentifier: String { BottomPopupConstants.defaultPopupViewAccessibilityIdentifier } 86 | } 87 | 88 | extension BottomPopupNavigationController { 89 | open func updatePopupHeight(to height: CGFloat) { 90 | transitionHandler?.setHeight(to: height) 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /FaceLiveness/BottomPopupController/BottomPopupPresentAnimator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DraggablePresentAnimator.swift 3 | // PresentationController 4 | // 5 | // Created by Emre on 11.09.2018. 6 | // Copyright © 2018 Emre. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class BottomPopupPresentAnimator: NSObject, UIViewControllerAnimatedTransitioning { 12 | private unowned var attributesOwner: BottomPresentableViewController 13 | 14 | init(attributesOwner: BottomPresentableViewController) { 15 | self.attributesOwner = attributesOwner 16 | } 17 | 18 | func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { 19 | attributesOwner.popupPresentDuration 20 | } 21 | 22 | func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { 23 | let toVC = transitionContext.viewController(forKey: .to)! 24 | transitionContext.containerView.addSubview(toVC.view) 25 | let presentFrame = transitionContext.finalFrame(for: toVC) 26 | let initialFrame = CGRect(origin: CGPoint(x: 0, y: UIScreen.main.bounds.size.height), size: presentFrame.size) 27 | toVC.view.frame = initialFrame 28 | UIView.animate(withDuration: transitionDuration(using: transitionContext), animations: { 29 | toVC.view.frame = presentFrame 30 | }) { (_) in 31 | transitionContext.completeTransition(true) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /FaceLiveness/BottomPopupController/BottomPopupPresentationController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BottomPopupPresentationController.swift 3 | // PresentationController 4 | // 5 | // Created by Emre on 11.09.2018. 6 | // Copyright © 2018 Emre. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class BottomPopupPresentationController: UIPresentationController { 12 | private var dimmingView: UIView! 13 | private var popupHeight: CGFloat 14 | private unowned var attributesDelegate: BottomPopupAttributesDelegate 15 | 16 | override var frameOfPresentedViewInContainerView: CGRect { 17 | CGRect(origin: CGPoint(x: 0, y: UIScreen.main.bounds.size.height - popupHeight), size: CGSize(width: presentedViewController.view.frame.size.width, height: popupHeight)) 18 | } 19 | 20 | private func changeDimmingViewAlphaAlongWithAnimation(to alpha: CGFloat) { 21 | guard let coordinator = presentedViewController.transitionCoordinator else { 22 | dimmingView.backgroundColor = UIColor.black.withAlphaComponent(alpha) 23 | return 24 | } 25 | 26 | coordinator.animate(alongsideTransition: { _ in 27 | self.dimmingView.backgroundColor = UIColor.black.withAlphaComponent(alpha) 28 | }) 29 | } 30 | 31 | init(presentedViewController: UIViewController, presenting presentingViewController: UIViewController?, attributesDelegate: BottomPopupAttributesDelegate) { 32 | self.attributesDelegate = attributesDelegate 33 | popupHeight = attributesDelegate.popupHeight 34 | super.init(presentedViewController: presentedViewController, presenting: presentingViewController) 35 | setupDimmingView() 36 | } 37 | 38 | override func containerViewWillLayoutSubviews() { 39 | presentedView?.frame = frameOfPresentedViewInContainerView 40 | } 41 | 42 | override func presentationTransitionWillBegin() { 43 | containerView?.insertSubview(dimmingView, at: 0) 44 | changeDimmingViewAlphaAlongWithAnimation(to: attributesDelegate.popupDimmingViewAlpha) 45 | } 46 | 47 | override func dismissalTransitionWillBegin() { 48 | changeDimmingViewAlphaAlongWithAnimation(to: 0) 49 | } 50 | 51 | func setHeight(to height: CGFloat) { 52 | popupHeight = height 53 | UIView.animate(withDuration: attributesDelegate.popupPresentDuration) { 54 | self.containerViewWillLayoutSubviews() 55 | } 56 | } 57 | 58 | @objc private func handleTap(_ tap: UITapGestureRecognizer) { 59 | guard attributesDelegate.popupShouldBeganDismiss else { return } 60 | presentedViewController.dismiss(animated: true, completion: nil) 61 | } 62 | 63 | @objc private func handleSwipe(_ swipe: UISwipeGestureRecognizer) { 64 | guard attributesDelegate.popupShouldBeganDismiss else { return } 65 | presentedViewController.dismiss(animated: true, completion: nil) 66 | } 67 | } 68 | 69 | private extension BottomPopupPresentationController { 70 | func setupDimmingView() { 71 | dimmingView = UIView() 72 | dimmingView.frame = CGRect(origin: .zero, size: UIScreen.main.bounds.size) 73 | dimmingView.backgroundColor = UIColor.black.withAlphaComponent(0) 74 | let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handleTap(_:))) 75 | let swipeGesture = UISwipeGestureRecognizer(target: self, action: #selector(handleSwipe(_:))) 76 | swipeGesture.direction = [.down, .up] 77 | dimmingView.isUserInteractionEnabled = true 78 | [tapGesture, swipeGesture].forEach { dimmingView.addGestureRecognizer($0) } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /FaceLiveness/BottomPopupController/BottomPopupTransitionHandler.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DraggableTransitioningDelegate.swift 3 | // PresentationController 4 | // 5 | // Created by Emre on 11.09.2018. 6 | // Copyright © 2018 Emre. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class BottomPopupTransitionHandler: NSObject, UIViewControllerTransitioningDelegate { 12 | private weak var popupDelegate: BottomPopupDelegate? 13 | private weak var popupViewController: BottomPresentableViewController? 14 | private let presentAnimator: BottomPopupPresentAnimator 15 | private let dismissAnimator: BottomPopupDismissAnimator 16 | private var interactionController: BottomPopupDismissInteractionController? 17 | 18 | init(popupViewController: BottomPresentableViewController, popupDelegate: BottomPopupDelegate?) { 19 | self.popupViewController = popupViewController 20 | self.popupDelegate = popupDelegate 21 | presentAnimator = BottomPopupPresentAnimator(attributesOwner: popupViewController) 22 | dismissAnimator = BottomPopupDismissAnimator(attributesOwner: popupViewController) 23 | } 24 | 25 | //MARK: Public 26 | func notifyViewLoaded() { 27 | if let popupViewController = popupViewController, popupViewController.popupShouldDismissInteractivelty { 28 | interactionController = BottomPopupDismissInteractionController(presentedViewController: popupViewController, delegate: self, attributesDelegate: popupViewController) 29 | } 30 | } 31 | 32 | func setHeight(to height: CGFloat) { 33 | guard let presentationController = popupViewController?.presentationController as? BottomPopupPresentationController else { return } 34 | presentationController.setHeight(to: height) 35 | } 36 | 37 | //MARK: Specific animators 38 | func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? { 39 | guard let popupViewController = popupViewController else { return nil } 40 | return BottomPopupPresentationController(presentedViewController: presented, presenting: presenting, attributesDelegate: popupViewController) 41 | } 42 | 43 | func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? { 44 | presentAnimator 45 | } 46 | 47 | func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { 48 | dismissAnimator 49 | } 50 | 51 | func interactionControllerForDismissal(using animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { 52 | guard let interactionController = interactionController, interactionController.isInteractiveDismissStarted else { return nil } 53 | return interactionController 54 | } 55 | } 56 | 57 | // MARK: - BottomPopupDismissInteractionControllerDelegate 58 | extension BottomPopupTransitionHandler: BottomPopupDismissInteractionControllerDelegate { 59 | func dismissInteractionPercentChanged(from oldValue: CGFloat, to newValue: CGFloat) { 60 | popupDelegate?.bottomPopupDismissInteractionPercentChanged(from: oldValue, to: newValue) 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /FaceLiveness/BottomPopupController/BottomPopupUtils.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BottomPopupUtils.swift 3 | // BottomPopup 4 | // 5 | // Created by Emre on 11.10.2018. 6 | // Copyright © 2018 Emre. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | typealias BottomPresentableViewController = BottomPopupAttributesDelegate & UIViewController 12 | 13 | public protocol BottomPopupDelegate: class { 14 | func bottomPopupViewLoaded() 15 | func bottomPopupWillAppear() 16 | func bottomPopupDidAppear() 17 | func bottomPopupWillDismiss() 18 | func bottomPopupDidDismiss() 19 | func bottomPopupDismissInteractionPercentChanged(from oldValue: CGFloat, to newValue: CGFloat) 20 | } 21 | 22 | public extension BottomPopupDelegate { 23 | func bottomPopupViewLoaded() { } 24 | func bottomPopupWillAppear() { } 25 | func bottomPopupDidAppear() { } 26 | func bottomPopupWillDismiss() { } 27 | func bottomPopupDidDismiss() { } 28 | func bottomPopupDismissInteractionPercentChanged(from oldValue: CGFloat, to newValue: CGFloat) { } 29 | } 30 | 31 | public protocol BottomPopupAttributesDelegate: class { 32 | var popupHeight: CGFloat { get } 33 | var popupTopCornerRadius: CGFloat { get } 34 | var popupPresentDuration: Double { get } 35 | var popupDismissDuration: Double { get } 36 | var popupShouldDismissInteractivelty: Bool { get } 37 | var popupDimmingViewAlpha: CGFloat { get } 38 | var popupShouldBeganDismiss: Bool { get } 39 | var popupViewAccessibilityIdentifier: String { get } 40 | } 41 | 42 | public enum BottomPopupConstants { 43 | static let minPercentOfVisiblePartToCompleteAnimation: CGFloat = 0.5 44 | static let swipeDownThreshold: CGFloat = 1000 45 | static let defaultHeight: CGFloat = 377.0 46 | static let defaultTopCornerRadius: CGFloat = 10.0 47 | static let defaultPresentDuration = 0.5 48 | static let defaultDismissDuration = 0.5 49 | static let dismissInteractively = true 50 | static let shouldBeganDismiss = true 51 | static let dimmingViewDefaultAlphaValue: CGFloat = 0.5 52 | static let defaultPopupViewAccessibilityIdentifier: String = "bottomPopupView" 53 | } 54 | -------------------------------------------------------------------------------- /FaceLiveness/BottomPopupController/BottomPopupViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BottomPopupViewController.swift 3 | // Trendyol 4 | // 5 | // Created by Emre on 11.09.2018. 6 | // Copyright © 2018 Trendyol.com. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class BottomPopupViewController: UIViewController, BottomPopupAttributesDelegate { 12 | private var transitionHandler: BottomPopupTransitionHandler? 13 | open weak var popupDelegate: BottomPopupDelegate? 14 | 15 | // MARK: Initializations 16 | 17 | override public init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { 18 | super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) 19 | initialize() 20 | } 21 | 22 | required public init?(coder aDecoder: NSCoder) { 23 | super.init(coder: aDecoder) 24 | initialize() 25 | } 26 | 27 | open override func viewDidLoad() { 28 | super.viewDidLoad() 29 | transitionHandler?.notifyViewLoaded() 30 | popupDelegate?.bottomPopupViewLoaded() 31 | view.accessibilityIdentifier = popupViewAccessibilityIdentifier 32 | } 33 | 34 | open override func viewWillAppear(_ animated: Bool) { 35 | super.viewWillAppear(animated) 36 | curveTopCorners() 37 | popupDelegate?.bottomPopupWillAppear() 38 | } 39 | 40 | open override func viewDidAppear(_ animated: Bool) { 41 | super.viewDidAppear(animated) 42 | popupDelegate?.bottomPopupDidAppear() 43 | } 44 | 45 | open override func viewWillDisappear(_ animated: Bool) { 46 | super.viewWillDisappear(animated) 47 | popupDelegate?.bottomPopupWillDismiss() 48 | } 49 | 50 | open override func viewDidDisappear(_ animated: Bool) { 51 | super.viewDidDisappear(animated) 52 | popupDelegate?.bottomPopupDidDismiss() 53 | } 54 | 55 | // MARK: - Public Methods 56 | open func updatePopupHeight(to height: CGFloat) { 57 | transitionHandler?.setHeight(to: height) 58 | } 59 | 60 | // MARK: Private Methods 61 | private func initialize() { 62 | transitionHandler = BottomPopupTransitionHandler(popupViewController: self, popupDelegate: popupDelegate) 63 | transitioningDelegate = transitionHandler 64 | modalPresentationStyle = .custom 65 | } 66 | 67 | private func curveTopCorners() { 68 | let path = UIBezierPath(roundedRect: view.bounds, byRoundingCorners: [.topLeft, .topRight], cornerRadii: CGSize(width: popupTopCornerRadius, height: 0)) 69 | let maskLayer = CAShapeLayer() 70 | maskLayer.frame = view.bounds 71 | maskLayer.path = path.cgPath 72 | view.layer.mask = maskLayer 73 | } 74 | 75 | // MARK: - BottomPopupAttributesDelegate Variables 76 | open var popupHeight: CGFloat { BottomPopupConstants.defaultHeight } 77 | open var popupTopCornerRadius: CGFloat { BottomPopupConstants.defaultTopCornerRadius } 78 | open var popupPresentDuration: Double { BottomPopupConstants.defaultPresentDuration } 79 | open var popupDismissDuration: Double { BottomPopupConstants.defaultDismissDuration } 80 | open var popupShouldDismissInteractivelty: Bool { BottomPopupConstants.dismissInteractively } 81 | open var popupDimmingViewAlpha: CGFloat { BottomPopupConstants.dimmingViewDefaultAlphaValue } 82 | open var popupShouldBeganDismiss: Bool { BottomPopupConstants.shouldBeganDismiss } 83 | open var popupViewAccessibilityIdentifier: String { BottomPopupConstants.defaultPopupViewAccessibilityIdentifier } 84 | } 85 | -------------------------------------------------------------------------------- /FaceLiveness/CameraViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import AVFoundation 3 | import CoreData 4 | 5 | class CameraViewController: UIViewController, AVCaptureVideoDataOutputSampleBufferDelegate{ 6 | 7 | @IBOutlet weak var cameraView: UIView! 8 | @IBOutlet weak var faceView: FaceView! 9 | @IBOutlet weak var cameraSwitchBtn: UIButton! 10 | 11 | var session = AVCaptureSession() 12 | 13 | var cameraLens_val = 0 14 | var livenessThreshold = Float(0) 15 | var cameraPosition: AVCaptureDevice.Position! 16 | 17 | var cameraLens_val_settings: Int! 18 | 19 | lazy var persistentContainer: NSPersistentContainer = { 20 | let container = NSPersistentContainer(name: ViewController.CORE_DATA_NAME) 21 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 22 | if let error = error as NSError? { 23 | fatalError("Unresolved error \(error), \(error.userInfo)") 24 | } 25 | }) 26 | return container 27 | }() 28 | 29 | override func viewWillAppear(_ animated: Bool) { 30 | let defaults = UserDefaults.standard 31 | cameraLens_val_settings = defaults.integer(forKey: "camera_lens") 32 | } 33 | 34 | override func viewWillDisappear(_ animated: Bool) { 35 | let defaults = UserDefaults.standard 36 | defaults.set(cameraLens_val_settings, forKey: "camera_lens") 37 | } 38 | 39 | override func viewDidLoad() { 40 | super.viewDidLoad() 41 | // Do any additional setup after loading the view. 42 | 43 | cameraView.translatesAutoresizingMaskIntoConstraints = true 44 | cameraView.frame = view.bounds 45 | 46 | faceView.translatesAutoresizingMaskIntoConstraints = true 47 | faceView.frame = view.bounds 48 | 49 | let defaults = UserDefaults.standard 50 | cameraLens_val = defaults.integer(forKey: "camera_lens") 51 | livenessThreshold = defaults.float(forKey: "liveness_threshold") 52 | 53 | session = AVCaptureSession() 54 | startCamera() 55 | } 56 | 57 | func startCamera() { 58 | self.cameraSwitchBtn.isHidden = false 59 | var cameraLens = AVCaptureDevice.Position.front 60 | if(cameraLens_val == 0) { 61 | cameraLens = AVCaptureDevice.Position.back 62 | } 63 | 64 | //cameraPosition = cameraLens 65 | 66 | // Create an AVCaptureSession 67 | session.sessionPreset = .high 68 | 69 | // Create an AVCaptureDevice for the camera 70 | guard let videoDevice = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: cameraLens) else { return } 71 | guard let input = try? AVCaptureDeviceInput(device: videoDevice) else { return } 72 | if session.canAddInput(input) { 73 | session.addInput(input) 74 | } 75 | 76 | // Create an AVCaptureVideoDataOutput 77 | let videoOutput = AVCaptureVideoDataOutput() 78 | 79 | // Set the video output's delegate and queue for processing video frames 80 | videoOutput.setSampleBufferDelegate(self, queue: DispatchQueue.global(qos: .default)) 81 | 82 | // Add the video output to the session 83 | session.addOutput(videoOutput) 84 | 85 | let previewLayer = AVCaptureVideoPreviewLayer(session: session) 86 | previewLayer.videoGravity = .resizeAspectFill 87 | previewLayer.frame = view.bounds 88 | cameraView.layer.addSublayer(previewLayer) 89 | 90 | // Start the session 91 | session.startRunning() 92 | } 93 | 94 | func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) { 95 | 96 | guard let pixelBuffer: CVPixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else { return } 97 | 98 | CVPixelBufferLockBaseAddress(pixelBuffer, CVPixelBufferLockFlags.readOnly) 99 | let ciImage = CIImage(cvPixelBuffer: pixelBuffer) 100 | 101 | let context = CIContext() 102 | let cgImage = context.createCGImage(ciImage, from: ciImage.extent) 103 | let image = UIImage(cgImage: cgImage!) 104 | CVPixelBufferUnlockBaseAddress(pixelBuffer, CVPixelBufferLockFlags.readOnly) 105 | 106 | // Rotate and flip the image 107 | let capturedImage = image.rotate(radians: .pi/2).flipHorizontally() 108 | 109 | let param = FaceDetectionParam() 110 | param.check_liveness = true 111 | 112 | let faceBoxes = FaceSDK.faceDetection(capturedImage, param: param) 113 | for faceBox in (faceBoxes as NSArray as! [FaceBox]) { 114 | if(cameraLens_val == 0) { 115 | let tmp = faceBox.x1 116 | faceBox.x1 = Int32(capturedImage.size.width) - faceBox.x2 - 1; 117 | faceBox.x2 = Int32(capturedImage.size.width) - tmp - 1; 118 | } 119 | } 120 | 121 | DispatchQueue.main.sync { 122 | self.faceView.setFrameSize(frameSize: capturedImage.size) 123 | self.faceView.setFaceBoxes(faceBoxes: faceBoxes) 124 | } 125 | } 126 | 127 | @IBAction func done_clicked(_ sender: Any) { 128 | self.cameraSwitchBtn.isHidden = false 129 | session.startRunning() 130 | } 131 | 132 | @IBAction func cameraSwitchClicked(_ sender: Any) { 133 | let defaults = UserDefaults.standard 134 | cameraLens_val = defaults.integer(forKey: "camera_lens") 135 | 136 | switch cameraLens_val { 137 | case 0: 138 | defaults.set(1, forKey: "camera_lens") 139 | case 1: 140 | defaults.set(0, forKey: "camera_lens") 141 | default: 142 | print("cameraSwitchClicked") 143 | 144 | } 145 | self.viewDidLoad() 146 | } 147 | 148 | } 149 | 150 | -------------------------------------------------------------------------------- /FaceLiveness/ContactUsVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContactUsVC.swift 3 | // 4 | // Created by Dipankar Das on 9/3/24. 5 | // 6 | 7 | import Foundation 8 | import UIKit 9 | 10 | class ContactUsVC: BottomPopupViewController { 11 | var height: CGFloat? 12 | var topCornerRadius: CGFloat? 13 | var presentDuration: Double? 14 | var dismissDuration: Double? 15 | var shouldDismissInteractivelty: Bool? 16 | 17 | @IBAction func mail_clicked(_ sender: Any) { 18 | let appURL = URL(string: "mailto:info@faceplugin.com") // URL scheme for Mail app 19 | 20 | if let appURL = appURL, UIApplication.shared.canOpenURL(appURL) { 21 | // If Mail app is installed, open it with a pre-filled email 22 | UIApplication.shared.open(appURL, options: [:], completionHandler: nil) 23 | } else { 24 | // If Mail app is not installed, show an alert indicating that Mail app is not available 25 | let alert = UIAlertController(title: "Mail App Not Available", message: "The Mail app is not installed on this device.", preferredStyle: .alert) 26 | let okAction = UIAlertAction(title: "OK", style: .default, handler: nil) 27 | alert.addAction(okAction) 28 | UIApplication.shared.keyWindow?.rootViewController?.present(alert, animated: true, completion: nil) 29 | } 30 | } 31 | 32 | 33 | @IBAction func skype_clicked(_ sender: Any) { 34 | 35 | } 36 | 37 | @IBAction func telegram_clicked(_ sender: Any) { 38 | /*let appURL = URL(string: "tg://resolve?domain=faceplugin") // URL scheme for Telegram app 39 | 40 | if let appURL = appURL, UIApplication.shared.canOpenURL(appURL) { 41 | // If Telegram app is installed, open it to the "Add Contact" screen 42 | UIApplication.shared.open(appURL, options: [:], completionHandler: nil) 43 | } else { 44 | let username = "faceplugin" 45 | let telegramURL = URL(string: "https://t.me/\(username)")! 46 | UIApplication.shared.open(telegramURL, options: [:], completionHandler: nil) 47 | }*/ 48 | } 49 | 50 | @IBAction func whatsapp_clicked(_ sender: Any) { 51 | /* let appURL = URL(string: "whatsapp://send?phone=+14422295661") // URL scheme for Telegram app 52 | 53 | if let appURL = appURL, UIApplication.shared.canOpenURL(appURL) { 54 | // If Telegram app is installed, open it to the "Add Contact" screen 55 | UIApplication.shared.open(appURL, options: [:], completionHandler: nil) 56 | } else { 57 | let username = "+14422295661" 58 | let telegramURL = URL(string: "https://wa.me/\(username)")! 59 | UIApplication.shared.open(telegramURL, options: [:], completionHandler: nil) 60 | }*/ 61 | } 62 | 63 | @IBAction func github_clicked(_ sender: Any) { 64 | let telegramURL = URL(string: "https://github.com/Faceplugin-ltd")! 65 | UIApplication.shared.open(telegramURL, options: [:], completionHandler: nil) 66 | } 67 | 68 | // MARK: - BottomPopupAttributesDelegate Variables 69 | override var popupHeight: CGFloat { height ?? 280.0 } 70 | override var popupTopCornerRadius: CGFloat { topCornerRadius ?? 16.0 } 71 | override var popupPresentDuration: Double { presentDuration ?? 0.5 } 72 | override var popupDismissDuration: Double { dismissDuration ?? 0.5 } 73 | override var popupShouldDismissInteractivelty: Bool { shouldDismissInteractivelty ?? true } 74 | override var popupDimmingViewAlpha: CGFloat { BottomPopupConstants.dimmingViewDefaultAlphaValue } 75 | } 76 | -------------------------------------------------------------------------------- /FaceLiveness/FaceLiveness.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | FaceRecognition.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /FaceLiveness/FaceLiveness.xcdatamodeld/FaceRecognition.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /FaceLiveness/FaceView.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class FaceView: UIView { 4 | 5 | var faceBoxes: NSMutableArray? = nil 6 | var frameSize: CGSize? 7 | 8 | public func setFaceBoxes(faceBoxes: NSMutableArray) { 9 | self.faceBoxes = faceBoxes 10 | setNeedsDisplay() 11 | } 12 | 13 | public func setFrameSize(frameSize: CGSize) { 14 | self.frameSize = frameSize 15 | } 16 | 17 | // Only override draw() if you perform custom drawing. 18 | // An empty implementation adversely affects performance during animation. 19 | override func draw(_ rect: CGRect) { 20 | 21 | guard let context = UIGraphicsGetCurrentContext() else { 22 | return 23 | } 24 | 25 | let defaults = UserDefaults.standard 26 | let livenessThreshold = defaults.float(forKey: "liveness_threshold") 27 | 28 | if(self.frameSize != nil) { 29 | context.beginPath() 30 | 31 | let x_scale = self.frameSize!.width / self.bounds.width 32 | let y_scale = self.frameSize!.height / self.bounds.height 33 | 34 | for faceBox in (faceBoxes! as NSArray as! [FaceBox]) { 35 | var color = UIColor.green 36 | var string = "REAL " + String(format: "%.3f", faceBox.liveness) 37 | if(faceBox.liveness < livenessThreshold) { 38 | color = UIColor.red 39 | string = "SPOOF " + String(format: "%.3f", faceBox.liveness) 40 | } 41 | 42 | context.setStrokeColor(color.cgColor) 43 | context.setLineWidth(2.0) 44 | 45 | let scaledRect = CGRect(x: Int(CGFloat(faceBox.x1) / x_scale), y: Int(CGFloat(faceBox.y1) / y_scale), width: Int(CGFloat(faceBox.x2 - faceBox.x1 + 1) / x_scale), height: Int(CGFloat(faceBox.y2 - faceBox.y1 + 1) / y_scale)) 46 | context.addRect(scaledRect) 47 | 48 | let attributes = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 20), 49 | NSAttributedString.Key.foregroundColor: color] 50 | string.draw(at: CGPoint(x: CGFloat(scaledRect.minX + 5), y: CGFloat(scaledRect.minY - 25)), withAttributes: attributes) 51 | 52 | context.strokePath() 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /FaceLiveness/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIApplicationSceneManifest 6 | 7 | UIApplicationSupportsMultipleScenes 8 | 9 | UISceneConfigurations 10 | 11 | UIWindowSceneSessionRoleApplication 12 | 13 | 14 | UISceneConfigurationName 15 | Default Configuration 16 | UISceneDelegateClassName 17 | $(PRODUCT_MODULE_NAME).SceneDelegate 18 | UISceneStoryboardFile 19 | Main 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /FaceLiveness/Model.xcdatamodeld/Model.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FaceLiveness/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | import UIKit 4 | 5 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 6 | 7 | var window: UIWindow? 8 | 9 | 10 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 11 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 12 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 13 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 14 | guard let _ = (scene as? UIWindowScene) else { return } 15 | } 16 | 17 | func sceneDidDisconnect(_ scene: UIScene) { 18 | // Called as the scene is being released by the system. 19 | // This occurs shortly after the scene enters the background, or when its session is discarded. 20 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 21 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). 22 | } 23 | 24 | func sceneDidBecomeActive(_ scene: UIScene) { 25 | // Called when the scene has moved from an inactive state to an active state. 26 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 27 | } 28 | 29 | func sceneWillResignActive(_ scene: UIScene) { 30 | // Called when the scene will move from an active state to an inactive state. 31 | // This may occur due to temporary interruptions (ex. an incoming phone call). 32 | } 33 | 34 | func sceneWillEnterForeground(_ scene: UIScene) { 35 | // Called as the scene transitions from the background to the foreground. 36 | // Use this method to undo the changes made on entering the background. 37 | } 38 | 39 | func sceneDidEnterBackground(_ scene: UIScene) { 40 | // Called as the scene transitions from the foreground to the background. 41 | // Use this method to save data, release shared resources, and store enough scene-specific state information 42 | // to restore the scene back to its current state. 43 | 44 | // Save changes in the application's managed object context when the application transitions to the background. 45 | (UIApplication.shared.delegate as? AppDelegate)?.saveContext() 46 | } 47 | 48 | 49 | } 50 | 51 | -------------------------------------------------------------------------------- /FaceLiveness/SettingsViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import AVFoundation 3 | import CoreData 4 | 5 | class SettingsViewController: UIViewController{ 6 | 7 | static let CAMERA_LENS_DEFAULT = 1 8 | static let LIVENESS_THRESHOLD_DEFAULT = Float(0.7) 9 | 10 | @IBOutlet weak var cameraLensSwitch: UISwitch! 11 | @IBOutlet weak var livenessThresholdLbl: UILabel! 12 | 13 | @IBOutlet weak var cameraLensLbl: UILabel! 14 | 15 | 16 | lazy var persistentContainer: NSPersistentContainer = { 17 | let container = NSPersistentContainer(name: ViewController.CORE_DATA_NAME) 18 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 19 | if let error = error as NSError? { 20 | fatalError("Unresolved error \(error), \(error.userInfo)") 21 | } 22 | }) 23 | return container 24 | }() 25 | 26 | override func viewDidLoad() { 27 | super.viewDidLoad() 28 | // Do any additional setup after loading the view. 29 | 30 | let defaults = UserDefaults.standard 31 | let cameraLens = defaults.integer(forKey: "camera_lens") 32 | 33 | if(cameraLens == 0) { 34 | cameraLensSwitch.isOn = false 35 | cameraLensLbl.text = "Back" 36 | } else { 37 | cameraLensSwitch.isOn = true 38 | cameraLensLbl.text = "Front" 39 | } 40 | 41 | let livenessThreshold = defaults.float(forKey: "liveness_threshold") 42 | livenessThresholdLbl.text = String(livenessThreshold) 43 | } 44 | 45 | static func setDefaultSettings() { 46 | let defaults = UserDefaults.standard 47 | let defaultChanged = defaults.bool(forKey: "default_changed") 48 | if(defaultChanged == false) { 49 | defaults.set(true, forKey: "default_changed") 50 | 51 | defaults.set(SettingsViewController.CAMERA_LENS_DEFAULT, forKey: "camera_lens") 52 | defaults.set(SettingsViewController.LIVENESS_THRESHOLD_DEFAULT, forKey: "liveness_threshold") 53 | 54 | } 55 | } 56 | 57 | @IBAction func done_clicked(_ sender: Any) { 58 | if let vc = self.presentingViewController as? ViewController { 59 | self.dismiss(animated: true, completion: { 60 | // vc.personView.reloadData() 61 | }) 62 | } 63 | } 64 | 65 | @IBAction func cameraLens_switch(_ sender: Any) { 66 | let defaults = UserDefaults.standard 67 | if(cameraLensSwitch.isOn) { 68 | defaults.set(1, forKey: "camera_lens") 69 | cameraLensLbl.text = "Front" 70 | } else { 71 | defaults.set(0, forKey: "camera_lens") 72 | cameraLensLbl.text = "Back" 73 | } 74 | } 75 | 76 | func threshold_clicked(mode: Int) { 77 | var title = "Liveness threshold" 78 | 79 | let alertController = UIAlertController(title: title, message: "Please input a number between 0 and 1.", preferredStyle: .alert) 80 | 81 | let minimum = Float(0) 82 | let maximum = Float(1) 83 | alertController.addTextField { (textField) in 84 | textField.keyboardType = .decimalPad 85 | 86 | let defaults = UserDefaults.standard 87 | 88 | if(mode == 0) { 89 | textField.text = String(defaults.float(forKey: "liveness_threshold")) 90 | } 91 | } 92 | 93 | let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil) 94 | 95 | let submitAction = UIAlertAction(title: "Ok", style: .default) { (action) in 96 | 97 | var hasError = false 98 | var errorStr = "" 99 | let defaults = UserDefaults.standard 100 | 101 | if let numberString = alertController.textFields?.first?.text, let number = Float(numberString) { 102 | if(number < Float(minimum) || number > Float(maximum)) { 103 | hasError = true 104 | errorStr = "Invalid value" 105 | } else { 106 | if(mode == 0) { 107 | self.livenessThresholdLbl.text = String(number) 108 | defaults.set(number, forKey: "liveness_threshold") 109 | } 110 | } 111 | } else { 112 | hasError = true 113 | errorStr = "Invalid value" 114 | } 115 | 116 | if(hasError) { 117 | let errorNotification = UIAlertController(title: "Error", message: errorStr, preferredStyle: .alert) 118 | let okAction = UIAlertAction(title: "OK", style: .default, handler: nil) 119 | errorNotification.addAction(okAction) 120 | self.present(errorNotification, animated: true, completion: nil) 121 | 122 | DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { 123 | errorNotification.dismiss(animated: true, completion: nil) 124 | } 125 | } 126 | } 127 | 128 | alertController.addAction(cancelAction) 129 | alertController.addAction(submitAction) 130 | 131 | present(alertController, animated: true, completion: nil) 132 | } 133 | 134 | @IBAction func livenessThreshold_clicked(_ sender: Any) { 135 | threshold_clicked(mode: 0) 136 | } 137 | 138 | 139 | @IBAction func restore_settings_clicked(_ sender: Any) { 140 | let defaults = UserDefaults.standard 141 | defaults.set(false, forKey: "default_changed") 142 | 143 | SettingsViewController.setDefaultSettings() 144 | showToast(message: "The default settings has been restored.") 145 | self.viewDidLoad() 146 | } 147 | } 148 | 149 | -------------------------------------------------------------------------------- /FaceLiveness/ToastView.swift: -------------------------------------------------------------------------------- 1 | 2 | import UIKit 3 | 4 | class ToastView: UIView { 5 | private let messageLabel: UILabel = UILabel() 6 | 7 | init(message: String) { 8 | super.init(frame: .zero) 9 | configureUI() 10 | setMessage(message) 11 | } 12 | 13 | required init?(coder aDecoder: NSCoder) { 14 | fatalError("init(coder:) has not been implemented") 15 | } 16 | 17 | private func configureUI() { 18 | backgroundColor = UIColor(named: "clr_toast_bg") 19 | layer.cornerRadius = 8 20 | clipsToBounds = true 21 | 22 | messageLabel.textColor = UIColor(named: "clr_text") 23 | messageLabel.font = UIFont.systemFont(ofSize: 16) 24 | messageLabel.numberOfLines = 0 25 | messageLabel.textAlignment = .center 26 | addSubview(messageLabel) 27 | messageLabel.translatesAutoresizingMaskIntoConstraints = false 28 | NSLayoutConstraint.activate([ 29 | messageLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 16), 30 | messageLabel.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -16), 31 | messageLabel.topAnchor.constraint(equalTo: topAnchor, constant: 16), 32 | messageLabel.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -16) 33 | ]) 34 | } 35 | 36 | private func setMessage(_ message: String) { 37 | messageLabel.text = message 38 | } 39 | } 40 | 41 | func showToast(message: String, duration: TimeInterval = 2.0) { 42 | let toastView = ToastView(message: message) 43 | if let window = UIApplication.shared.windows.first { 44 | window.addSubview(toastView) 45 | toastView.translatesAutoresizingMaskIntoConstraints = false 46 | NSLayoutConstraint.activate([ 47 | toastView.centerXAnchor.constraint(equalTo: window.centerXAnchor), 48 | toastView.bottomAnchor.constraint(equalTo: window.bottomAnchor, constant: -100), 49 | toastView.leadingAnchor.constraint(greaterThanOrEqualTo: window.leadingAnchor, constant: 16), 50 | toastView.trailingAnchor.constraint(lessThanOrEqualTo: window.trailingAnchor, constant: -16), 51 | toastView.widthAnchor.constraint(greaterThanOrEqualToConstant: 300) 52 | ]) 53 | 54 | UIView.animate(withDuration: 0.2, delay: duration, options: .curveEaseInOut) { 55 | toastView.alpha = 0 56 | } completion: { _ in 57 | toastView.removeFromSuperview() 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /FaceLiveness/UIImageExtension.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import UIKit 3 | 4 | 5 | public extension UIImage { 6 | 7 | func cropFace(faceBox: FaceBox) -> UIImage? { 8 | let centerX = Int((faceBox.x1 + faceBox.x2) / 2) 9 | let centerY = Int((faceBox.y1 + faceBox.y2) / 2) 10 | let cropWidth = Int(Float(faceBox.x2 - faceBox.x1) * Float(1.4)) 11 | 12 | let cropX1 = Int(Float(centerX) - Float(cropWidth / 2)) 13 | let cropX2 = Int(Float(centerY) - Float(cropWidth / 2)) 14 | let cropRect = CGRect(x: CGFloat(cropX1), y: CGFloat(cropX2), width: CGFloat(cropWidth), height: CGFloat(cropWidth)) 15 | 16 | guard let croppedImage = self.cgImage!.cropping(to: cropRect) else { return nil } 17 | 18 | let faceImage = UIImage(cgImage: croppedImage) 19 | 20 | let renderer = UIGraphicsImageRenderer(size: CGSize(width: 150, height: 150)) 21 | let newImage = renderer.image { (context) in 22 | faceImage.draw(in: CGRect(origin: .zero, size: CGSize(width: 150, height: 150))) 23 | } 24 | return newImage 25 | } 26 | 27 | func crop(rect: CGRect) -> UIImage? { 28 | 29 | guard let croppedImage = self.cgImage!.cropping(to: rect) else { return nil } 30 | 31 | let faceImage = UIImage(cgImage: croppedImage) 32 | return faceImage 33 | } 34 | 35 | /// Extension to fix orientation of an UIImage without EXIF 36 | func fixOrientation() -> UIImage { 37 | 38 | guard let cgImage = cgImage else { return self } 39 | 40 | if imageOrientation == .up { return self } 41 | 42 | var transform = CGAffineTransform.identity 43 | 44 | switch imageOrientation { 45 | 46 | case .down, .downMirrored: 47 | transform = transform.translatedBy(x: size.width, y: size.height) 48 | transform = transform.rotated(by: CGFloat(Double.pi)) 49 | 50 | case .left, .leftMirrored: 51 | transform = transform.translatedBy(x: size.width, y: 0) 52 | transform = transform.rotated(by: CGFloat(Double.pi/2)) 53 | 54 | case .right, .rightMirrored: 55 | transform = transform.translatedBy(x: 0, y : size.height) 56 | transform = transform.rotated(by: CGFloat(-Double.pi/2)) 57 | 58 | case .up, .upMirrored: 59 | break 60 | } 61 | 62 | switch imageOrientation { 63 | 64 | case .upMirrored, .downMirrored: 65 | transform.translatedBy(x: size.width, y: 0) 66 | transform.scaledBy(x: -1, y: 1) 67 | 68 | case .leftMirrored, .rightMirrored: 69 | transform.translatedBy(x: size.height, y: 0) 70 | transform.scaledBy(x: -1, y: 1) 71 | 72 | case .up, .down, .left, .right: 73 | break 74 | } 75 | 76 | if let ctx = CGContext(data: nil, width: Int(size.width), height: Int(size.height), bitsPerComponent: cgImage.bitsPerComponent, bytesPerRow: 0, space: cgImage.colorSpace!, bitmapInfo: CGImageAlphaInfo.premultipliedLast.rawValue) { 77 | 78 | ctx.concatenate(transform) 79 | 80 | switch imageOrientation { 81 | 82 | case .left, .leftMirrored, .right, .rightMirrored: 83 | ctx.draw(cgImage, in: CGRect(x: 0, y: 0, width: size.height, height: size.width)) 84 | 85 | default: 86 | ctx.draw(cgImage, in: CGRect(x: 0, y: 0, width: size.width, height: size.height)) 87 | } 88 | 89 | if let finalImage = ctx.makeImage() { 90 | return (UIImage(cgImage: finalImage)) 91 | } 92 | } 93 | 94 | // something failed -- return original 95 | return self 96 | } 97 | 98 | func rotate(radians: CGFloat) -> UIImage { 99 | let rotatedSize = CGRect(origin: .zero, size: size) 100 | .applying(CGAffineTransform(rotationAngle: radians)) 101 | .integral.size 102 | UIGraphicsBeginImageContext(rotatedSize) 103 | if let context = UIGraphicsGetCurrentContext() { 104 | context.translateBy(x: rotatedSize.width / 2, y: rotatedSize.height / 2) 105 | context.rotate(by: radians) 106 | draw(in: CGRect(x: -size.width / 2, y: -size.height / 2, width: size.width, height: size.height)) 107 | let rotatedImage = UIGraphicsGetImageFromCurrentImageContext() 108 | UIGraphicsEndImageContext() 109 | return rotatedImage ?? self 110 | } 111 | return self 112 | } 113 | 114 | // Extension to flip UIImage horizontally 115 | func flipHorizontally() -> UIImage { 116 | UIGraphicsBeginImageContextWithOptions(size, false, scale) 117 | let context = UIGraphicsGetCurrentContext()! 118 | context.translateBy(x: size.width, y: 0) 119 | context.scaleBy(x: -1.0, y: 1.0) 120 | draw(in: CGRect(origin: .zero, size: size)) 121 | let flippedImage = UIGraphicsGetImageFromCurrentImageContext()! 122 | UIGraphicsEndImageContext() 123 | return flippedImage 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /FaceLiveness/ViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import AVFoundation 3 | import CoreData 4 | 5 | class ViewController: UIViewController, UINavigationControllerDelegate{ 6 | 7 | static let CORE_DATA_NAME = "Model" 8 | static let ENTITIES_NAME = "Person" 9 | static let ATTRIBUTE_NAME = "name" 10 | static let ATTRIBUTE_FACE = "face" 11 | static let ATTRIBUTE_TEMPLATES = "templates" 12 | 13 | @IBOutlet weak var warningLbl: UILabel! 14 | 15 | @IBOutlet weak var identifyBtnView: UIView! 16 | @IBOutlet weak var settingsBtnView: UIView! 17 | @IBOutlet weak var aboutBtnView: UIView! 18 | 19 | @IBOutlet weak var personView: UITableView! 20 | 21 | var attributeImage: UIImage? = nil 22 | var attributeFace: FaceBox? = nil 23 | 24 | 25 | lazy var persistentContainer: NSPersistentContainer = { 26 | let container = NSPersistentContainer(name: ViewController.CORE_DATA_NAME) 27 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 28 | if let error = error as NSError? { 29 | fatalError("Unresolved error \(error), \(error.userInfo)") 30 | } 31 | }) 32 | return container 33 | }() 34 | 35 | override var preferredStatusBarStyle: UIStatusBarStyle { 36 | return .lightContent 37 | } 38 | 39 | 40 | override func viewDidLoad() { 41 | super.viewDidLoad() 42 | // Do any additional setup after loading the view. 43 | 44 | //com.faceplugin.faceliveness 45 | var ret = FaceSDK.setActivation("bgwr6PNJXgutWMmuXPIwObGCkqRZ+PfnyotgwQlKVH5UzmjVJ3fZ0gau9SAemgt4q2wsk0mkBh7A" + 46 | "NKI2zPuBqCPie8O6Ch11eNU/OY0r+4kXICaEeulzeq79ydnyprC/SlowMtNUsrVwTfGnfmA64ihf" + 47 | "E1IS3xjtsKxx3OZJ9wyEcF9VW6yrzmASWo/4d/5Y/9dbCbpGbScwcPt3XlMb0XLEv74TeqWathta" + 48 | "XayVLMrJKAR57QXkEmRgltswRfVeHVp/eUHxhh79LCAR8nUtTGXkRpo4Kq0k5o+TrnLTyJwkC4W6" + 49 | "l+hraUBMp6Jt1eEUGNxeYhnXtzWx307RuWbMYQ==") 50 | 51 | 52 | if(ret == SDK_SUCCESS.rawValue) { 53 | ret = FaceSDK.initSDK() 54 | } 55 | 56 | if(ret != SDK_SUCCESS.rawValue) { 57 | warningLbl.isHidden = false 58 | 59 | if(ret == SDK_LICENSE_KEY_ERROR.rawValue) { 60 | warningLbl.text = "Invalid license!" 61 | } else if(ret == SDK_LICENSE_APPID_ERROR.rawValue) { 62 | warningLbl.text = "Invalid license!" 63 | } else if(ret == SDK_LICENSE_EXPIRED.rawValue) { 64 | warningLbl.text = "License expired!" 65 | } else if(ret == SDK_NO_ACTIVATED.rawValue) { 66 | warningLbl.text = "No activated!" 67 | } else if(ret == SDK_INIT_ERROR.rawValue) { 68 | warningLbl.text = "Init error!" 69 | } 70 | } 71 | 72 | SettingsViewController.setDefaultSettings() 73 | 74 | } 75 | 76 | 77 | @IBAction func identify_touch_down(_ sender: Any) { 78 | UIView.animate(withDuration: 0.5) { 79 | self.identifyBtnView.backgroundColor = UIColor(named: "clr_main_button_bg2") // Change to desired color 80 | } 81 | } 82 | 83 | @IBAction func identify_touch_up(_ sender: Any) { 84 | UIView.animate(withDuration: 0.5) { 85 | self.identifyBtnView.backgroundColor = UIColor(named: "clr_main_button_bg1") // Change to desired color 86 | } 87 | } 88 | 89 | @IBAction func identify_clicked(_ sender: Any) { 90 | UIView.animate(withDuration: 0.5) { 91 | self.identifyBtnView.backgroundColor = UIColor(named: "AccentColor") // Change to desired color 92 | } 93 | 94 | performSegue(withIdentifier: "camera", sender: self) 95 | } 96 | 97 | 98 | @IBAction func settings_touch_down(_ sender: Any) { 99 | UIView.animate(withDuration: 0.5) { 100 | self.settingsBtnView.backgroundColor = UIColor(named: "clr_main_button_bg2") 101 | } 102 | } 103 | 104 | 105 | @IBAction func settings_touch_up(_ sender: Any) { 106 | UIView.animate(withDuration: 0.5) { 107 | self.settingsBtnView.backgroundColor = UIColor(named: "clr_main_button_bg1") 108 | } 109 | } 110 | 111 | @IBAction func settings_clicked(_ sender: Any) { 112 | UIView.animate(withDuration: 0.5) { 113 | self.settingsBtnView.backgroundColor = UIColor(named: "AccentColor") // Change to desired color 114 | } 115 | 116 | performSegue(withIdentifier: "settings", sender: self) 117 | } 118 | 119 | @IBAction func about_touch_down(_ sender: Any) { 120 | UIView.animate(withDuration: 0.5) { 121 | self.aboutBtnView.backgroundColor = UIColor(named: "clr_main_button_bg2") // Change to desired color 122 | } 123 | } 124 | 125 | 126 | @IBAction func about_touch_up(_ sender: Any) { 127 | UIView.animate(withDuration: 0.5) { 128 | self.aboutBtnView.backgroundColor = UIColor(named: "clr_main_button_bg1") // Change to desired color 129 | } 130 | } 131 | 132 | @IBAction func about_clicked(_ sender: Any) { 133 | UIView.animate(withDuration: 0.5) { 134 | self.aboutBtnView.backgroundColor = UIColor(named: "AccentColor") // Change to desired color 135 | } 136 | 137 | performSegue(withIdentifier: "about", sender: self) 138 | } 139 | 140 | @IBAction func brand_clicked(_ sender: Any) { 141 | let webURL = URL(string: "https://faceplugin.com") 142 | UIApplication.shared.open(webURL!, options: [:], completionHandler: nil) 143 | } 144 | 145 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 146 | 147 | } 148 | } 149 | 150 | -------------------------------------------------------------------------------- /FaceLivenessTests/FaceLivenessTests.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | import XCTest 4 | @testable import FaceLiveness 5 | 6 | final class FaceLivenessTests: XCTestCase { 7 | 8 | override func setUpWithError() throws { 9 | // Put setup code here. This method is called before the invocation of each test method in the class. 10 | } 11 | 12 | override func tearDownWithError() throws { 13 | // Put teardown code here. This method is called after the invocation of each test method in the class. 14 | } 15 | 16 | func testExample() throws { 17 | // This is an example of a functional test case. 18 | // Use XCTAssert and related functions to verify your tests produce the correct results. 19 | // Any test you write for XCTest can be annotated as throws and async. 20 | // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. 21 | // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. 22 | } 23 | 24 | func testPerformanceExample() throws { 25 | // This is an example of a performance test case. 26 | self.measure { 27 | // Put the code you want to measure the time of here. 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /FaceLivenessUITests/FaceLivenessUITests.swift: -------------------------------------------------------------------------------- 1 | 2 | import XCTest 3 | 4 | final class FaceLivenessUITests: XCTestCase { 5 | 6 | override func setUpWithError() throws { 7 | // Put setup code here. This method is called before the invocation of each test method in the class. 8 | 9 | // In UI tests it is usually best to stop immediately when a failure occurs. 10 | continueAfterFailure = false 11 | 12 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 13 | } 14 | 15 | override func tearDownWithError() throws { 16 | // Put teardown code here. This method is called after the invocation of each test method in the class. 17 | } 18 | 19 | func testExample() throws { 20 | // UI tests must launch the application that they test. 21 | let app = XCUIApplication() 22 | app.launch() 23 | 24 | // Use XCTAssert and related functions to verify your tests produce the correct results. 25 | } 26 | 27 | func testLaunchPerformance() throws { 28 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { 29 | // This measures how long it takes to launch your application. 30 | measure(metrics: [XCTApplicationLaunchMetric()]) { 31 | XCUIApplication().launch() 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /FaceLivenessUITests/FaceLivenessUITestsLaunchTests.swift: -------------------------------------------------------------------------------- 1 | 2 | import XCTest 3 | 4 | final class FaceLivenessUITestsLaunchTests: XCTestCase { 5 | 6 | override class var runsForEachTargetApplicationUIConfiguration: Bool { 7 | true 8 | } 9 | 10 | override func setUpWithError() throws { 11 | continueAfterFailure = false 12 | } 13 | 14 | func testLaunch() throws { 15 | let app = XCUIApplication() 16 | app.launch() 17 | 18 | // Insert steps here to perform after app launch but before taking a screenshot, 19 | // such as logging into a test account or navigating somewhere in the app 20 | 21 | let attachment = XCTAttachment(screenshot: app.screenshot()) 22 | attachment.name = "Launch Screen" 23 | attachment.lifetime = .keepAlways 24 | add(attachment) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | #### Hugging Face - [Here](https://huggingface.co/spaces/FacePlugin-Ltd/FaceRecognition-LivenessDetection-SDK) 6 | #### Documentation- [Here](https://doc.faceplugin.com) 7 | 8 | # Liveness Detection SDK iOS - Fully On-Premise - iBeta Level 2 Compliant 9 | Our **iBeta level 2 Compliant** `liveness detection iOS SDK` excels in identifying and thwarting threats including **printed photos, video replay, 3D masks, and deepfake attempts,** ensuring robust and reliable authentication. 10 |
This is on-premise `liveness detection SDK` which means everything is processed in your phone and **NO** data leaves the device 11 |

12 | 13 |
14 | Awesome Badge 15 | Star Badge 16 | issue 17 | pr 18 |
19 | 20 | ## Screenshots 21 |
22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | ## Install License 30 | The code below shows how to use the license: https://github.com/Faceplugin-ltd/FaceLivenessDetection-iOS/blob/5031e5f1b96433d4c3b2e8e4d717606afe563741/FaceRecognition/ViewController.swift#L48-L52 31 | 32 | Please [contact us](#contact) to get the license. 33 | 34 | ## List of our Products 35 | 36 | * **[Face Recognition with Liveness Detection-Android (Java, Kotlin)](https://github.com/Faceplugin-ltd/FaceRecognition-Android)** 37 | * **[Face Recognition with Liveness Detection-iOS (Objective C, Swift)](https://github.com/Faceplugin-ltd/FaceRecognition-iOS)** 38 | * **[Face Recognition with Liveness Detection-React Native](https://github.com/Faceplugin-ltd/FaceRecognition-React-Native)** 39 | * **[Face Recognition with Liveness Detection-Flutter](https://github.com/Faceplugin-ltd/FaceRecognition-Flutter)** 40 | * **[Face Recognition with Liveness Detection-Ionic Cordova](https://github.com/Faceplugin-ltd/FaceRecognition-Ionic-Cordova)** 41 | * **[Face Recognition with Liveness Detection-.Net MAUI](https://github.com/Faceplugin-ltd/FaceRecognition-.Net)** 42 | * **[Face Recognition with Liveness Detection-.Net WPF](https://github.com/Faceplugin-ltd/FaceRecognition-WPF-.Net)** 43 | * **[Face Recognition with Liveness Detection-Javascript](https://github.com/Faceplugin-ltd/FaceRecognition-LivenessDetection-Javascript)** 44 | * **[Face Recognition with LivenessDetection-React](https://github.com/Faceplugin-ltd/FaceRecognition-LivenessDetection-React)** 45 | * **[Face Recognition with LivenessDetection-Vue](https://github.com/Faceplugin-ltd/FaceRecognition-LivenessDetection-Vue)** 46 | * **[Face Liveness Detection-Android (Java, Kotlin)](https://github.com/Faceplugin-ltd/FaceLivenessDetection-Android)** 47 | * **[Face Liveness Detection-iOS (Objective C, Swift)](https://github.com/Faceplugin-ltd/FaceLivenessDetection-iOS)** 48 | * **[Face Liveness Detection-Linux](https://github.com/Faceplugin-ltd/FaceLivenessDetection-Linux)** 49 | * **[Face Liveness Detection-Docker](https://github.com/Faceplugin-ltd/FaceLivenessDetection-Docker)** 50 | * **[Open Source Face Recognition SDK](https://github.com/Faceplugin-ltd/Open-Source-Face-Recognition-SDK)** 51 | * **[Face Recognition SDK](https://github.com/Faceplugin-ltd/Face-Recognition-SDK)** 52 | * **[Liveness Detection SDK](https://github.com/Faceplugin-ltd/Face-Liveness-Detection-SDK)** 53 | * **[Palm Recognition SDK](https://github.com/Faceplugin-ltd/Palm-Recognition)** 54 | * **[ID Card Recognition](https://github.com/Faceplugin-ltd/ID-Card-Recognition)** 55 | * **[ID Document Liveness Detection](https://github.com/Faceplugin-ltd/ID-Document-Liveness-Detection)** 56 | 57 | ## Contact 58 |
59 | faceplugin.com  60 | faceplugin.com  61 | faceplugin.com 62 |
63 | 64 | -------------------------------------------------------------------------------- /facesdk.framework/Headers/facesdk.h: -------------------------------------------------------------------------------- 1 | // 2 | // facesdk.h 3 | // facesdk 4 | // 5 | // Created by user on 4/12/23. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for facesdk. 11 | FOUNDATION_EXPORT double facesdkVersionNumber; 12 | 13 | //! Project version string for facesdk. 14 | FOUNDATION_EXPORT const unsigned char facesdkVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | 19 | #include "facesdk_api.h" 20 | -------------------------------------------------------------------------------- /facesdk.framework/Headers/facesdk_api.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | enum SDK_ERROR 7 | { 8 | SDK_SUCCESS = 0, 9 | SDK_LICENSE_KEY_ERROR = -1, 10 | SDK_LICENSE_APPID_ERROR = -2, 11 | SDK_LICENSE_EXPIRED = -3, 12 | SDK_NO_ACTIVATED = -4, 13 | SDK_INIT_ERROR = -5, 14 | }; 15 | 16 | @interface FaceBox : NSObject 17 | 18 | @property (nonatomic) int x1; 19 | @property (nonatomic) int y1; 20 | @property (nonatomic) int x2; 21 | @property (nonatomic) int y2; 22 | @property (nonatomic) float liveness; 23 | @property (nonatomic) float yaw; 24 | @property (nonatomic) float roll; 25 | @property (nonatomic) float pitch; 26 | @property (nonatomic) int age; 27 | @property (nonatomic) int gender; 28 | @property (nonatomic) float left_eye; 29 | @property (nonatomic) float right_eye; 30 | @property (nonatomic) float face_occlusion; 31 | @property (nonatomic) float face_quality; 32 | @property (nonatomic) float face_luminance; 33 | @property (nonatomic) float face_mouth_opened; 34 | @property (atomic) NSData* landmark; 35 | @end 36 | 37 | @interface FaceDetectionParam: NSObject 38 | @property (nonatomic) bool check_liveness; 39 | @property (nonatomic) bool check_eye_closeness; 40 | @property (nonatomic) bool check_face_occlusion; 41 | @property (nonatomic) bool check_mouth_opened; 42 | @property (nonatomic) bool estimate_age_gender; 43 | @end 44 | 45 | 46 | @interface FaceSDK : NSObject 47 | 48 | +(int) setActivation: (NSString*) license; 49 | +(int) initSDK; 50 | +(NSMutableArray*) faceDetection: (UIImage*) image param: (FaceDetectionParam*) param; 51 | +(NSData*) templateExtraction: (UIImage*) image faceBox: (FaceBox*) faceBox; 52 | +(float) similarityCalculation: (NSData*) templates1 templates2: (NSData*) templates2; 53 | 54 | @end 55 | 56 | NS_ASSUME_NONNULL_END 57 | -------------------------------------------------------------------------------- /facesdk.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/facesdk.framework/Info.plist -------------------------------------------------------------------------------- /facesdk.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module facesdk { 2 | umbrella header "facesdk.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /facesdk.framework/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Headers/facesdk.h 8 | 9 | iXedJdnTNjJdkav0lex0htXPBa8= 10 | 11 | Headers/facesdk_api.h 12 | 13 | Ts2qiHASCpGTl7eniw4GomKTJGE= 14 | 15 | Info.plist 16 | 17 | +SvIfsGnFHBVJaHBQiElfACQ340= 18 | 19 | Modules/module.modulemap 20 | 21 | X8zglrv2quSgEMFeVf0TybJa6gA= 22 | 23 | ag.bin 24 | 25 | vgCA5hPDLtSxGWCo886AQF/abXo= 26 | 27 | detection.bin 28 | 29 | G52JYi47ACwak8HkEcpkm9zo1as= 30 | 31 | detection.param 32 | 33 | tHFm7ohczZG7KEtACVgRSjX3XIA= 34 | 35 | ec.bin 36 | 37 | BQzAFyQidHaCWg0Pr7UK3QmaVVI= 38 | 39 | ec.param.bin 40 | 41 | A3Fh49MUaCPrsIDYLKP9epwcFx4= 42 | 43 | landmark.bin 44 | 45 | YwuxUSePlqnFEDLD95H35rgexRI= 46 | 47 | landmark.param 48 | 49 | HHZGt8b9GPLjgGplhK/7hcOW0Mo= 50 | 51 | liveness.bin 52 | 53 | kh7Vc8Nd8tkZBc6izcjU9ljmxpw= 54 | 55 | mfn.bin 56 | 57 | 44c7zIxObpyYRRgGO9WjmAsw/s0= 58 | 59 | occ.bin 60 | 61 | 0A+2lZ1ELppBcl6rq/KQdCS8iyU= 62 | 63 | 64 | files2 65 | 66 | Headers/facesdk.h 67 | 68 | hash2 69 | 70 | CEHWZwXGt6HTp0cWeGAWrhBufzotOw42QLbWl2FjbpE= 71 | 72 | 73 | Headers/facesdk_api.h 74 | 75 | hash2 76 | 77 | wK2xu6IJ+KI8evbJ/6eqigcchjKuEhfvmHL2c+PjnJA= 78 | 79 | 80 | Modules/module.modulemap 81 | 82 | hash2 83 | 84 | MPLn3hXOxK25/iaEZAyvAIf2qaUvsHUOWkHsaZrg7LY= 85 | 86 | 87 | ag.bin 88 | 89 | hash2 90 | 91 | cVeq8UFUy/qXj1Sqiv745ZM+52Gg0WWrz3nNds8+35A= 92 | 93 | 94 | detection.bin 95 | 96 | hash2 97 | 98 | aSBPVzW2w5vueXMHRoelxdPFfzE45CIHzJJfvcmNVVc= 99 | 100 | 101 | detection.param 102 | 103 | hash2 104 | 105 | yb/QW3dSgGun1LdCqss+oipjB11F0sE0NtewKSJibFo= 106 | 107 | 108 | ec.bin 109 | 110 | hash2 111 | 112 | q65m/Fn/r61xbEyRmMchVjG8BBMPJU95ZBA0YwbJvbU= 113 | 114 | 115 | ec.param.bin 116 | 117 | hash2 118 | 119 | VGYoeS+Nt1c15g6vqFWdslY6TJ/ovNY0Q3elP255Ztg= 120 | 121 | 122 | landmark.bin 123 | 124 | hash2 125 | 126 | q59zkpnecoyeYz1houDmoVK0+ROe2x8l/0dtpqDC9Ic= 127 | 128 | 129 | landmark.param 130 | 131 | hash2 132 | 133 | nkGOHyOPviHWfG8E67n+geJfRcw+yc7qGU4famEpZNc= 134 | 135 | 136 | liveness.bin 137 | 138 | hash2 139 | 140 | bO4q3TRdWWN1VbSbH7h0FpcOc8yvqkseFW6GGAsSbEY= 141 | 142 | 143 | mfn.bin 144 | 145 | hash2 146 | 147 | NZcoiSgg4LgzyYzDPjuYJ+d2nbqCFMR2pg9ZrjwPtDE= 148 | 149 | 150 | occ.bin 151 | 152 | hash2 153 | 154 | uEETiCJKIQY5PymWTWt5fUq4+UuQZdAYYIMX7XzwfMg= 155 | 156 | 157 | 158 | rules 159 | 160 | ^.* 161 | 162 | ^.*\.lproj/ 163 | 164 | optional 165 | 166 | weight 167 | 1000 168 | 169 | ^.*\.lproj/locversion.plist$ 170 | 171 | omit 172 | 173 | weight 174 | 1100 175 | 176 | ^Base\.lproj/ 177 | 178 | weight 179 | 1010 180 | 181 | ^version.plist$ 182 | 183 | 184 | rules2 185 | 186 | .*\.dSYM($|/) 187 | 188 | weight 189 | 11 190 | 191 | ^(.*/)?\.DS_Store$ 192 | 193 | omit 194 | 195 | weight 196 | 2000 197 | 198 | ^.* 199 | 200 | ^.*\.lproj/ 201 | 202 | optional 203 | 204 | weight 205 | 1000 206 | 207 | ^.*\.lproj/locversion.plist$ 208 | 209 | omit 210 | 211 | weight 212 | 1100 213 | 214 | ^Base\.lproj/ 215 | 216 | weight 217 | 1010 218 | 219 | ^Info\.plist$ 220 | 221 | omit 222 | 223 | weight 224 | 20 225 | 226 | ^PkgInfo$ 227 | 228 | omit 229 | 230 | weight 231 | 20 232 | 233 | ^embedded\.provisionprofile$ 234 | 235 | weight 236 | 20 237 | 238 | ^version\.plist$ 239 | 240 | weight 241 | 20 242 | 243 | 244 | 245 | 246 | -------------------------------------------------------------------------------- /facesdk.framework/ag.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/facesdk.framework/ag.bin -------------------------------------------------------------------------------- /facesdk.framework/detection.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/facesdk.framework/detection.bin -------------------------------------------------------------------------------- /facesdk.framework/detection.param: -------------------------------------------------------------------------------- 1 | 7767517 2 | 234 255 3 | Input data 0 1 data 0=60 1=60 2=3 4 | Split splitncnn_0 1 4 data data_splitncnn_0 data_splitncnn_1 data_splitncnn_2 data_splitncnn_3 5 | Convolution conv1 1 1 data_splitncnn_3 conv_blob1 0=8 1=3 2=1 3=2 4=1 5=0 6=216 6 | BatchNorm batch_norm1 1 1 conv_blob1 batch_norm_blob1 0=8 7 | Scale bn_scale1 1 1 batch_norm_blob1 batch_norm_blob1_bn_scale1 0=8 1=1 8 | ReLU relu1 1 1 batch_norm_blob1_bn_scale1 relu_blob1 9 | ConvolutionDepthWise conv2 1 1 relu_blob1 conv_blob2 0=8 1=3 2=1 3=1 4=1 5=0 6=72 7=8 10 | BatchNorm batch_norm2 1 1 conv_blob2 batch_norm_blob2 0=8 11 | Scale bn_scale2 1 1 batch_norm_blob2 batch_norm_blob2_bn_scale2 0=8 1=1 12 | ReLU relu2 1 1 batch_norm_blob2_bn_scale2 relu_blob2 13 | Convolution conv3 1 1 relu_blob2 conv_blob3 0=16 1=1 2=1 3=1 4=0 5=0 6=128 14 | BatchNorm batch_norm3 1 1 conv_blob3 batch_norm_blob3 0=16 15 | Scale bn_scale3 1 1 batch_norm_blob3 batch_norm_blob3_bn_scale3 0=16 1=1 16 | ReLU relu3 1 1 batch_norm_blob3_bn_scale3 relu_blob3 17 | ConvolutionDepthWise conv4 1 1 relu_blob3 conv_blob4 0=16 1=3 2=1 3=2 4=1 5=0 6=144 7=16 18 | BatchNorm batch_norm4 1 1 conv_blob4 batch_norm_blob4 0=16 19 | Scale bn_scale4 1 1 batch_norm_blob4 batch_norm_blob4_bn_scale4 0=16 1=1 20 | ReLU relu4 1 1 batch_norm_blob4_bn_scale4 relu_blob4 21 | Convolution conv5 1 1 relu_blob4 conv_blob5 0=32 1=1 2=1 3=1 4=0 5=0 6=512 22 | BatchNorm batch_norm5 1 1 conv_blob5 batch_norm_blob5 0=32 23 | Scale bn_scale5 1 1 batch_norm_blob5 batch_norm_blob5_bn_scale5 0=32 1=1 24 | ReLU relu5 1 1 batch_norm_blob5_bn_scale5 relu_blob5 25 | ConvolutionDepthWise conv6 1 1 relu_blob5 conv_blob6 0=32 1=3 2=1 3=1 4=1 5=0 6=288 7=32 26 | BatchNorm batch_norm6 1 1 conv_blob6 batch_norm_blob6 0=32 27 | Scale bn_scale6 1 1 batch_norm_blob6 batch_norm_blob6_bn_scale6 0=32 1=1 28 | ReLU relu6 1 1 batch_norm_blob6_bn_scale6 relu_blob6 29 | Convolution conv7 1 1 relu_blob6 conv_blob7 0=32 1=1 2=1 3=1 4=0 5=0 6=1024 30 | BatchNorm batch_norm7 1 1 conv_blob7 batch_norm_blob7 0=32 31 | Scale bn_scale7 1 1 batch_norm_blob7 batch_norm_blob7_bn_scale7 0=32 1=1 32 | ReLU relu7 1 1 batch_norm_blob7_bn_scale7 relu_blob7 33 | ConvolutionDepthWise conv8 1 1 relu_blob7 conv_blob8 0=32 1=3 2=1 3=2 4=1 5=0 6=288 7=32 34 | BatchNorm batch_norm8 1 1 conv_blob8 batch_norm_blob8 0=32 35 | Scale bn_scale8 1 1 batch_norm_blob8 batch_norm_blob8_bn_scale8 0=32 1=1 36 | ReLU relu8 1 1 batch_norm_blob8_bn_scale8 relu_blob8 37 | Convolution conv9 1 1 relu_blob8 conv_blob9 0=64 1=1 2=1 3=1 4=0 5=0 6=2048 38 | BatchNorm batch_norm9 1 1 conv_blob9 batch_norm_blob9 0=64 39 | Scale bn_scale9 1 1 batch_norm_blob9 batch_norm_blob9_bn_scale9 0=64 1=1 40 | ReLU relu9 1 1 batch_norm_blob9_bn_scale9 relu_blob9 41 | ConvolutionDepthWise conv10 1 1 relu_blob9 conv_blob10 0=64 1=3 2=1 3=1 4=1 5=0 6=576 7=64 42 | BatchNorm batch_norm10 1 1 conv_blob10 batch_norm_blob10 0=64 43 | Scale bn_scale10 1 1 batch_norm_blob10 batch_norm_blob10_bn_scale10 0=64 1=1 44 | ReLU relu10 1 1 batch_norm_blob10_bn_scale10 relu_blob10 45 | Convolution conv11 1 1 relu_blob10 conv_blob11 0=64 1=1 2=1 3=1 4=0 5=0 6=4096 46 | BatchNorm batch_norm11 1 1 conv_blob11 batch_norm_blob11 0=64 47 | Scale bn_scale11 1 1 batch_norm_blob11 batch_norm_blob11_bn_scale11 0=64 1=1 48 | ReLU relu11 1 1 batch_norm_blob11_bn_scale11 relu_blob11 49 | Split splitncnn_1 1 2 relu_blob11 relu_blob11_splitncnn_0 relu_blob11_splitncnn_1 50 | ConvolutionDepthWise conv12 1 1 relu_blob11_splitncnn_1 conv_blob12 0=64 1=3 2=1 3=2 4=1 5=0 6=576 7=64 51 | BatchNorm batch_norm12 1 1 conv_blob12 batch_norm_blob12 0=64 52 | Scale bn_scale12 1 1 batch_norm_blob12 batch_norm_blob12_bn_scale12 0=64 1=1 53 | ReLU relu12 1 1 batch_norm_blob12_bn_scale12 relu_blob12 54 | Convolution conv13 1 1 relu_blob12 conv_blob13 0=128 1=1 2=1 3=1 4=0 5=0 6=8192 55 | BatchNorm batch_norm13 1 1 conv_blob13 batch_norm_blob13 0=128 56 | Scale bn_scale13 1 1 batch_norm_blob13 batch_norm_blob13_bn_scale13 0=128 1=1 57 | ReLU relu13 1 1 batch_norm_blob13_bn_scale13 relu_blob13 58 | ConvolutionDepthWise conv14 1 1 relu_blob13 conv_blob14 0=128 1=3 2=1 3=1 4=1 5=0 6=1152 7=128 59 | BatchNorm batch_norm14 1 1 conv_blob14 batch_norm_blob14 0=128 60 | Scale bn_scale14 1 1 batch_norm_blob14 batch_norm_blob14_bn_scale14 0=128 1=1 61 | ReLU relu14 1 1 batch_norm_blob14_bn_scale14 relu_blob14 62 | Convolution conv15 1 1 relu_blob14 conv_blob15 0=128 1=1 2=1 3=1 4=0 5=0 6=16384 63 | BatchNorm batch_norm15 1 1 conv_blob15 batch_norm_blob15 0=128 64 | Scale bn_scale15 1 1 batch_norm_blob15 batch_norm_blob15_bn_scale15 0=128 1=1 65 | ReLU relu15 1 1 batch_norm_blob15_bn_scale15 relu_blob15 66 | ConvolutionDepthWise conv16 1 1 relu_blob15 conv_blob16 0=128 1=3 2=1 3=1 4=1 5=0 6=1152 7=128 67 | BatchNorm batch_norm16 1 1 conv_blob16 batch_norm_blob16 0=128 68 | Scale bn_scale16 1 1 batch_norm_blob16 batch_norm_blob16_bn_scale16 0=128 1=1 69 | ReLU relu16 1 1 batch_norm_blob16_bn_scale16 relu_blob16 70 | Convolution conv17 1 1 relu_blob16 conv_blob17 0=128 1=1 2=1 3=1 4=0 5=0 6=16384 71 | BatchNorm batch_norm17 1 1 conv_blob17 batch_norm_blob17 0=128 72 | Scale bn_scale17 1 1 batch_norm_blob17 batch_norm_blob17_bn_scale17 0=128 1=1 73 | ReLU relu17 1 1 batch_norm_blob17_bn_scale17 relu_blob17 74 | ConvolutionDepthWise conv18 1 1 relu_blob17 conv_blob18 0=128 1=3 2=1 3=1 4=1 5=0 6=1152 7=128 75 | BatchNorm batch_norm18 1 1 conv_blob18 batch_norm_blob18 0=128 76 | Scale bn_scale18 1 1 batch_norm_blob18 batch_norm_blob18_bn_scale18 0=128 1=1 77 | ReLU relu18 1 1 batch_norm_blob18_bn_scale18 relu_blob18 78 | Convolution conv19 1 1 relu_blob18 conv_blob19 0=128 1=1 2=1 3=1 4=0 5=0 6=16384 79 | BatchNorm batch_norm19 1 1 conv_blob19 batch_norm_blob19 0=128 80 | Scale bn_scale19 1 1 batch_norm_blob19 batch_norm_blob19_bn_scale19 0=128 1=1 81 | ReLU relu19 1 1 batch_norm_blob19_bn_scale19 relu_blob19 82 | ConvolutionDepthWise conv20 1 1 relu_blob19 conv_blob20 0=128 1=3 2=1 3=1 4=1 5=0 6=1152 7=128 83 | BatchNorm batch_norm20 1 1 conv_blob20 batch_norm_blob20 0=128 84 | Scale bn_scale20 1 1 batch_norm_blob20 batch_norm_blob20_bn_scale20 0=128 1=1 85 | ReLU relu20 1 1 batch_norm_blob20_bn_scale20 relu_blob20 86 | Convolution conv21 1 1 relu_blob20 conv_blob21 0=128 1=1 2=1 3=1 4=0 5=0 6=16384 87 | BatchNorm batch_norm21 1 1 conv_blob21 batch_norm_blob21 0=128 88 | Scale bn_scale21 1 1 batch_norm_blob21 batch_norm_blob21_bn_scale21 0=128 1=1 89 | ReLU relu21 1 1 batch_norm_blob21_bn_scale21 relu_blob21 90 | ConvolutionDepthWise conv22 1 1 relu_blob21 conv_blob22 0=128 1=3 2=1 3=1 4=1 5=0 6=1152 7=128 91 | BatchNorm batch_norm22 1 1 conv_blob22 batch_norm_blob22 0=128 92 | Scale bn_scale22 1 1 batch_norm_blob22 batch_norm_blob22_bn_scale22 0=128 1=1 93 | ReLU relu22 1 1 batch_norm_blob22_bn_scale22 relu_blob22 94 | Convolution conv23 1 1 relu_blob22 conv_blob23 0=128 1=1 2=1 3=1 4=0 5=0 6=16384 95 | BatchNorm batch_norm23 1 1 conv_blob23 batch_norm_blob23 0=128 96 | Scale bn_scale23 1 1 batch_norm_blob23 batch_norm_blob23_bn_scale23 0=128 1=1 97 | ReLU relu23 1 1 batch_norm_blob23_bn_scale23 relu_blob23 98 | Split splitncnn_2 1 2 relu_blob23 relu_blob23_splitncnn_0 relu_blob23_splitncnn_1 99 | ConvolutionDepthWise conv24 1 1 relu_blob23_splitncnn_1 conv_blob24 0=128 1=3 2=1 3=2 4=1 5=0 6=1152 7=128 100 | BatchNorm batch_norm24 1 1 conv_blob24 batch_norm_blob24 0=128 101 | Scale bn_scale24 1 1 batch_norm_blob24 batch_norm_blob24_bn_scale24 0=128 1=1 102 | ReLU relu24 1 1 batch_norm_blob24_bn_scale24 relu_blob24 103 | Convolution conv25 1 1 relu_blob24 conv_blob25 0=256 1=1 2=1 3=1 4=0 5=0 6=32768 104 | BatchNorm batch_norm25 1 1 conv_blob25 batch_norm_blob25 0=256 105 | Scale bn_scale25 1 1 batch_norm_blob25 batch_norm_blob25_bn_scale25 0=256 1=1 106 | ReLU relu25 1 1 batch_norm_blob25_bn_scale25 relu_blob25 107 | ConvolutionDepthWise conv26 1 1 relu_blob25 conv_blob26 0=256 1=3 2=1 3=1 4=1 5=0 6=2304 7=256 108 | BatchNorm batch_norm26 1 1 conv_blob26 batch_norm_blob26 0=256 109 | Scale bn_scale26 1 1 batch_norm_blob26 batch_norm_blob26_bn_scale26 0=256 1=1 110 | ReLU relu26 1 1 batch_norm_blob26_bn_scale26 relu_blob26 111 | Convolution conv27 1 1 relu_blob26 conv_blob27 0=256 1=1 2=1 3=1 4=0 5=0 6=65536 112 | BatchNorm batch_norm27 1 1 conv_blob27 batch_norm_blob27 0=256 113 | Scale bn_scale27 1 1 batch_norm_blob27 batch_norm_blob27_bn_scale27 0=256 1=1 114 | ReLU relu27 1 1 batch_norm_blob27_bn_scale27 relu_blob27 115 | Convolution conv28 1 1 relu_blob11_splitncnn_0 conv_blob28 0=64 1=1 2=1 3=1 4=0 5=0 6=4096 116 | BatchNorm batch_norm28 1 1 conv_blob28 batch_norm_blob28 0=64 117 | Scale bn_scale28 1 1 batch_norm_blob28 batch_norm_blob28_bn_scale28 0=64 1=1 118 | ReLU relu28 1 1 batch_norm_blob28_bn_scale28 relu_blob28 119 | Split splitncnn_3 1 2 relu_blob28 relu_blob28_splitncnn_0 relu_blob28_splitncnn_1 120 | Convolution conv29 1 1 relu_blob23_splitncnn_0 conv_blob29 0=64 1=1 2=1 3=1 4=0 5=0 6=8192 121 | BatchNorm batch_norm29 1 1 conv_blob29 batch_norm_blob29 0=64 122 | Scale bn_scale29 1 1 batch_norm_blob29 batch_norm_blob29_bn_scale29 0=64 1=1 123 | ReLU relu29 1 1 batch_norm_blob29_bn_scale29 relu_blob29 124 | Split splitncnn_4 1 2 relu_blob29 relu_blob29_splitncnn_0 relu_blob29_splitncnn_1 125 | Convolution conv30 1 1 relu_blob27 conv_blob30 0=64 1=1 2=1 3=1 4=0 5=0 6=16384 126 | BatchNorm batch_norm30 1 1 conv_blob30 batch_norm_blob30 0=64 127 | Scale bn_scale30 1 1 batch_norm_blob30 batch_norm_blob30_bn_scale30 0=64 1=1 128 | ReLU relu30 1 1 batch_norm_blob30_bn_scale30 relu_blob30 129 | Split splitncnn_5 1 3 relu_blob30 relu_blob30_splitncnn_0 relu_blob30_splitncnn_1 relu_blob30_splitncnn_2 130 | Deconvolution conv_transpose1 1 1 relu_blob30_splitncnn_2 conv_transpose_blob1 0=64 1=2 2=1 3=2 4=0 5=1 6=16384 131 | Crop crop1 2 1 conv_transpose_blob1 relu_blob29_splitncnn_1 crop1 132 | Eltwise add1 2 1 relu_blob29_splitncnn_0 crop1 add_blob1 0=1 -23301=0 133 | Convolution conv31 1 1 add_blob1 conv_blob31 0=64 1=3 2=1 3=1 4=1 5=0 6=36864 134 | BatchNorm batch_norm31 1 1 conv_blob31 batch_norm_blob31 0=64 135 | Scale bn_scale31 1 1 batch_norm_blob31 batch_norm_blob31_bn_scale31 0=64 1=1 136 | ReLU relu31 1 1 batch_norm_blob31_bn_scale31 relu_blob31 137 | Split splitncnn_6 1 3 relu_blob31 relu_blob31_splitncnn_0 relu_blob31_splitncnn_1 relu_blob31_splitncnn_2 138 | Deconvolution conv_transpose2 1 1 relu_blob31_splitncnn_2 conv_transpose_blob2 0=64 1=2 2=1 3=2 4=0 5=1 6=16384 139 | Crop crop2 2 1 conv_transpose_blob2 relu_blob28_splitncnn_1 crop2 140 | Eltwise add2 2 1 relu_blob28_splitncnn_0 crop2 add_blob2 0=1 -23301=0 141 | Convolution conv32 1 1 add_blob2 conv_blob32 0=64 1=3 2=1 3=1 4=1 5=0 6=36864 142 | BatchNorm batch_norm32 1 1 conv_blob32 batch_norm_blob32 0=64 143 | Scale bn_scale32 1 1 batch_norm_blob32 batch_norm_blob32_bn_scale32 0=64 1=1 144 | ReLU relu32 1 1 batch_norm_blob32_bn_scale32 relu_blob32 145 | Split splitncnn_7 1 2 relu_blob32 relu_blob32_splitncnn_0 relu_blob32_splitncnn_1 146 | Convolution conv33 1 1 relu_blob32_splitncnn_1 conv_blob33 0=32 1=3 2=1 3=1 4=1 5=0 6=18432 147 | BatchNorm batch_norm33 1 1 conv_blob33 batch_norm_blob33 0=32 148 | Scale bn_scale33 1 1 batch_norm_blob33 batch_norm_blob33_bn_scale33 0=32 1=1 149 | Convolution conv34 1 1 relu_blob32_splitncnn_0 conv_blob34 0=16 1=3 2=1 3=1 4=1 5=0 6=9216 150 | BatchNorm batch_norm34 1 1 conv_blob34 batch_norm_blob34 0=16 151 | Scale bn_scale34 1 1 batch_norm_blob34 batch_norm_blob34_bn_scale34 0=16 1=1 152 | ReLU relu33 1 1 batch_norm_blob34_bn_scale34 relu_blob33 153 | Split splitncnn_8 1 2 relu_blob33 relu_blob33_splitncnn_0 relu_blob33_splitncnn_1 154 | Convolution conv35 1 1 relu_blob33_splitncnn_1 conv_blob35 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 155 | BatchNorm batch_norm35 1 1 conv_blob35 batch_norm_blob35 0=16 156 | Scale bn_scale35 1 1 batch_norm_blob35 batch_norm_blob35_bn_scale35 0=16 1=1 157 | Convolution conv36 1 1 relu_blob33_splitncnn_0 conv_blob36 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 158 | BatchNorm batch_norm36 1 1 conv_blob36 batch_norm_blob36 0=16 159 | Scale bn_scale36 1 1 batch_norm_blob36 batch_norm_blob36_bn_scale36 0=16 1=1 160 | ReLU relu34 1 1 batch_norm_blob36_bn_scale36 relu_blob34 161 | Convolution conv37 1 1 relu_blob34 conv_blob37 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 162 | BatchNorm batch_norm37 1 1 conv_blob37 batch_norm_blob37 0=16 163 | Scale bn_scale37 1 1 batch_norm_blob37 batch_norm_blob37_bn_scale37 0=16 1=1 164 | Concat cat1 3 1 batch_norm_blob33_bn_scale33 batch_norm_blob35_bn_scale35 batch_norm_blob37_bn_scale37 cat_blob1 0=0 165 | ReLU relu35 1 1 cat_blob1 relu_blob35 166 | Split splitncnn_9 1 3 relu_blob35 relu_blob35_splitncnn_0 relu_blob35_splitncnn_1 relu_blob35_splitncnn_2 167 | Convolution conv38 1 1 relu_blob31_splitncnn_1 conv_blob38 0=32 1=3 2=1 3=1 4=1 5=0 6=18432 168 | BatchNorm batch_norm38 1 1 conv_blob38 batch_norm_blob38 0=32 169 | Scale bn_scale38 1 1 batch_norm_blob38 batch_norm_blob38_bn_scale38 0=32 1=1 170 | Convolution conv39 1 1 relu_blob31_splitncnn_0 conv_blob39 0=16 1=3 2=1 3=1 4=1 5=0 6=9216 171 | BatchNorm batch_norm39 1 1 conv_blob39 batch_norm_blob39 0=16 172 | Scale bn_scale39 1 1 batch_norm_blob39 batch_norm_blob39_bn_scale39 0=16 1=1 173 | ReLU relu36 1 1 batch_norm_blob39_bn_scale39 relu_blob36 174 | Split splitncnn_10 1 2 relu_blob36 relu_blob36_splitncnn_0 relu_blob36_splitncnn_1 175 | Convolution conv40 1 1 relu_blob36_splitncnn_1 conv_blob40 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 176 | BatchNorm batch_norm40 1 1 conv_blob40 batch_norm_blob40 0=16 177 | Scale bn_scale40 1 1 batch_norm_blob40 batch_norm_blob40_bn_scale40 0=16 1=1 178 | Convolution conv41 1 1 relu_blob36_splitncnn_0 conv_blob41 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 179 | BatchNorm batch_norm41 1 1 conv_blob41 batch_norm_blob41 0=16 180 | Scale bn_scale41 1 1 batch_norm_blob41 batch_norm_blob41_bn_scale41 0=16 1=1 181 | ReLU relu37 1 1 batch_norm_blob41_bn_scale41 relu_blob37 182 | Convolution conv42 1 1 relu_blob37 conv_blob42 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 183 | BatchNorm batch_norm42 1 1 conv_blob42 batch_norm_blob42 0=16 184 | Scale bn_scale42 1 1 batch_norm_blob42 batch_norm_blob42_bn_scale42 0=16 1=1 185 | Concat cat2 3 1 batch_norm_blob38_bn_scale38 batch_norm_blob40_bn_scale40 batch_norm_blob42_bn_scale42 cat_blob2 0=0 186 | ReLU relu38 1 1 cat_blob2 relu_blob38 187 | Split splitncnn_11 1 3 relu_blob38 relu_blob38_splitncnn_0 relu_blob38_splitncnn_1 relu_blob38_splitncnn_2 188 | Convolution conv43 1 1 relu_blob30_splitncnn_1 conv_blob43 0=32 1=3 2=1 3=1 4=1 5=0 6=18432 189 | BatchNorm batch_norm43 1 1 conv_blob43 batch_norm_blob43 0=32 190 | Scale bn_scale43 1 1 batch_norm_blob43 batch_norm_blob43_bn_scale43 0=32 1=1 191 | Convolution conv44 1 1 relu_blob30_splitncnn_0 conv_blob44 0=16 1=3 2=1 3=1 4=1 5=0 6=9216 192 | BatchNorm batch_norm44 1 1 conv_blob44 batch_norm_blob44 0=16 193 | Scale bn_scale44 1 1 batch_norm_blob44 batch_norm_blob44_bn_scale44 0=16 1=1 194 | ReLU relu39 1 1 batch_norm_blob44_bn_scale44 relu_blob39 195 | Split splitncnn_12 1 2 relu_blob39 relu_blob39_splitncnn_0 relu_blob39_splitncnn_1 196 | Convolution conv45 1 1 relu_blob39_splitncnn_1 conv_blob45 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 197 | BatchNorm batch_norm45 1 1 conv_blob45 batch_norm_blob45 0=16 198 | Scale bn_scale45 1 1 batch_norm_blob45 batch_norm_blob45_bn_scale45 0=16 1=1 199 | Convolution conv46 1 1 relu_blob39_splitncnn_0 conv_blob46 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 200 | BatchNorm batch_norm46 1 1 conv_blob46 batch_norm_blob46 0=16 201 | Scale bn_scale46 1 1 batch_norm_blob46 batch_norm_blob46_bn_scale46 0=16 1=1 202 | ReLU relu40 1 1 batch_norm_blob46_bn_scale46 relu_blob40 203 | Convolution conv47 1 1 relu_blob40 conv_blob47 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 204 | BatchNorm batch_norm47 1 1 conv_blob47 batch_norm_blob47 0=16 205 | Scale bn_scale47 1 1 batch_norm_blob47 batch_norm_blob47_bn_scale47 0=16 1=1 206 | Concat cat3 3 1 batch_norm_blob43_bn_scale43 batch_norm_blob45_bn_scale45 batch_norm_blob47_bn_scale47 cat_blob3 0=0 207 | ReLU relu41 1 1 cat_blob3 relu_blob41 208 | Split splitncnn_13 1 3 relu_blob41 relu_blob41_splitncnn_0 relu_blob41_splitncnn_1 relu_blob41_splitncnn_2 209 | Convolution conv48 1 1 relu_blob35_splitncnn_2 conv_blob48 0=8 1=1 2=1 3=1 4=0 5=1 6=512 210 | Convolution conv49 1 1 relu_blob35_splitncnn_1 conv_blob49 0=4 1=1 2=1 3=1 4=0 5=1 6=256 211 | Convolution conv50 1 1 relu_blob38_splitncnn_2 conv_blob50 0=8 1=1 2=1 3=1 4=0 5=1 6=512 212 | Convolution conv51 1 1 relu_blob38_splitncnn_1 conv_blob51 0=4 1=1 2=1 3=1 4=0 5=1 6=256 213 | Convolution conv52 1 1 relu_blob41_splitncnn_2 conv_blob52 0=8 1=1 2=1 3=1 4=0 5=1 6=512 214 | Convolution conv53 1 1 relu_blob41_splitncnn_1 conv_blob53 0=4 1=1 2=1 3=1 4=0 5=1 6=256 215 | Permute conv4_3_norm_mbox_loc_perm 1 1 conv_blob48 conv4_3_norm_mbox_loc_perm 0=3 216 | Flatten conv4_3_norm_mbox_loc_flat 1 1 conv4_3_norm_mbox_loc_perm conv4_3_norm_mbox_loc_flat 217 | Permute conv4_3_norm_mbox_conf_perm 1 1 conv_blob49 conv4_3_norm_mbox_conf_perm 0=3 218 | Flatten conv4_3_norm_mbox_conf_flat 1 1 conv4_3_norm_mbox_conf_perm conv4_3_norm_mbox_conf_flat 219 | PriorBox conv4_3_norm_mbox_priorbox 2 1 relu_blob35_splitncnn_0 data_splitncnn_2 conv4_3_norm_mbox_priorbox -23300=2,1.600000e+01,3.200000e+01 -23301=0 -23302=0 3=1.000000e-01 4=1.000000e-01 5=2.000000e-01 6=2.000000e-01 7=1 8=0 9=-233 10=-233 11=8.000000e+00 12=8.000000e+00 13=5.000000e-01 220 | Permute conv5_3_norm_mbox_loc_perm 1 1 conv_blob50 conv5_3_norm_mbox_loc_perm 0=3 221 | Flatten conv5_3_norm_mbox_loc_flat 1 1 conv5_3_norm_mbox_loc_perm conv5_3_norm_mbox_loc_flat 222 | Permute conv5_3_norm_mbox_conf_perm 1 1 conv_blob51 conv5_3_norm_mbox_conf_perm 0=3 223 | Flatten conv5_3_norm_mbox_conf_flat 1 1 conv5_3_norm_mbox_conf_perm conv5_3_norm_mbox_conf_flat 224 | PriorBox conv5_3_norm_mbox_priorbox 2 1 relu_blob38_splitncnn_0 data_splitncnn_1 conv5_3_norm_mbox_priorbox -23300=2,6.400000e+01,1.280000e+02 -23301=0 -23302=0 3=1.000000e-01 4=1.000000e-01 5=2.000000e-01 6=2.000000e-01 7=1 8=0 9=-233 10=-233 11=1.600000e+01 12=1.600000e+01 13=5.000000e-01 225 | Permute conv6_3_norm_mbox_loc_perm 1 1 conv_blob52 conv6_3_norm_mbox_loc_perm 0=3 226 | Flatten conv6_3_norm_mbox_loc_flat 1 1 conv6_3_norm_mbox_loc_perm conv6_3_norm_mbox_loc_flat 227 | Permute conv6_3_norm_mbox_conf_perm 1 1 conv_blob53 conv6_3_norm_mbox_conf_perm 0=3 228 | Flatten conv6_3_norm_mbox_conf_flat 1 1 conv6_3_norm_mbox_conf_perm conv6_3_norm_mbox_conf_flat 229 | PriorBox conv6_3_norm_mbox_priorbox 2 1 relu_blob41_splitncnn_0 data_splitncnn_0 conv6_3_norm_mbox_priorbox -23300=2,2.560000e+02,5.120000e+02 -23301=0 -23302=0 3=1.000000e-01 4=1.000000e-01 5=2.000000e-01 6=2.000000e-01 7=1 8=0 9=-233 10=-233 11=3.200000e+01 12=3.200000e+01 13=5.000000e-01 230 | Concat mbox_loc 3 1 conv4_3_norm_mbox_loc_flat conv5_3_norm_mbox_loc_flat conv6_3_norm_mbox_loc_flat mbox_loc 0=0 231 | Concat mbox_conf 3 1 conv4_3_norm_mbox_conf_flat conv5_3_norm_mbox_conf_flat conv6_3_norm_mbox_conf_flat mbox_conf 0=0 232 | Concat mbox_priorbox 3 1 conv4_3_norm_mbox_priorbox conv5_3_norm_mbox_priorbox conv6_3_norm_mbox_priorbox mbox_priorbox 0=1 233 | Reshape mbox_conf_reshape 1 1 mbox_conf mbox_conf_reshape 0=2 1=-1 2=-233 3=0 234 | Softmax mbox_conf_softmax 1 1 mbox_conf_reshape mbox_conf_softmax 0=1 1=1 235 | Flatten mbox_conf_flatten 1 1 mbox_conf_softmax mbox_conf_flatten 236 | DetectionOutput detection_out 3 1 mbox_loc mbox_conf_flatten mbox_priorbox detection_out 0=2 1=3.000000e-01 2=400 3=200 4=1.000000e-01 237 | -------------------------------------------------------------------------------- /facesdk.framework/ec.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/facesdk.framework/ec.bin -------------------------------------------------------------------------------- /facesdk.framework/ec.param.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/facesdk.framework/ec.param.bin -------------------------------------------------------------------------------- /facesdk.framework/facesdk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/facesdk.framework/facesdk -------------------------------------------------------------------------------- /facesdk.framework/landmark.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/facesdk.framework/landmark.bin -------------------------------------------------------------------------------- /facesdk.framework/landmark.param: -------------------------------------------------------------------------------- 1 | 7767517 2 | 15 15 3 | Input input 0 1 data 0=60 1=60 2=1 4 | Convolution Conv1 1 1 data Conv1 0=20 1=5 2=1 3=1 4=2 5=1 6=500 5 | ReLU ActivationReLU1 1 1 Conv1 ActivationReLU1 6 | Pooling Pool1 1 1 ActivationReLU1 Pool1 0=0 1=2 2=2 3=0 4=0 7 | Convolution Conv2 1 1 Pool1 Conv2 0=48 1=5 2=1 3=1 4=2 5=1 6=24000 8 | ReLU ActivationReLU2 1 1 Conv2 ActivationReLU2 9 | Pooling Pool2 1 1 ActivationReLU2 Pool2 0=0 1=2 2=2 3=0 4=0 10 | Convolution Conv3 1 1 Pool2 Conv3 0=64 1=3 2=1 3=1 4=0 5=1 6=27648 11 | ReLU ActivationReLU3 1 1 Conv3 ActivationReLU3 12 | Pooling Pool3 1 1 ActivationReLU3 Pool3 0=0 1=3 2=2 3=0 4=0 13 | Convolution Conv4 1 1 Pool3 Conv4 0=80 1=3 2=1 3=1 4=0 5=1 6=46080 14 | ReLU ActivationReLU4 1 1 Conv4 ActivationReLU4 15 | InnerProduct Dense1 1 1 ActivationReLU4 Dense1 0=512 1=1 2=655360 16 | ReLU ActivationReLU5 1 1 Dense1 ActivationReLU5 17 | InnerProduct Dense3 1 1 ActivationReLU5 Dense3 0=136 1=1 2=69632 18 | -------------------------------------------------------------------------------- /facesdk.framework/liveness.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/facesdk.framework/liveness.bin -------------------------------------------------------------------------------- /facesdk.framework/mfn.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/facesdk.framework/mfn.bin -------------------------------------------------------------------------------- /facesdk.framework/occ.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Faceplugin-ltd/FaceLivenessDetection-iOS/96651e84888ea68758c0ed9f0057d9355709ae75/facesdk.framework/occ.bin --------------------------------------------------------------------------------