diff --git a/FaceRecognition-Bridging-Header.h b/FaceRecognition-Bridging-Header.h new file mode 100644 index 0000000..b23e14c --- /dev/null +++ b/FaceRecognition-Bridging-Header.h @@ -0,0 +1,4 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// +#import "facesdk/facesdk.h" diff --git a/FaceRecognition.xcodeproj/project.pbxproj b/FaceRecognition.xcodeproj/project.pbxproj new file mode 100644 index 0000000..4e4fd8d --- /dev/null +++ b/FaceRecognition.xcodeproj/project.pbxproj @@ -0,0 +1,712 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + CE08D25A29ED8D4F0071F025 /* ToastView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE08D25929ED8D4F0071F025 /* ToastView.swift */; }; + CE29C50529ECD0A5008EDB5A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C50429ECD0A5008EDB5A /* AppDelegate.swift */; }; + CE29C50729ECD0A5008EDB5A /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C50629ECD0A5008EDB5A /* SceneDelegate.swift */; }; + CE29C50929ECD0A5008EDB5A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C50829ECD0A5008EDB5A /* ViewController.swift */; }; + CE29C50C29ECD0A5008EDB5A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE29C50A29ECD0A5008EDB5A /* Main.storyboard */; }; + CE29C50F29ECD0A5008EDB5A /* FaceRecognition.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = CE29C50D29ECD0A5008EDB5A /* FaceRecognition.xcdatamodeld */; }; + CE29C51129ECD0FB008EDB5A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE29C51029ECD0FB008EDB5A /* Assets.xcassets */; }; + CE29C51429ECD0FB008EDB5A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE29C51229ECD0FB008EDB5A /* LaunchScreen.storyboard */; }; + CE29C51F29ECD0FC008EDB5A /* FaceRecognitionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C51E29ECD0FC008EDB5A /* FaceRecognitionTests.swift */; }; + CE29C52929ECD0FC008EDB5A /* FaceRecognitionUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C52829ECD0FC008EDB5A /* FaceRecognitionUITests.swift */; }; + CE29C52B29ECD0FC008EDB5A /* FaceRecognitionUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C52A29ECD0FC008EDB5A /* FaceRecognitionUITestsLaunchTests.swift */; }; + CE29C53929ECE135008EDB5A /* facesdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE29C53829ECE134008EDB5A /* facesdk.framework */; }; + CE29C53A29ECE135008EDB5A /* facesdk.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CE29C53829ECE134008EDB5A /* facesdk.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + CE29C54129ECE15C008EDB5A /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C53C29ECE157008EDB5A /* AboutViewController.swift */; }; + CE29C54229ECE15C008EDB5A /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C53D29ECE158008EDB5A /* SettingsViewController.swift */; }; + CE29C54329ECE15C008EDB5A /* CameraViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C53E29ECE159008EDB5A /* CameraViewController.swift */; }; + CE29C54429ECE15C008EDB5A /* UIImageExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C53F29ECE15A008EDB5A /* UIImageExtension.swift */; }; + CE29C54529ECE15C008EDB5A /* FaceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C54029ECE15B008EDB5A /* FaceView.swift */; }; + CE29C54829ED6A0C008EDB5A /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = CE29C54629ED6A0C008EDB5A /* Model.xcdatamodeld */; }; + CE29C54A29ED7527008EDB5A /* PersonViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE29C54929ED7527008EDB5A /* PersonViewCell.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + CE29C51B29ECD0FC008EDB5A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = CE29C4F929ECD0A5008EDB5A /* Project object */; + proxyType = 1; + remoteGlobalIDString = CE29C50029ECD0A5008EDB5A; + remoteInfo = FaceRecognition; + }; + CE29C52529ECD0FC008EDB5A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = CE29C4F929ECD0A5008EDB5A /* Project object */; + proxyType = 1; + remoteGlobalIDString = CE29C50029ECD0A5008EDB5A; + remoteInfo = FaceRecognition; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + CE29C53B29ECE136008EDB5A /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + CE29C53A29ECE135008EDB5A /* facesdk.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + CE08D25929ED8D4F0071F025 /* ToastView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastView.swift; sourceTree = "<group>"; }; + CE29C50129ECD0A5008EDB5A /* FaceRecognition.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FaceRecognition.app; sourceTree = BUILT_PRODUCTS_DIR; }; + CE29C50429ECD0A5008EDB5A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; + CE29C50629ECD0A5008EDB5A /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; }; + CE29C50829ECD0A5008EDB5A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; }; + CE29C50B29ECD0A5008EDB5A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; + CE29C50E29ECD0A5008EDB5A /* FaceRecognition.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = FaceRecognition.xcdatamodel; sourceTree = "<group>"; }; + CE29C51029ECD0FB008EDB5A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; + CE29C51329ECD0FB008EDB5A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; + CE29C51529ECD0FB008EDB5A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + CE29C51A29ECD0FC008EDB5A /* FaceRecognitionTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FaceRecognitionTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + CE29C51E29ECD0FC008EDB5A /* FaceRecognitionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaceRecognitionTests.swift; sourceTree = "<group>"; }; + CE29C52429ECD0FC008EDB5A /* FaceRecognitionUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FaceRecognitionUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + CE29C52829ECD0FC008EDB5A /* FaceRecognitionUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaceRecognitionUITests.swift; sourceTree = "<group>"; }; + CE29C52A29ECD0FC008EDB5A /* FaceRecognitionUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaceRecognitionUITestsLaunchTests.swift; sourceTree = "<group>"; }; + CE29C53829ECE134008EDB5A /* facesdk.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = facesdk.framework; sourceTree = "<group>"; }; + CE29C53C29ECE157008EDB5A /* AboutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = "<group>"; }; + CE29C53D29ECE158008EDB5A /* SettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; }; + CE29C53E29ECE159008EDB5A /* CameraViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CameraViewController.swift; sourceTree = "<group>"; }; + CE29C53F29ECE15A008EDB5A /* UIImageExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageExtension.swift; sourceTree = "<group>"; }; + CE29C54029ECE15B008EDB5A /* FaceView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FaceView.swift; sourceTree = "<group>"; }; + CE29C54729ED6A0C008EDB5A /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; }; + CE29C54929ED7527008EDB5A /* PersonViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonViewCell.swift; sourceTree = "<group>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + CE29C4FE29ECD0A5008EDB5A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + CE29C53929ECE135008EDB5A /* facesdk.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CE29C51729ECD0FC008EDB5A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CE29C52129ECD0FC008EDB5A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + CE29C4F829ECD0A4008EDB5A = { + isa = PBXGroup; + children = ( + CE29C50329ECD0A5008EDB5A /* FaceRecognition */, + CE29C51D29ECD0FC008EDB5A /* FaceRecognitionTests */, + CE29C52729ECD0FC008EDB5A /* FaceRecognitionUITests */, + CE29C50229ECD0A5008EDB5A /* Products */, + CE29C53729ECE131008EDB5A /* Frameworks */, + ); + sourceTree = "<group>"; + }; + CE29C50229ECD0A5008EDB5A /* Products */ = { + isa = PBXGroup; + children = ( + CE29C50129ECD0A5008EDB5A /* FaceRecognition.app */, + CE29C51A29ECD0FC008EDB5A /* FaceRecognitionTests.xctest */, + CE29C52429ECD0FC008EDB5A /* FaceRecognitionUITests.xctest */, + ); + name = Products; + sourceTree = "<group>"; + }; + CE29C50329ECD0A5008EDB5A /* FaceRecognition */ = { + isa = PBXGroup; + children = ( + CE29C50429ECD0A5008EDB5A /* AppDelegate.swift */, + CE08D25929ED8D4F0071F025 /* ToastView.swift */, + CE29C50629ECD0A5008EDB5A /* SceneDelegate.swift */, + CE29C50829ECD0A5008EDB5A /* ViewController.swift */, + CE29C54929ED7527008EDB5A /* PersonViewCell.swift */, + CE29C54629ED6A0C008EDB5A /* Model.xcdatamodeld */, + CE29C53C29ECE157008EDB5A /* AboutViewController.swift */, + CE29C53E29ECE159008EDB5A /* CameraViewController.swift */, + CE29C54029ECE15B008EDB5A /* FaceView.swift */, + CE29C53D29ECE158008EDB5A /* SettingsViewController.swift */, + CE29C53F29ECE15A008EDB5A /* UIImageExtension.swift */, + CE29C50A29ECD0A5008EDB5A /* Main.storyboard */, + CE29C51029ECD0FB008EDB5A /* Assets.xcassets */, + CE29C51229ECD0FB008EDB5A /* LaunchScreen.storyboard */, + CE29C51529ECD0FB008EDB5A /* Info.plist */, + CE29C50D29ECD0A5008EDB5A /* FaceRecognition.xcdatamodeld */, + ); + path = FaceRecognition; + sourceTree = "<group>"; + }; + CE29C51D29ECD0FC008EDB5A /* FaceRecognitionTests */ = { + isa = PBXGroup; + children = ( + CE29C51E29ECD0FC008EDB5A /* FaceRecognitionTests.swift */, + ); + path = FaceRecognitionTests; + sourceTree = "<group>"; + }; + CE29C52729ECD0FC008EDB5A /* FaceRecognitionUITests */ = { + isa = PBXGroup; + children = ( + CE29C52829ECD0FC008EDB5A /* FaceRecognitionUITests.swift */, + CE29C52A29ECD0FC008EDB5A /* FaceRecognitionUITestsLaunchTests.swift */, + ); + path = FaceRecognitionUITests; + sourceTree = "<group>"; + }; + CE29C53729ECE131008EDB5A /* Frameworks */ = { + isa = PBXGroup; + children = ( + CE29C53829ECE134008EDB5A /* facesdk.framework */, + ); + name = Frameworks; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + CE29C50029ECD0A5008EDB5A /* FaceRecognition */ = { + isa = PBXNativeTarget; + buildConfigurationList = CE29C52E29ECD0FC008EDB5A /* Build configuration list for PBXNativeTarget "FaceRecognition" */; + buildPhases = ( + CE29C4FD29ECD0A5008EDB5A /* Sources */, + CE29C4FE29ECD0A5008EDB5A /* Frameworks */, + CE29C4FF29ECD0A5008EDB5A /* Resources */, + CE29C53B29ECE136008EDB5A /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = FaceRecognition; + productName = FaceRecognition; + productReference = CE29C50129ECD0A5008EDB5A /* FaceRecognition.app */; + productType = "com.apple.product-type.application"; + }; + CE29C51929ECD0FC008EDB5A /* FaceRecognitionTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = CE29C53129ECD0FC008EDB5A /* Build configuration list for PBXNativeTarget "FaceRecognitionTests" */; + buildPhases = ( + CE29C51629ECD0FC008EDB5A /* Sources */, + CE29C51729ECD0FC008EDB5A /* Frameworks */, + CE29C51829ECD0FC008EDB5A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + CE29C51C29ECD0FC008EDB5A /* PBXTargetDependency */, + ); + name = FaceRecognitionTests; + productName = FaceRecognitionTests; + productReference = CE29C51A29ECD0FC008EDB5A /* FaceRecognitionTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + CE29C52329ECD0FC008EDB5A /* FaceRecognitionUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = CE29C53429ECD0FC008EDB5A /* Build configuration list for PBXNativeTarget "FaceRecognitionUITests" */; + buildPhases = ( + CE29C52029ECD0FC008EDB5A /* Sources */, + CE29C52129ECD0FC008EDB5A /* Frameworks */, + CE29C52229ECD0FC008EDB5A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + CE29C52629ECD0FC008EDB5A /* PBXTargetDependency */, + ); + name = FaceRecognitionUITests; + productName = FaceRecognitionUITests; + productReference = CE29C52429ECD0FC008EDB5A /* FaceRecognitionUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + CE29C4F929ECD0A5008EDB5A /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1420; + LastUpgradeCheck = 1420; + TargetAttributes = { + CE29C50029ECD0A5008EDB5A = { + CreatedOnToolsVersion = 14.2; + }; + CE29C51929ECD0FC008EDB5A = { + CreatedOnToolsVersion = 14.2; + TestTargetID = CE29C50029ECD0A5008EDB5A; + }; + CE29C52329ECD0FC008EDB5A = { + CreatedOnToolsVersion = 14.2; + TestTargetID = CE29C50029ECD0A5008EDB5A; + }; + }; + }; + buildConfigurationList = CE29C4FC29ECD0A5008EDB5A /* Build configuration list for PBXProject "FaceRecognition" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = CE29C4F829ECD0A4008EDB5A; + productRefGroup = CE29C50229ECD0A5008EDB5A /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + CE29C50029ECD0A5008EDB5A /* FaceRecognition */, + CE29C51929ECD0FC008EDB5A /* FaceRecognitionTests */, + CE29C52329ECD0FC008EDB5A /* FaceRecognitionUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + CE29C4FF29ECD0A5008EDB5A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CE29C51429ECD0FB008EDB5A /* LaunchScreen.storyboard in Resources */, + CE29C51129ECD0FB008EDB5A /* Assets.xcassets in Resources */, + CE29C50C29ECD0A5008EDB5A /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CE29C51829ECD0FC008EDB5A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CE29C52229ECD0FC008EDB5A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + CE29C4FD29ECD0A5008EDB5A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CE29C50F29ECD0A5008EDB5A /* FaceRecognition.xcdatamodeld in Sources */, + CE29C50929ECD0A5008EDB5A /* ViewController.swift in Sources */, + CE29C50529ECD0A5008EDB5A /* AppDelegate.swift in Sources */, + CE29C54429ECE15C008EDB5A /* UIImageExtension.swift in Sources */, + CE08D25A29ED8D4F0071F025 /* ToastView.swift in Sources */, + CE29C54129ECE15C008EDB5A /* AboutViewController.swift in Sources */, + CE29C54329ECE15C008EDB5A /* CameraViewController.swift in Sources */, + CE29C50729ECD0A5008EDB5A /* SceneDelegate.swift in Sources */, + CE29C54829ED6A0C008EDB5A /* Model.xcdatamodeld in Sources */, + CE29C54229ECE15C008EDB5A /* SettingsViewController.swift in Sources */, + CE29C54A29ED7527008EDB5A /* PersonViewCell.swift in Sources */, + CE29C54529ECE15C008EDB5A /* FaceView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CE29C51629ECD0FC008EDB5A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CE29C51F29ECD0FC008EDB5A /* FaceRecognitionTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CE29C52029ECD0FC008EDB5A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CE29C52929ECD0FC008EDB5A /* FaceRecognitionUITests.swift in Sources */, + CE29C52B29ECD0FC008EDB5A /* FaceRecognitionUITestsLaunchTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + CE29C51C29ECD0FC008EDB5A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = CE29C50029ECD0A5008EDB5A /* FaceRecognition */; + targetProxy = CE29C51B29ECD0FC008EDB5A /* PBXContainerItemProxy */; + }; + CE29C52629ECD0FC008EDB5A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = CE29C50029ECD0A5008EDB5A /* FaceRecognition */; + targetProxy = CE29C52529ECD0FC008EDB5A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + CE29C50A29ECD0A5008EDB5A /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + CE29C50B29ECD0A5008EDB5A /* Base */, + ); + name = Main.storyboard; + sourceTree = "<group>"; + }; + CE29C51229ECD0FB008EDB5A /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + CE29C51329ECD0FB008EDB5A /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = "<group>"; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + CE29C52C29ECD0FC008EDB5A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + CE29C52D29ECD0FC008EDB5A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + CE29C52F29ECD0FC008EDB5A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = JSUUF48N9C; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)", + ); + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = FaceRecognition/Info.plist; + INFOPLIST_KEY_NSCameraUsageDescription = ""; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.kbyai.FaceRecognition; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OBJC_BRIDGING_HEADER = "FaceRecognition-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + CE29C53029ECD0FC008EDB5A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = JSUUF48N9C; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)", + ); + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = FaceRecognition/Info.plist; + INFOPLIST_KEY_NSCameraUsageDescription = ""; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.kbyai.FaceRecognition; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OBJC_BRIDGING_HEADER = "FaceRecognition-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + CE29C53229ECD0FC008EDB5A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = JSUUF48N9C; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.kbyai.FaceRecognitionTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FaceRecognition.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/FaceRecognition"; + }; + name = Debug; + }; + CE29C53329ECD0FC008EDB5A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = JSUUF48N9C; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.kbyai.FaceRecognitionTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FaceRecognition.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/FaceRecognition"; + }; + name = Release; + }; + CE29C53529ECD0FC008EDB5A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = JSUUF48N9C; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.kbyai.FaceRecognitionUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = FaceRecognition; + }; + name = Debug; + }; + CE29C53629ECD0FC008EDB5A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = JSUUF48N9C; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.kbyai.FaceRecognitionUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = FaceRecognition; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + CE29C4FC29ECD0A5008EDB5A /* Build configuration list for PBXProject "FaceRecognition" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CE29C52C29ECD0FC008EDB5A /* Debug */, + CE29C52D29ECD0FC008EDB5A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + CE29C52E29ECD0FC008EDB5A /* Build configuration list for PBXNativeTarget "FaceRecognition" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CE29C52F29ECD0FC008EDB5A /* Debug */, + CE29C53029ECD0FC008EDB5A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + CE29C53129ECD0FC008EDB5A /* Build configuration list for PBXNativeTarget "FaceRecognitionTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CE29C53229ECD0FC008EDB5A /* Debug */, + CE29C53329ECD0FC008EDB5A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + CE29C53429ECD0FC008EDB5A /* Build configuration list for PBXNativeTarget "FaceRecognitionUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CE29C53529ECD0FC008EDB5A /* Debug */, + CE29C53629ECD0FC008EDB5A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + CE29C50D29ECD0A5008EDB5A /* FaceRecognition.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + CE29C50E29ECD0A5008EDB5A /* FaceRecognition.xcdatamodel */, + ); + currentVersion = CE29C50E29ECD0A5008EDB5A /* FaceRecognition.xcdatamodel */; + path = FaceRecognition.xcdatamodeld; + sourceTree = "<group>"; + versionGroupType = wrapper.xcdatamodel; + }; + CE29C54629ED6A0C008EDB5A /* Model.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + CE29C54729ED6A0C008EDB5A /* Model.xcdatamodel */, + ); + currentVersion = CE29C54729ED6A0C008EDB5A /* Model.xcdatamodel */; + path = Model.xcdatamodeld; + sourceTree = "<group>"; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = CE29C4F929ECD0A5008EDB5A /* Project object */; +} diff --git a/FaceRecognition.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/FaceRecognition.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/FaceRecognition.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> + <FileRef + location = "self:"> + </FileRef> +</Workspace> diff --git a/FaceRecognition.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/FaceRecognition.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/FaceRecognition.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IDEDidComputeMac32BitWarning</key> + <true/> +</dict> +</plist> diff --git a/FaceRecognition.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate b/FaceRecognition.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..cc9fd7c Binary files /dev/null and b/FaceRecognition.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/FaceRecognition.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist b/FaceRecognition.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..95bf7d1 --- /dev/null +++ b/FaceRecognition.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>SchemeUserState</key> + <dict> + <key>FaceRecognition.xcscheme_^#shared#^_</key> + <dict> + <key>orderHint</key> + <integer>0</integer> + </dict> + </dict> +</dict> +</plist> diff --git a/FaceRecognition/.DS_Store b/FaceRecognition/.DS_Store new file mode 100644 index 0000000..ccbf420 Binary files /dev/null and b/FaceRecognition/.DS_Store differ diff --git a/FaceRecognition/AboutViewController.swift b/FaceRecognition/AboutViewController.swift new file mode 100644 index 0000000..6978482 --- /dev/null +++ b/FaceRecognition/AboutViewController.swift @@ -0,0 +1,70 @@ +import UIKit +import AVFoundation + +class AboutViewController: UIViewController{ + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + } + + + @IBAction func done_clicked(_ sender: Any) { + if let vc = self.presentingViewController as? ViewController { + self.dismiss(animated: true, completion: nil) + } + } + + + @IBAction func mail_clicked(_ sender: Any) { + let appURL = URL(string: "mailto:contact@kby-ai.com") // URL scheme for Mail app + + if let appURL = appURL, UIApplication.shared.canOpenURL(appURL) { + // If Mail app is installed, open it with a pre-filled email + UIApplication.shared.open(appURL, options: [:], completionHandler: nil) + } else { + // If Mail app is not installed, show an alert indicating that Mail app is not available + let alert = UIAlertController(title: "Mail App Not Available", message: "The Mail app is not installed on this device.", preferredStyle: .alert) + let okAction = UIAlertAction(title: "OK", style: .default, handler: nil) + alert.addAction(okAction) + UIApplication.shared.keyWindow?.rootViewController?.present(alert, animated: true, completion: nil) + } + } + + + @IBAction func skype_clicked(_ sender: Any) { + + } + + @IBAction func telegram_clicked(_ sender: Any) { + let appURL = URL(string: "tg://resolve?domain=kbyai") // URL scheme for Telegram app + + if let appURL = appURL, UIApplication.shared.canOpenURL(appURL) { + // If Telegram app is installed, open it to the "Add Contact" screen + UIApplication.shared.open(appURL, options: [:], completionHandler: nil) + } else { + let username = "kbyai" + let telegramURL = URL(string: "https://t.me/\(username)")! + UIApplication.shared.open(telegramURL, options: [:], completionHandler: nil) + } + } + + @IBAction func whatsapp_clicked(_ sender: Any) { + let appURL = URL(string: "whatsapp://send?phone=+19092802609") // URL scheme for Telegram app + + if let appURL = appURL, UIApplication.shared.canOpenURL(appURL) { + // If Telegram app is installed, open it to the "Add Contact" screen + UIApplication.shared.open(appURL, options: [:], completionHandler: nil) + } else { + let username = "+19092802609" + let telegramURL = URL(string: "https://wa.me/\(username)")! + UIApplication.shared.open(telegramURL, options: [:], completionHandler: nil) + } + } + + @IBAction func github_clicked(_ sender: Any) { + let telegramURL = URL(string: "https://github.com/kby-ai")! + UIApplication.shared.open(telegramURL, options: [:], completionHandler: nil) + } +} + diff --git a/FaceRecognition/AppDelegate.swift b/FaceRecognition/AppDelegate.swift new file mode 100644 index 0000000..47520cb --- /dev/null +++ b/FaceRecognition/AppDelegate.swift @@ -0,0 +1,75 @@ + +import UIKit +import CoreData + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + // MARK: - Core Data stack + + lazy var persistentContainer: NSPersistentContainer = { + /* + The persistent container for the application. This implementation + creates and returns a container, having loaded the store for the + application to it. This property is optional since there are legitimate + error conditions that could cause the creation of the store to fail. + */ + let container = NSPersistentContainer(name: "FaceRecognition") + container.loadPersistentStores(completionHandler: { (storeDescription, error) in + if let error = error as NSError? { + // Replace this implementation with code to handle the error appropriately. + // 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. + + /* + Typical reasons for an error here include: + * The parent directory does not exist, cannot be created, or disallows writing. + * The persistent store is not accessible, due to permissions or data protection when the device is locked. + * The device is out of space. + * The store could not be migrated to the current model version. + Check the error message to determine what the actual problem was. + */ + fatalError("Unresolved error \(error), \(error.userInfo)") + } + }) + return container + }() + + // MARK: - Core Data Saving support + + func saveContext () { + let context = persistentContainer.viewContext + if context.hasChanges { + do { + try context.save() + } catch { + // Replace this implementation with code to handle the error appropriately. + // 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. + let nserror = error as NSError + fatalError("Unresolved error \(nserror), \(nserror.userInfo)") + } + } + } + +} + diff --git a/FaceRecognition/Assets.xcassets/AccentColor.colorset/Contents.json b/FaceRecognition/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/FaceRecognition/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/AppIcon.appiconset/Contents.json b/FaceRecognition/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..44ac9cc --- /dev/null +++ b/FaceRecognition/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "appstore.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/AppIcon.appiconset/appstore.png b/FaceRecognition/Assets.xcassets/AppIcon.appiconset/appstore.png new file mode 100644 index 0000000..ce64898 Binary files /dev/null and b/FaceRecognition/Assets.xcassets/AppIcon.appiconset/appstore.png differ diff --git a/FaceRecognition/Assets.xcassets/Contents.json b/FaceRecognition/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/FaceRecognition/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/clr_bg.colorset/Contents.json b/FaceRecognition/Assets.xcassets/clr_bg.colorset/Contents.json new file mode 100644 index 0000000..48203c8 --- /dev/null +++ b/FaceRecognition/Assets.xcassets/clr_bg.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x33", + "green" : "0x30", + "red" : "0x30" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x33", + "green" : "0x30", + "red" : "0x30" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/clr_main_button_bg1.colorset/Contents.json b/FaceRecognition/Assets.xcassets/clr_main_button_bg1.colorset/Contents.json new file mode 100644 index 0000000..9a5762c --- /dev/null +++ b/FaceRecognition/Assets.xcassets/clr_main_button_bg1.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.545", + "green" : "0.216", + "red" : "0.310" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.545", + "green" : "0.216", + "red" : "0.310" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/clr_main_button_bg2.colorset/Contents.json b/FaceRecognition/Assets.xcassets/clr_main_button_bg2.colorset/Contents.json new file mode 100644 index 0000000..1192b7a --- /dev/null +++ b/FaceRecognition/Assets.xcassets/clr_main_button_bg2.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "0.867", + "red" : "0.918" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "0.867", + "red" : "0.918" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/clr_text.colorset/Contents.json b/FaceRecognition/Assets.xcassets/clr_text.colorset/Contents.json new file mode 100644 index 0000000..c52e30b --- /dev/null +++ b/FaceRecognition/Assets.xcassets/clr_text.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xE5", + "green" : "0xE1", + "red" : "0xE6" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xE5", + "green" : "0xE1", + "red" : "0xE6" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/clr_toast_bg.colorset/Contents.json b/FaceRecognition/Assets.xcassets/clr_toast_bg.colorset/Contents.json new file mode 100644 index 0000000..b6a9795 --- /dev/null +++ b/FaceRecognition/Assets.xcassets/clr_toast_bg.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x32", + "green" : "0x24", + "red" : "0x49" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x32", + "green" : "0x24", + "red" : "0x49" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/ic_github.imageset/Contents.json b/FaceRecognition/Assets.xcassets/ic_github.imageset/Contents.json new file mode 100644 index 0000000..a8700e4 --- /dev/null +++ b/FaceRecognition/Assets.xcassets/ic_github.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ic_github.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ic_github 1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ic_github 2.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/ic_github.imageset/ic_github 1.png b/FaceRecognition/Assets.xcassets/ic_github.imageset/ic_github 1.png new file mode 100644 index 0000000..8261401 Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_github.imageset/ic_github 1.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_github.imageset/ic_github 2.png b/FaceRecognition/Assets.xcassets/ic_github.imageset/ic_github 2.png new file mode 100644 index 0000000..8261401 Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_github.imageset/ic_github 2.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_github.imageset/ic_github.png b/FaceRecognition/Assets.xcassets/ic_github.imageset/ic_github.png new file mode 100644 index 0000000..8261401 Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_github.imageset/ic_github.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_kby.imageset/Contents.json b/FaceRecognition/Assets.xcassets/ic_kby.imageset/Contents.json new file mode 100644 index 0000000..34037b0 --- /dev/null +++ b/FaceRecognition/Assets.xcassets/ic_kby.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ic_kby.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ic_kby 1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ic_kby 2.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/ic_kby.imageset/ic_kby 1.png b/FaceRecognition/Assets.xcassets/ic_kby.imageset/ic_kby 1.png new file mode 100644 index 0000000..b295d6c Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_kby.imageset/ic_kby 1.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_kby.imageset/ic_kby 2.png b/FaceRecognition/Assets.xcassets/ic_kby.imageset/ic_kby 2.png new file mode 100644 index 0000000..b295d6c Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_kby.imageset/ic_kby 2.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_kby.imageset/ic_kby.png b/FaceRecognition/Assets.xcassets/ic_kby.imageset/ic_kby.png new file mode 100644 index 0000000..b295d6c Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_kby.imageset/ic_kby.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_skype.imageset/Contents.json b/FaceRecognition/Assets.xcassets/ic_skype.imageset/Contents.json new file mode 100644 index 0000000..9816e4c --- /dev/null +++ b/FaceRecognition/Assets.xcassets/ic_skype.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ic_skype.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ic_skype 1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ic_skype 2.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/ic_skype.imageset/ic_skype 1.png b/FaceRecognition/Assets.xcassets/ic_skype.imageset/ic_skype 1.png new file mode 100644 index 0000000..c92130a Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_skype.imageset/ic_skype 1.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_skype.imageset/ic_skype 2.png b/FaceRecognition/Assets.xcassets/ic_skype.imageset/ic_skype 2.png new file mode 100644 index 0000000..c92130a Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_skype.imageset/ic_skype 2.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_skype.imageset/ic_skype.png b/FaceRecognition/Assets.xcassets/ic_skype.imageset/ic_skype.png new file mode 100644 index 0000000..c92130a Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_skype.imageset/ic_skype.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_telegram.imageset/Contents.json b/FaceRecognition/Assets.xcassets/ic_telegram.imageset/Contents.json new file mode 100644 index 0000000..d3d3fda --- /dev/null +++ b/FaceRecognition/Assets.xcassets/ic_telegram.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ic_telegram.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ic_telegram 1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ic_telegram 2.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/ic_telegram.imageset/ic_telegram 1.png b/FaceRecognition/Assets.xcassets/ic_telegram.imageset/ic_telegram 1.png new file mode 100644 index 0000000..5f96d5e Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_telegram.imageset/ic_telegram 1.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_telegram.imageset/ic_telegram 2.png b/FaceRecognition/Assets.xcassets/ic_telegram.imageset/ic_telegram 2.png new file mode 100644 index 0000000..5f96d5e Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_telegram.imageset/ic_telegram 2.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_telegram.imageset/ic_telegram.png b/FaceRecognition/Assets.xcassets/ic_telegram.imageset/ic_telegram.png new file mode 100644 index 0000000..5f96d5e Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_telegram.imageset/ic_telegram.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_whatsapp.imageset/Contents.json b/FaceRecognition/Assets.xcassets/ic_whatsapp.imageset/Contents.json new file mode 100644 index 0000000..24ee2cc --- /dev/null +++ b/FaceRecognition/Assets.xcassets/ic_whatsapp.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "ic_whatsapp.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ic_whatsapp 1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "ic_whatsapp 2.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceRecognition/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp 1.png b/FaceRecognition/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp 1.png new file mode 100644 index 0000000..2e46c94 Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp 1.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp 2.png b/FaceRecognition/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp 2.png new file mode 100644 index 0000000..2e46c94 Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp 2.png differ diff --git a/FaceRecognition/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp.png b/FaceRecognition/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp.png new file mode 100644 index 0000000..2e46c94 Binary files /dev/null and b/FaceRecognition/Assets.xcassets/ic_whatsapp.imageset/ic_whatsapp.png differ diff --git a/FaceRecognition/Base.lproj/LaunchScreen.storyboard b/FaceRecognition/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/FaceRecognition/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> + <capability name="Safe area layout guides" minToolsVersion="9.0"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <scenes> + <!--View Controller--> + <scene sceneID="EHf-IW-A2E"> + <objects> + <viewController id="01J-lp-oVM" sceneMemberID="viewController"> + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> + <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> + </view> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="53" y="375"/> + </scene> + </scenes> +</document> diff --git a/FaceRecognition/Base.lproj/Main.storyboard b/FaceRecognition/Base.lproj/Main.storyboard new file mode 100644 index 0000000..6ab937b --- /dev/null +++ b/FaceRecognition/Base.lproj/Main.storyboard @@ -0,0 +1,1403 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="6zv-7V-lS5"> + <device id="retina6_72" orientation="portrait" appearance="light"/> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/> + <capability name="Named colors" minToolsVersion="9.0"/> + <capability name="Safe area layout guides" minToolsVersion="9.0"/> + <capability name="System colors in document resources" minToolsVersion="11.0"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <scenes> + <!--View Controller--> + <scene sceneID="D8g-1V-SPw"> + <objects> + <viewController id="6zv-7V-lS5" customClass="ViewController" customModule="FaceRecognition" customModuleProvider="target" sceneMemberID="viewController"> + <view key="view" contentMode="scaleToFill" id="ek1-jM-3C1"> + <rect key="frame" x="0.0" y="0.0" width="430" height="932"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Face Recognition" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NQP-K2-tQX"> + <rect key="frame" x="0.0" y="59" width="430" height="60"/> + <constraints> + <constraint firstAttribute="height" constant="60" id="C1v-j7-g8Q"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="24"/> + <color key="textColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="m3x-s5-Umi"> + <rect key="frame" x="16" y="135" width="398" height="65.666666666666686"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sparkles" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="EJQ-3L-LsF"> + <rect key="frame" x="10" y="15" width="24" height="24.666666666666671"/> + <color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="Pns-Z8-SwG"/> + <constraint firstAttribute="width" constant="24" id="nyK-Ch-2L8"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="We offer SDKs for face recognition, liveness detection, and ID card recognition." lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mf9-AL-gU1"> + <rect key="frame" x="48" y="19" width="288" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="14"/> + <color key="textColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" red="0.25882352939999997" green="0.25882352939999997" blue="0.25882352939999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="EJQ-3L-LsF" firstAttribute="top" secondItem="m3x-s5-Umi" secondAttribute="top" constant="16" id="087-mu-PY0"/> + <constraint firstItem="EJQ-3L-LsF" firstAttribute="leading" secondItem="m3x-s5-Umi" secondAttribute="leading" constant="10" id="I0J-Q3-5kA"/> + <constraint firstAttribute="trailing" secondItem="mf9-AL-gU1" secondAttribute="trailing" constant="10" id="hvG-3g-8Ll"/> + <constraint firstItem="mf9-AL-gU1" firstAttribute="top" secondItem="m3x-s5-Umi" secondAttribute="top" constant="16" id="j0e-p0-ZAA"/> + <constraint firstAttribute="bottom" secondItem="mf9-AL-gU1" secondAttribute="bottom" constant="16" id="lGW-qZ-zpZ"/> + <constraint firstItem="mf9-AL-gU1" firstAttribute="leading" secondItem="EJQ-3L-LsF" secondAttribute="trailing" constant="8" id="q9n-d0-M9N"/> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" id="rNV-Lj-CmY"/> + </constraints> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> + <integer key="value" value="12"/> + </userDefinedRuntimeAttribute> + </userDefinedRuntimeAttributes> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="krt-Yd-Ofi"> + <rect key="frame" x="16" y="216.66666666666666" width="189.33333333333334" height="49.999999999999972"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="person.fill.badge.plus" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="yP5-Zz-vw6"> + <rect key="frame" x="21.666666666666671" y="15.000000000000004" width="26.333333333333329" height="23.666666666666661"/> + <color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="t34-vW-gjA"/> + <constraint firstAttribute="width" constant="24" id="zci-Ug-1XO"/> + </constraints> + </imageView> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5pq-gQ-Xgq"> + <rect key="frame" x="0.0" y="0.0" width="189.33333333333334" height="50"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="enroll_clicked:" destination="6zv-7V-lS5" eventType="touchUpInside" id="h9G-es-a5f"/> + <action selector="enroll_touch_cancel:" destination="6zv-7V-lS5" eventType="touchUpOutside" id="YS2-WS-3EU"/> + <action selector="enroll_touch_cancel:" destination="6zv-7V-lS5" eventType="touchCancel" id="rG9-iu-zAN"/> + <action selector="enroll_touch_down:" destination="6zv-7V-lS5" eventType="touchDown" id="qNz-g4-vAh"/> + </connections> + </button> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Enroll" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wAk-O3-5Mh"> + <rect key="frame" x="74" y="16.999999999999972" width="57" height="20"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="CQt-Ya-j8f"/> + <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="30" id="ZDl-qP-m5P"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" red="0.30980392159999998" green="0.2156862745" blue="0.5450980392" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="trailing" secondItem="wAk-O3-5Mh" secondAttribute="trailing" constant="40" id="3Kv-ab-xQC"/> + <constraint firstAttribute="bottom" secondItem="5pq-gQ-Xgq" secondAttribute="bottom" id="74x-vH-ZGs"/> + <constraint firstItem="yP5-Zz-vw6" firstAttribute="leading" secondItem="krt-Yd-Ofi" secondAttribute="leading" constant="24" id="9PT-xI-k4g"/> + <constraint firstItem="wAk-O3-5Mh" firstAttribute="centerY" secondItem="krt-Yd-Ofi" secondAttribute="centerY" id="DNz-m9-yGZ"/> + <constraint firstAttribute="height" constant="50" id="OIU-tW-7kp"/> + <constraint firstItem="5pq-gQ-Xgq" firstAttribute="top" secondItem="krt-Yd-Ofi" secondAttribute="top" id="TVV-Wd-Eae"/> + <constraint firstAttribute="trailing" secondItem="5pq-gQ-Xgq" secondAttribute="trailing" id="dfD-cH-qct"/> + <constraint firstItem="5pq-gQ-Xgq" firstAttribute="leading" secondItem="krt-Yd-Ofi" secondAttribute="leading" id="fRz-Aj-hFr"/> + <constraint firstItem="yP5-Zz-vw6" firstAttribute="centerY" secondItem="krt-Yd-Ofi" secondAttribute="centerY" id="tEN-N5-26x"/> + </constraints> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> + <integer key="value" value="16"/> + </userDefinedRuntimeAttribute> + </userDefinedRuntimeAttributes> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="79o-DH-4F2"> + <rect key="frame" x="16" y="282.66666666666669" width="189.33333333333334" height="50"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="gearshape.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="wE6-Fq-YNd"> + <rect key="frame" x="24" y="13.333333333333332" width="24" height="23.333333333333339"/> + <color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="jPX-Va-io9"/> + <constraint firstAttribute="width" constant="24" id="vjd-qH-38H"/> + </constraints> + </imageView> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hnO-bf-TLX"> + <rect key="frame" x="0.0" y="0.0" width="189.33333333333334" height="50"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="settings_clicked:" destination="6zv-7V-lS5" eventType="touchUpInside" id="9yH-2x-OaM"/> + <action selector="settings_touch_down:" destination="6zv-7V-lS5" eventType="touchDown" id="8h7-85-WoL"/> + <action selector="settings_touch_up:" destination="6zv-7V-lS5" eventType="touchCancel" id="47a-Iy-ipV"/> + <action selector="settings_touch_up:" destination="6zv-7V-lS5" eventType="touchUpOutside" id="RNl-jR-C9F"/> + </connections> + </button> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Settings" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aJa-t1-fHx"> + <rect key="frame" x="74" y="17.000000000000057" width="57" height="20"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="3OV-03-lsJ"/> + <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="30" id="mcA-ty-Bsb"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" red="0.30980392159999998" green="0.2156862745" blue="0.5450980392" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="wE6-Fq-YNd" firstAttribute="centerY" secondItem="79o-DH-4F2" secondAttribute="centerY" id="8Kg-XK-xNJ"/> + <constraint firstAttribute="bottom" secondItem="hnO-bf-TLX" secondAttribute="bottom" id="BjR-t6-1gi"/> + <constraint firstAttribute="trailing" secondItem="hnO-bf-TLX" secondAttribute="trailing" id="JgB-Qb-ST1"/> + <constraint firstAttribute="trailing" secondItem="aJa-t1-fHx" secondAttribute="trailing" constant="40" id="Qz3-jF-Ppp"/> + <constraint firstItem="wE6-Fq-YNd" firstAttribute="leading" secondItem="79o-DH-4F2" secondAttribute="leading" constant="24" id="Uyf-aG-RRn"/> + <constraint firstAttribute="height" constant="50" id="Xys-7i-40l"/> + <constraint firstItem="hnO-bf-TLX" firstAttribute="top" secondItem="79o-DH-4F2" secondAttribute="top" id="fxL-mK-kPo"/> + <constraint firstItem="hnO-bf-TLX" firstAttribute="leading" secondItem="79o-DH-4F2" secondAttribute="leading" id="ton-ZZ-PDt"/> + <constraint firstItem="aJa-t1-fHx" firstAttribute="centerY" secondItem="79o-DH-4F2" secondAttribute="centerY" id="z7q-cM-cTo"/> + </constraints> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> + <integer key="value" value="16"/> + </userDefinedRuntimeAttribute> + </userDefinedRuntimeAttributes> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lvE-za-s8Y"> + <rect key="frame" x="224.66666666666663" y="216.66666666666666" width="189.33333333333337" height="49.999999999999972"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="person.fill.checkmark" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="Z1l-Dg-tv5"> + <rect key="frame" x="24" y="14.999999999999998" width="24" height="20.666666666666664"/> + <color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="Qqk-A2-rz2"/> + <constraint firstAttribute="width" constant="24" id="f2G-CZ-mZP"/> + </constraints> + </imageView> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="swa-Q6-Y08"> + <rect key="frame" x="0.0" y="0.0" width="189.33333333333334" height="50"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="identify_clicked:" destination="6zv-7V-lS5" eventType="touchUpInside" id="trN-od-NOz"/> + <action selector="identify_touch_down:" destination="6zv-7V-lS5" eventType="touchDown" id="XEO-Ev-LmA"/> + <action selector="identify_touch_up:" destination="6zv-7V-lS5" eventType="touchUpOutside" id="4kd-5a-lIN"/> + <action selector="identify_touch_up:" destination="6zv-7V-lS5" eventType="touchCancel" id="cER-ZI-ixC"/> + </connections> + </button> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Identify" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FH6-KO-AoV"> + <rect key="frame" x="74" y="16.999999999999972" width="57" height="20"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="7dT-pQ-moF"/> + <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="30" id="B7U-C7-iYc"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" red="0.30980392159999998" green="0.2156862745" blue="0.5450980392" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="swa-Q6-Y08" firstAttribute="top" secondItem="lvE-za-s8Y" secondAttribute="top" id="8Xo-Oe-e8o"/> + <constraint firstItem="FH6-KO-AoV" firstAttribute="centerY" secondItem="lvE-za-s8Y" secondAttribute="centerY" id="PiI-O3-WQn"/> + <constraint firstAttribute="trailing" secondItem="swa-Q6-Y08" secondAttribute="trailing" id="YXu-mt-lPm"/> + <constraint firstItem="Z1l-Dg-tv5" firstAttribute="leading" secondItem="lvE-za-s8Y" secondAttribute="leading" constant="24" id="ed7-i7-ACA"/> + <constraint firstAttribute="bottom" secondItem="swa-Q6-Y08" secondAttribute="bottom" id="hWi-HK-81f"/> + <constraint firstAttribute="height" constant="50" id="qCS-oU-OF9"/> + <constraint firstItem="Z1l-Dg-tv5" firstAttribute="centerY" secondItem="lvE-za-s8Y" secondAttribute="centerY" id="sWE-F0-EJe"/> + <constraint firstItem="swa-Q6-Y08" firstAttribute="leading" secondItem="lvE-za-s8Y" secondAttribute="leading" id="vly-6f-Wv2"/> + <constraint firstAttribute="trailing" secondItem="FH6-KO-AoV" secondAttribute="trailing" constant="40" id="ypj-VF-LQf"/> + </constraints> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> + <integer key="value" value="16"/> + </userDefinedRuntimeAttribute> + </userDefinedRuntimeAttributes> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rUB-th-Y8q"> + <rect key="frame" x="224.66666666666663" y="282.66666666666669" width="189.33333333333337" height="50"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="info.circle.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="l8j-Gh-LPs"> + <rect key="frame" x="24" y="13.999999999999998" width="24" height="22.666666666666664"/> + <color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="2sh-Lc-BgJ"/> + <constraint firstAttribute="width" constant="24" id="E2F-Mf-kK1"/> + </constraints> + </imageView> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rdX-dS-rvV"> + <rect key="frame" x="0.0" y="0.0" width="189.33333333333334" height="50"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="about_clicked:" destination="6zv-7V-lS5" eventType="touchUpInside" id="EdR-EE-qXm"/> + <action selector="about_touch_down:" destination="6zv-7V-lS5" eventType="touchDown" id="Eqe-6Z-3fQ"/> + <action selector="about_touch_up:" destination="6zv-7V-lS5" eventType="touchCancel" id="3rQ-Tx-grQ"/> + <action selector="about_touch_up:" destination="6zv-7V-lS5" eventType="touchUpOutside" id="Dfw-T4-5So"/> + </connections> + </button> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="About" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ecq-bt-qve"> + <rect key="frame" x="74" y="16.999999999999972" width="57" height="20"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="2fX-RY-p7M"/> + <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="30" id="Ai6-bq-M84"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" red="0.30980392159999998" green="0.2156862745" blue="0.5450980392" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="l8j-Gh-LPs" firstAttribute="leading" secondItem="rUB-th-Y8q" secondAttribute="leading" constant="24" id="2YI-Jl-pIM"/> + <constraint firstItem="rdX-dS-rvV" firstAttribute="leading" secondItem="rUB-th-Y8q" secondAttribute="leading" id="4JJ-VZ-qXv"/> + <constraint firstItem="ecq-bt-qve" firstAttribute="centerY" secondItem="rUB-th-Y8q" secondAttribute="centerY" id="5aj-5e-PzQ"/> + <constraint firstAttribute="trailing" secondItem="rdX-dS-rvV" secondAttribute="trailing" id="E8c-2j-YW9"/> + <constraint firstAttribute="trailing" secondItem="ecq-bt-qve" secondAttribute="trailing" constant="40" id="Q30-iw-0ou"/> + <constraint firstAttribute="height" constant="50" id="jht-xr-j0O"/> + <constraint firstItem="rdX-dS-rvV" firstAttribute="top" secondItem="rUB-th-Y8q" secondAttribute="top" id="pi4-5w-pzn"/> + <constraint firstItem="l8j-Gh-LPs" firstAttribute="centerY" secondItem="rUB-th-Y8q" secondAttribute="centerY" id="rba-hG-QnH"/> + <constraint firstAttribute="bottom" secondItem="rdX-dS-rvV" secondAttribute="bottom" id="xA3-hc-Z9i"/> + </constraints> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> + <integer key="value" value="16"/> + </userDefinedRuntimeAttribute> + </userDefinedRuntimeAttributes> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="h0E-47-gXr"> + <rect key="frame" x="113" y="848" width="204" height="50"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="KBY-AI Technology" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8dn-aA-a36"> + <rect key="frame" x="50" y="0.0" width="154" height="50"/> + <constraints> + <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="100" id="K5Q-DM-Qzc"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="18"/> + <color key="textColor" red="0.28627450980000002" green="0.27058823529999998" blue="0.30980392159999998" alpha="1" colorSpace="calibratedRGB"/> + <nil key="highlightedColor"/> + </label> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_kby" translatesAutoresizingMaskIntoConstraints="NO" id="U2b-ro-lTi"> + <rect key="frame" x="0.0" y="0.0" width="50" height="50"/> + <constraints> + <constraint firstAttribute="width" secondItem="U2b-ro-lTi" secondAttribute="height" multiplier="1:1" id="9c9-8X-bDp"/> + </constraints> + </imageView> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="v3m-QD-jfx"> + <rect key="frame" x="0.0" y="0.0" width="204" height="50"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="brand_clicked:" destination="6zv-7V-lS5" eventType="touchUpInside" id="xkf-as-L3Z"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstAttribute="height" constant="50" id="1Ck-ga-9iW"/> + <constraint firstAttribute="trailing" secondItem="8dn-aA-a36" secondAttribute="trailing" id="9We-H6-Ass"/> + <constraint firstItem="8dn-aA-a36" firstAttribute="centerY" secondItem="h0E-47-gXr" secondAttribute="centerY" id="9mW-Oq-pKD"/> + <constraint firstItem="v3m-QD-jfx" firstAttribute="top" secondItem="h0E-47-gXr" secondAttribute="top" id="B2r-Bc-qwD"/> + <constraint firstItem="U2b-ro-lTi" firstAttribute="height" secondItem="h0E-47-gXr" secondAttribute="height" id="Ndo-Xd-Fun"/> + <constraint firstAttribute="bottom" secondItem="v3m-QD-jfx" secondAttribute="bottom" id="PCS-tZ-nOo"/> + <constraint firstItem="8dn-aA-a36" firstAttribute="leading" secondItem="U2b-ro-lTi" secondAttribute="trailing" id="R84-R6-9md"/> + <constraint firstItem="U2b-ro-lTi" firstAttribute="top" secondItem="h0E-47-gXr" secondAttribute="top" id="Ty4-QM-PS5"/> + <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="100" id="Yej-q6-474"/> + <constraint firstItem="v3m-QD-jfx" firstAttribute="leading" secondItem="h0E-47-gXr" secondAttribute="leading" id="od5-BW-13b"/> + <constraint firstItem="8dn-aA-a36" firstAttribute="height" secondItem="h0E-47-gXr" secondAttribute="height" id="qrb-7r-SqL"/> + <constraint firstItem="U2b-ro-lTi" firstAttribute="leading" secondItem="h0E-47-gXr" secondAttribute="leading" id="sFe-v0-IRT"/> + <constraint firstAttribute="trailing" secondItem="v3m-QD-jfx" secondAttribute="trailing" id="xO1-3i-rHi"/> + </constraints> + </view> + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="70" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="Ndm-NH-fr7"> + <rect key="frame" x="16" y="348.66666666666674" width="398" height="495.33333333333326"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <prototypes> + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="PersonCell" rowHeight="70" id="d6y-zZ-Bcr" customClass="PersonViewCell" customModule="FaceRecognition" customModuleProvider="target"> + <rect key="frame" x="0.0" y="50" width="398" height="70"/> + <autoresizingMask key="autoresizingMask"/> + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="d6y-zZ-Bcr" id="AQj-4N-0ne"> + <rect key="frame" x="0.0" y="0.0" width="398" height="70"/> + <autoresizingMask key="autoresizingMask"/> + <subviews> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Xb-or-45I"> + <rect key="frame" x="0.0" y="4" width="398" height="62"/> + <color key="backgroundColor" red="0.14509803921568626" green="0.14509803921568626" blue="0.14509803921568626" alpha="1" colorSpace="calibratedRGB"/> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> + <integer key="value" value="12"/> + </userDefinedRuntimeAttribute> + </userDefinedRuntimeAttributes> + </view> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="8ha-vs-KA5"> + <rect key="frame" x="16" y="10" width="50" height="50"/> + <constraints> + <constraint firstAttribute="height" constant="50" id="BMG-eP-jEp"/> + <constraint firstAttribute="width" constant="50" id="TlU-tA-QC6"/> + </constraints> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> + <integer key="value" value="25"/> + </userDefinedRuntimeAttribute> + </userDefinedRuntimeAttributes> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Person12345" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KRs-Ps-KMF"> + <rect key="frame" x="82" y="24.666666666666671" width="300" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yGt-5d-eUr"> + <rect key="frame" x="328" y="10" width="50" height="50"/> + <constraints> + <constraint firstAttribute="height" constant="50" id="Qlz-XK-hXH"/> + <constraint firstAttribute="width" constant="50" id="WiI-Vk-4SE"/> + </constraints> + <color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <state key="normal" image="trash.fill" catalog="system"/> + <buttonConfiguration key="configuration" style="plain" image="trash.fill" catalog="system"/> + <connections> + <action selector="delete_clicked:" destination="d6y-zZ-Bcr" eventType="touchUpInside" id="OgK-lL-gPb"/> + </connections> + </button> + </subviews> + <constraints> + <constraint firstItem="KRs-Ps-KMF" firstAttribute="leading" secondItem="8ha-vs-KA5" secondAttribute="trailing" constant="16" id="5qw-d4-7vt"/> + <constraint firstAttribute="bottom" secondItem="1Xb-or-45I" secondAttribute="bottom" constant="4" id="HXD-N9-rAD"/> + <constraint firstItem="1Xb-or-45I" firstAttribute="top" secondItem="AQj-4N-0ne" secondAttribute="top" constant="4" id="K6f-dC-3dB"/> + <constraint firstAttribute="trailing" secondItem="1Xb-or-45I" secondAttribute="trailing" id="Ur2-BL-0CT"/> + <constraint firstItem="8ha-vs-KA5" firstAttribute="centerY" secondItem="AQj-4N-0ne" secondAttribute="centerY" id="Yvl-6Z-XMN"/> + <constraint firstAttribute="trailing" secondItem="yGt-5d-eUr" secondAttribute="trailing" constant="20" id="c3S-sJ-TD1"/> + <constraint firstItem="1Xb-or-45I" firstAttribute="leading" secondItem="AQj-4N-0ne" secondAttribute="leading" id="fdc-Ru-eiq"/> + <constraint firstItem="yGt-5d-eUr" firstAttribute="centerY" secondItem="AQj-4N-0ne" secondAttribute="centerY" id="reG-o6-YWM"/> + <constraint firstItem="8ha-vs-KA5" firstAttribute="leading" secondItem="AQj-4N-0ne" secondAttribute="leading" constant="16" id="v2e-7A-7Sf"/> + </constraints> + </tableViewCellContentView> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstAttribute="trailing" secondItem="KRs-Ps-KMF" secondAttribute="trailing" constant="16" id="OK3-yl-9CL"/> + <constraint firstItem="KRs-Ps-KMF" firstAttribute="centerY" secondItem="d6y-zZ-Bcr" secondAttribute="centerY" id="lAb-MS-wrA"/> + </constraints> + <connections> + <outlet property="faceImage" destination="8ha-vs-KA5" id="fJY-PC-hgR"/> + <outlet property="nameLbl" destination="KRs-Ps-KMF" id="WUS-xb-Xkg"/> + </connections> + </tableViewCell> + </prototypes> + </tableView> + <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PzV-cj-xry"> + <rect key="frame" x="16" y="804" width="398" height="40"/> + <color key="backgroundColor" red="0.70196078429999997" green="0.14901960780000001" blue="0.1176470588" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="height" constant="40" id="PHS-zq-zM5"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="16"/> + <color key="textColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <viewLayoutGuide key="safeArea" id="ha3-qY-QiX"/> + <color key="backgroundColor" red="0.10980392160000001" green="0.1058823529" blue="0.1215686275" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="rUB-th-Y8q" firstAttribute="top" secondItem="lvE-za-s8Y" secondAttribute="bottom" constant="16" id="1T7-PH-dcs"/> + <constraint firstItem="krt-Yd-Ofi" firstAttribute="width" secondItem="ha3-qY-QiX" secondAttribute="width" multiplier="0.44" id="3WE-cP-11t"/> + <constraint firstItem="krt-Yd-Ofi" firstAttribute="top" secondItem="m3x-s5-Umi" secondAttribute="bottom" constant="16" id="4OE-ni-gR2"/> + <constraint firstItem="79o-DH-4F2" firstAttribute="top" secondItem="krt-Yd-Ofi" secondAttribute="bottom" constant="16" id="69B-Dg-Xu2"/> + <constraint firstItem="ha3-qY-QiX" firstAttribute="trailing" secondItem="Ndm-NH-fr7" secondAttribute="trailing" constant="16" id="92q-pt-KXe"/> + <constraint firstItem="lvE-za-s8Y" firstAttribute="width" secondItem="ha3-qY-QiX" secondAttribute="width" multiplier="0.44" id="AWA-kB-BpJ"/> + <constraint firstItem="79o-DH-4F2" firstAttribute="width" secondItem="ha3-qY-QiX" secondAttribute="width" multiplier="0.44" id="Dk6-vV-sa1"/> + <constraint firstItem="ha3-qY-QiX" firstAttribute="trailing" secondItem="lvE-za-s8Y" secondAttribute="trailing" constant="16" id="FIG-dN-66K"/> + <constraint firstItem="PzV-cj-xry" firstAttribute="leading" secondItem="ha3-qY-QiX" secondAttribute="leading" constant="16" id="LW2-aD-sl1"/> + <constraint firstItem="ha3-qY-QiX" firstAttribute="bottom" secondItem="h0E-47-gXr" secondAttribute="bottom" id="ONf-TT-Efu"/> + <constraint firstItem="ha3-qY-QiX" firstAttribute="trailing" secondItem="rUB-th-Y8q" secondAttribute="trailing" constant="16" id="PU6-Pd-ekz"/> + <constraint firstItem="h0E-47-gXr" firstAttribute="centerX" secondItem="ha3-qY-QiX" secondAttribute="centerX" id="Sjd-P2-1Ym"/> + <constraint firstItem="h0E-47-gXr" firstAttribute="top" secondItem="PzV-cj-xry" secondAttribute="bottom" constant="4" id="V80-WJ-lZI"/> + <constraint firstItem="Ndm-NH-fr7" firstAttribute="top" secondItem="rUB-th-Y8q" secondAttribute="bottom" constant="16" id="YbA-in-Gdy"/> + <constraint firstItem="rUB-th-Y8q" firstAttribute="width" secondItem="lvE-za-s8Y" secondAttribute="width" id="alA-8N-i5u"/> + <constraint firstItem="NQP-K2-tQX" firstAttribute="leading" secondItem="ha3-qY-QiX" secondAttribute="leading" id="eg5-R3-wcf"/> + <constraint firstItem="79o-DH-4F2" firstAttribute="leading" secondItem="ha3-qY-QiX" secondAttribute="leading" constant="16" id="i2T-Ly-ri1"/> + <constraint firstItem="ha3-qY-QiX" firstAttribute="trailing" secondItem="PzV-cj-xry" secondAttribute="trailing" constant="16" id="m8D-Zo-4fU"/> + <constraint firstItem="lvE-za-s8Y" firstAttribute="top" secondItem="m3x-s5-Umi" secondAttribute="bottom" constant="16" id="n4h-E1-5W4"/> + <constraint firstItem="h0E-47-gXr" firstAttribute="top" secondItem="Ndm-NH-fr7" secondAttribute="bottom" constant="4" id="nYR-gr-chc"/> + <constraint firstItem="NQP-K2-tQX" firstAttribute="top" secondItem="ha3-qY-QiX" secondAttribute="top" id="q5C-xp-Uke"/> + <constraint firstItem="ha3-qY-QiX" firstAttribute="trailing" secondItem="NQP-K2-tQX" secondAttribute="trailing" id="r6U-l5-mfv"/> + <constraint firstItem="m3x-s5-Umi" firstAttribute="top" secondItem="NQP-K2-tQX" secondAttribute="bottom" constant="16" id="rVd-fC-Z5n"/> + <constraint firstItem="Ndm-NH-fr7" firstAttribute="leading" secondItem="ha3-qY-QiX" secondAttribute="leading" constant="16" id="vjF-73-utj"/> + <constraint firstItem="m3x-s5-Umi" firstAttribute="leading" secondItem="ha3-qY-QiX" secondAttribute="leading" constant="16" id="wsj-ok-jDm"/> + <constraint firstItem="ha3-qY-QiX" firstAttribute="trailing" secondItem="m3x-s5-Umi" secondAttribute="trailing" constant="16" id="xFI-pL-XQ7"/> + <constraint firstItem="krt-Yd-Ofi" firstAttribute="leading" secondItem="ha3-qY-QiX" secondAttribute="leading" constant="16" id="zqS-X9-NBX"/> + </constraints> + </view> + <connections> + <outlet property="aboutBtnView" destination="rUB-th-Y8q" id="V5t-PH-EIA"/> + <outlet property="enrollBtnView" destination="krt-Yd-Ofi" id="KBC-Ux-Raf"/> + <outlet property="identifyBtnView" destination="lvE-za-s8Y" id="I4R-9a-s2D"/> + <outlet property="personView" destination="Ndm-NH-fr7" id="lgz-3L-Les"/> + <outlet property="settingsBtnView" destination="79o-DH-4F2" id="q2a-IV-k0m"/> + <outlet property="warningLbl" destination="PzV-cj-xry" id="7rr-4q-VM4"/> + <segue destination="hlA-Xo-aM2" kind="show" identifier="camera" id="Mle-Vt-nxy"/> + <segue destination="4SV-lz-23f" kind="show" identifier="settings" id="nYT-tJ-jvT"/> + <segue destination="ZAF-R8-VYW" kind="show" identifier="about" id="GU4-GB-mJu"/> + </connections> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="buF-Os-G7S" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="-411.4503816793893" y="-46.478873239436624"/> + </scene> + <!--Camera View Controller--> + <scene sceneID="z9k-Ao-Arb"> + <objects> + <viewController id="hlA-Xo-aM2" customClass="CameraViewController" customModule="FaceRecognition" customModuleProvider="target" sceneMemberID="viewController"> + <view key="view" contentMode="scaleToFill" id="qYU-05-UCt"> + <rect key="frame" x="0.0" y="0.0" width="430" height="863"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Vb4-EH-4e5"> + <rect key="frame" x="89" y="251" width="393" height="759"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <color key="backgroundColor" systemColor="systemBackgroundColor"/> + </view> + <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CJx-3Q-9hf" customClass="FaceView" customModule="FaceRecognition" customModuleProvider="target"> + <rect key="frame" x="-16" y="-10" width="393" height="759"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + </view> + <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="V4n-s8-elR"> + <rect key="frame" x="0.0" y="59" width="430" height="804"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Identify Result" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1FB-CO-NoF"> + <rect key="frame" x="0.0" y="10" width="430" height="70"/> + <constraints> + <constraint firstAttribute="height" constant="70" id="OZ5-bS-jhF"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="24"/> + <color key="textColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ubV-ya-WVh"> + <rect key="frame" x="30" y="109.99999999999999" width="180.66666666666666" height="180.66666666666663"/> + <constraints> + <constraint firstAttribute="width" secondItem="ubV-ya-WVh" secondAttribute="height" multiplier="1:1" id="fJo-Ip-ULl"/> + </constraints> + </imageView> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="j7e-jl-qdB"> + <rect key="frame" x="219.33333333333337" y="109.99999999999999" width="180.66666666666663" height="180.66666666666663"/> + <constraints> + <constraint firstAttribute="width" secondItem="j7e-jl-qdB" secondAttribute="height" multiplier="1:1" id="hru-C0-FtQ"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enrolled" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1j2-Vq-5pB"> + <rect key="frame" x="30" y="298.66666666666669" width="180.66666666666666" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="pfm-BB-CWM"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" name="clr_text"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Identified" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="onp-MH-F2T"> + <rect key="frame" x="219.33333333333337" y="298.66666666666669" width="180.66666666666663" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="3Bv-9P-Fhj"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" name="clr_text"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Pcj-Jt-MzA"> + <rect key="frame" x="375" y="0.0" width="50" height="50"/> + <constraints> + <constraint firstAttribute="height" constant="50" id="9uZ-Tu-Hpd"/> + <constraint firstAttribute="width" secondItem="Pcj-Jt-MzA" secondAttribute="height" multiplier="1:1" id="EI5-g0-PW0"/> + <constraint firstAttribute="width" constant="50" id="zvz-nK-a2Q"/> + </constraints> + <color key="tintColor" red="0.54901960780000003" green="0.1137254902" blue="0.094117647060000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <size key="titleShadowOffset" width="2" height="2"/> + <state key="normal" image="xmark.app.fill" catalog="system"/> + <connections> + <action selector="done_clicked:" destination="4SV-lz-23f" eventType="touchUpInside" id="Z2J-Lg-MzT"/> + <action selector="done_clicked:" destination="hlA-Xo-aM2" eventType="touchUpInside" id="pBc-Qu-SOx"/> + </connections> + </button> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Identified: Person1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="j1W-Tq-AMY"> + <rect key="frame" x="16" y="362.66666666666669" width="398" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="kd2-D5-NJf"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" name="clr_text"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Similarity: 0.83" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mRw-ba-wZF"> + <rect key="frame" x="16" y="398.66666666666669" width="398" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="MDC-XS-EJF"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" name="clr_text"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Liveness Score: 0.83" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xo9-4Y-lcY"> + <rect key="frame" x="16" y="438.66666666666669" width="398" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="l7O-2g-2Uo"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" name="clr_text"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Yaw: " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yeq-uQ-zGg"> + <rect key="frame" x="16" y="474.66666666666663" width="398" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="Fby-B5-bvB"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" name="clr_text"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Roll:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gQY-jW-7Yk"> + <rect key="frame" x="16" y="515" width="39.666666666666657" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="6mv-8l-NKA"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" name="clr_text"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Pitch:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iah-UI-ABg"> + <rect key="frame" x="16" y="546.66666666666663" width="398" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="GyF-WD-Mbu"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="17"/> + <color key="textColor" name="clr_text"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <color key="backgroundColor" name="clr_bg"/> + <constraints> + <constraint firstAttribute="trailing" secondItem="mRw-ba-wZF" secondAttribute="trailing" constant="16" id="3Lu-at-loi"/> + <constraint firstItem="1j2-Vq-5pB" firstAttribute="top" secondItem="ubV-ya-WVh" secondAttribute="bottom" constant="8" id="4sQ-iM-A1J"/> + <constraint firstItem="gQY-jW-7Yk" firstAttribute="leading" secondItem="V4n-s8-elR" secondAttribute="leading" constant="16" id="5FM-tt-2zj"/> + <constraint firstItem="j7e-jl-qdB" firstAttribute="top" secondItem="ubV-ya-WVh" secondAttribute="top" id="79J-cf-7m8"/> + <constraint firstItem="onp-MH-F2T" firstAttribute="top" secondItem="j7e-jl-qdB" secondAttribute="bottom" constant="8" id="8fb-jL-gJ8"/> + <constraint firstItem="onp-MH-F2T" firstAttribute="leading" secondItem="j7e-jl-qdB" secondAttribute="leading" id="9Sb-SK-BAg"/> + <constraint firstItem="ubV-ya-WVh" firstAttribute="leading" secondItem="V4n-s8-elR" secondAttribute="leading" constant="30" id="9c4-2o-oUl"/> + <constraint firstItem="1FB-CO-NoF" firstAttribute="top" secondItem="V4n-s8-elR" secondAttribute="top" constant="10" id="E07-J1-Tso"/> + <constraint firstItem="yeq-uQ-zGg" firstAttribute="leading" secondItem="V4n-s8-elR" secondAttribute="leading" constant="16" id="EfD-l9-a8Z"/> + <constraint firstItem="1FB-CO-NoF" firstAttribute="leading" secondItem="V4n-s8-elR" secondAttribute="leading" id="FMI-n2-6qi"/> + <constraint firstItem="gQY-jW-7Yk" firstAttribute="top" secondItem="yeq-uQ-zGg" secondAttribute="bottom" constant="12" id="IBc-2h-uCv"/> + <constraint firstItem="Pcj-Jt-MzA" firstAttribute="top" secondItem="V4n-s8-elR" secondAttribute="top" id="IJu-qS-Red"/> + <constraint firstAttribute="trailing" secondItem="gQY-jW-7Yk" secondAttribute="trailing" constant="16" id="Ldo-6T-Pju"/> + <constraint firstItem="Xo9-4Y-lcY" firstAttribute="top" secondItem="mRw-ba-wZF" secondAttribute="bottom" constant="16" id="NrL-A2-QkO"/> + <constraint firstItem="j7e-jl-qdB" firstAttribute="width" secondItem="j7e-jl-qdB" secondAttribute="height" multiplier="1:1" id="Rhq-x0-yV5"/> + <constraint firstItem="1j2-Vq-5pB" firstAttribute="leading" secondItem="ubV-ya-WVh" secondAttribute="leading" id="Rhw-09-h1k"/> + <constraint firstItem="Xo9-4Y-lcY" firstAttribute="leading" secondItem="V4n-s8-elR" secondAttribute="leading" constant="16" id="YNl-51-dZ3"/> + <constraint firstAttribute="trailing" secondItem="j1W-Tq-AMY" secondAttribute="trailing" constant="16" id="Yly-ER-6VO"/> + <constraint firstItem="iah-UI-ABg" firstAttribute="leading" secondItem="V4n-s8-elR" secondAttribute="leading" constant="16" id="aFI-rf-PXg"/> + <constraint firstAttribute="trailing" secondItem="Pcj-Jt-MzA" secondAttribute="trailing" constant="5" id="aaw-P4-aU1"/> + <constraint firstItem="iah-UI-ABg" firstAttribute="top" secondItem="gQY-jW-7Yk" secondAttribute="bottom" constant="12" id="aju-GX-itM"/> + <constraint firstItem="j1W-Tq-AMY" firstAttribute="top" secondItem="1j2-Vq-5pB" secondAttribute="bottom" constant="40" id="alY-mE-fol"/> + <constraint firstItem="mRw-ba-wZF" firstAttribute="leading" secondItem="V4n-s8-elR" secondAttribute="leading" constant="16" id="bN4-6Y-j30"/> + <constraint firstItem="j7e-jl-qdB" firstAttribute="width" secondItem="V4n-s8-elR" secondAttribute="width" multiplier="0.42" id="dvO-e5-uJz"/> + <constraint firstItem="j1W-Tq-AMY" firstAttribute="leading" secondItem="V4n-s8-elR" secondAttribute="leading" constant="16" id="eUc-ob-Ziv"/> + <constraint firstItem="yeq-uQ-zGg" firstAttribute="top" secondItem="Xo9-4Y-lcY" secondAttribute="bottom" constant="12" id="f4e-8q-d6v"/> + <constraint firstItem="ubV-ya-WVh" firstAttribute="width" secondItem="V4n-s8-elR" secondAttribute="width" multiplier="0.42" id="g7h-aG-yOp"/> + <constraint firstAttribute="trailing" secondItem="j7e-jl-qdB" secondAttribute="trailing" constant="30" id="gRc-Oo-qOE"/> + <constraint firstAttribute="trailing" secondItem="1FB-CO-NoF" secondAttribute="trailing" id="h6Z-Cw-IjC"/> + <constraint firstItem="1j2-Vq-5pB" firstAttribute="trailing" secondItem="ubV-ya-WVh" secondAttribute="trailing" id="hwa-db-f3q"/> + <constraint firstItem="ubV-ya-WVh" firstAttribute="top" secondItem="1FB-CO-NoF" secondAttribute="bottom" constant="30" id="iRy-ep-VJI"/> + <constraint firstAttribute="trailing" secondItem="yeq-uQ-zGg" secondAttribute="trailing" constant="16" id="lxx-I6-EjM"/> + <constraint firstAttribute="trailing" secondItem="Xo9-4Y-lcY" secondAttribute="trailing" constant="16" id="m55-Pw-u8W"/> + <constraint firstItem="onp-MH-F2T" firstAttribute="trailing" secondItem="j7e-jl-qdB" secondAttribute="trailing" id="rOL-GQ-Vi1"/> + <constraint firstItem="j1W-Tq-AMY" firstAttribute="bottom" secondItem="mRw-ba-wZF" secondAttribute="top" constant="-12" id="uZn-7j-d06"/> + <constraint firstAttribute="trailing" secondItem="iah-UI-ABg" secondAttribute="trailing" constant="16" id="yvb-Ac-hqf"/> + </constraints> + </view> + </subviews> + <viewLayoutGuide key="safeArea" id="lb9-6F-LvI"/> + <color key="backgroundColor" red="0.19215686269999999" green="0.18823529410000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="V4n-s8-elR" firstAttribute="top" secondItem="lb9-6F-LvI" secondAttribute="top" id="4zF-Bd-zul"/> + <constraint firstItem="lb9-6F-LvI" firstAttribute="trailing" secondItem="V4n-s8-elR" secondAttribute="trailing" id="6m3-QP-dbD"/> + <constraint firstItem="V4n-s8-elR" firstAttribute="leading" secondItem="lb9-6F-LvI" secondAttribute="leading" id="KFb-xJ-CVj"/> + <constraint firstItem="lb9-6F-LvI" firstAttribute="bottom" secondItem="V4n-s8-elR" secondAttribute="bottom" id="TAx-WM-JSr"/> + </constraints> + </view> + <navigationItem key="navigationItem" id="DMG-Zf-DMF"/> + <connections> + <outlet property="cameraView" destination="Vb4-EH-4e5" id="fZB-u6-3Pr"/> + <outlet property="enrolledImage" destination="ubV-ya-WVh" id="R2f-S6-h6W"/> + <outlet property="faceView" destination="CJx-3Q-9hf" id="Sbv-ol-IAA"/> + <outlet property="identifiedImage" destination="j7e-jl-qdB" id="L1g-9d-Zdn"/> + <outlet property="identifiedLbl" destination="j1W-Tq-AMY" id="Wqm-4R-hs2"/> + <outlet property="livenessLbl" destination="Xo9-4Y-lcY" id="aI9-h2-ixC"/> + <outlet property="pitchLbl" destination="iah-UI-ABg" id="lId-QA-Xkb"/> + <outlet property="resultView" destination="V4n-s8-elR" id="Eyj-az-I3k"/> + <outlet property="rollLbl" destination="gQY-jW-7Yk" id="7gr-Jj-phT"/> + <outlet property="similarityLbl" destination="mRw-ba-wZF" id="PQj-xg-Po1"/> + <outlet property="yawLbl" destination="yeq-uQ-zGg" id="CRE-mp-nEJ"/> + </connections> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="ER4-IA-00Q" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="649.61832061068696" y="-46.478873239436624"/> + </scene> + <!--Settings View Controller--> + <scene sceneID="TSq-ca-M0h"> + <objects> + <viewController id="4SV-lz-23f" customClass="SettingsViewController" customModule="FaceRecognition" customModuleProvider="target" sceneMemberID="viewController"> + <view key="view" contentMode="scaleToFill" id="Ede-Ax-fSg"> + <rect key="frame" x="0.0" y="0.0" width="430" height="863"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Settings" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w7V-Em-lph"> + <rect key="frame" x="0.0" y="69" width="430" height="70"/> + <constraints> + <constraint firstAttribute="height" constant="70" id="0ce-kp-oaZ"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="24"/> + <color key="textColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BUO-La-mfo"> + <rect key="frame" x="375" y="59" width="50" height="50"/> + <constraints> + <constraint firstAttribute="width" constant="50" id="EvM-NQ-D0X"/> + <constraint firstAttribute="width" secondItem="BUO-La-mfo" secondAttribute="height" multiplier="1:1" id="LwI-3t-ZqK"/> + <constraint firstAttribute="height" constant="50" id="MHm-Ct-4eA"/> + </constraints> + <color key="tintColor" red="0.54901960780000003" green="0.1137254902" blue="0.094117647060000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <size key="titleShadowOffset" width="2" height="2"/> + <state key="normal" image="xmark.app.fill" catalog="system"/> + <connections> + <action selector="done_clicked:" destination="4SV-lz-23f" eventType="touchUpInside" id="h2i-f3-2nD"/> + </connections> + </button> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="791-mm-gDd"> + <rect key="frame" x="16" y="147" width="398" height="112"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="camera.aperture" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="dyD-gC-Iee"> + <rect key="frame" x="16" y="17" width="24" height="22.666666666666671"/> + <color key="tintColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="calibratedRGB"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="KVG-OQ-loP"/> + <constraint firstAttribute="width" constant="24" id="Kt0-rs-Dey"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Camera" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="br8-15-3ZV"> + <rect key="frame" x="56" y="8" width="342" height="40"/> + <constraints> + <constraint firstAttribute="height" constant="40" id="31Y-mk-g3n"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="16"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ypX-Ug-zHL"> + <rect key="frame" x="16" y="48" width="366" height="1"/> + <color key="backgroundColor" white="0.30827627169999999" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstAttribute="height" constant="1" id="IdI-ZU-C8p"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yy1-VH-GBJ"> + <rect key="frame" x="0.0" y="48" width="398" height="56"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Camera Lens" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dac-hd-Xou"> + <rect key="frame" x="56" y="8" width="90" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="bZg-q1-q6g"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Front" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="g3u-c4-acA"> + <rect key="frame" x="56" y="32" width="90" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="ZCd-I9-egD"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="13"/> + <color key="textColor" red="0.57647058819999997" green="0.56078431370000004" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="A4e-As-Gsr"> + <rect key="frame" x="325" y="12.666666666666657" width="51" height="31"/> + <constraints> + <constraint firstAttribute="height" constant="31" id="OFp-Bd-dyM"/> + <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="45" id="XCx-dV-0Jv"/> + </constraints> + <connections> + <action selector="cameraLens_switch:" destination="4SV-lz-23f" eventType="valueChanged" id="a7F-AP-P1B"/> + </connections> + </switch> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstAttribute="bottom" secondItem="g3u-c4-acA" secondAttribute="bottom" id="1CV-iV-HqE"/> + <constraint firstItem="g3u-c4-acA" firstAttribute="leading" secondItem="dac-hd-Xou" secondAttribute="leading" id="Chj-gC-E4Y"/> + <constraint firstItem="g3u-c4-acA" firstAttribute="top" secondItem="dac-hd-Xou" secondAttribute="bottom" id="Ipp-bg-INV"/> + <constraint firstItem="g3u-c4-acA" firstAttribute="trailing" secondItem="dac-hd-Xou" secondAttribute="trailing" id="Mtn-Tg-57h"/> + <constraint firstItem="A4e-As-Gsr" firstAttribute="centerY" secondItem="yy1-VH-GBJ" secondAttribute="centerY" id="PJw-2i-4z0"/> + <constraint firstItem="dac-hd-Xou" firstAttribute="top" secondItem="yy1-VH-GBJ" secondAttribute="top" constant="8" id="Wy1-nv-FVq"/> + <constraint firstItem="dac-hd-Xou" firstAttribute="leading" secondItem="yy1-VH-GBJ" secondAttribute="leading" constant="56" id="i8n-Vp-33K"/> + <constraint firstAttribute="trailing" secondItem="A4e-As-Gsr" secondAttribute="trailing" constant="24" id="shC-gk-JBz"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" red="0.19215686269999999" green="0.18823529410000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="dyD-gC-Iee" firstAttribute="centerY" secondItem="br8-15-3ZV" secondAttribute="centerY" id="4iA-K4-Nwo"/> + <constraint firstAttribute="trailing" secondItem="br8-15-3ZV" secondAttribute="trailing" id="8pR-v9-GMp"/> + <constraint firstItem="ypX-Ug-zHL" firstAttribute="top" secondItem="br8-15-3ZV" secondAttribute="bottom" id="BqG-SZ-aav"/> + <constraint firstAttribute="trailing" secondItem="yy1-VH-GBJ" secondAttribute="trailing" id="C04-Gl-gXf"/> + <constraint firstItem="yy1-VH-GBJ" firstAttribute="leading" secondItem="791-mm-gDd" secondAttribute="leading" id="E3F-iZ-Tn3"/> + <constraint firstItem="ypX-Ug-zHL" firstAttribute="leading" secondItem="791-mm-gDd" secondAttribute="leading" constant="16" id="HY3-bE-m9p"/> + <constraint firstAttribute="trailing" secondItem="ypX-Ug-zHL" secondAttribute="trailing" constant="16" id="ZpO-V6-FWM"/> + <constraint firstAttribute="bottom" secondItem="yy1-VH-GBJ" secondAttribute="bottom" constant="8" id="Zte-eN-cKX"/> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" id="cyG-S5-0ef"/> + <constraint firstItem="yy1-VH-GBJ" firstAttribute="top" secondItem="ypX-Ug-zHL" secondAttribute="top" id="gHX-Bs-k47"/> + <constraint firstItem="br8-15-3ZV" firstAttribute="top" secondItem="791-mm-gDd" secondAttribute="top" constant="8" id="lrd-1S-dxl"/> + <constraint firstItem="dyD-gC-Iee" firstAttribute="leading" secondItem="791-mm-gDd" secondAttribute="leading" constant="16" id="nab-3z-fcf"/> + <constraint firstItem="br8-15-3ZV" firstAttribute="leading" secondItem="dyD-gC-Iee" secondAttribute="trailing" constant="16" id="psQ-dG-gaA"/> + </constraints> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> + <integer key="value" value="12"/> + </userDefinedRuntimeAttribute> + </userDefinedRuntimeAttributes> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="osA-8u-FdT"> + <rect key="frame" x="16" y="275" width="398" height="164"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="person.2.badge.gearshape.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="9Sr-Jr-NVT"> + <rect key="frame" x="15.999999999999998" y="18" width="26.333333333333329" height="23.666666666666671"/> + <color key="tintColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="calibratedRGB"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="oui-av-YNJ"/> + <constraint firstAttribute="width" constant="24" id="vQS-vg-g9D"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Thresholds" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Wj-as-Wl0"> + <rect key="frame" x="56" y="8" width="342" height="40"/> + <constraints> + <constraint firstAttribute="height" constant="40" id="bqy-xR-GQN"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="16"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nMv-NO-fSP"> + <rect key="frame" x="16" y="48" width="366" height="1"/> + <color key="backgroundColor" white="0.30827627169999999" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstAttribute="height" constant="1" id="feH-sM-hhk"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="k00-qR-bsN"> + <rect key="frame" x="0.0" y="48" width="398" height="56"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Liveness threshold" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5In-Kc-DYE"> + <rect key="frame" x="56" y="8" width="128.66666666666666" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="fHu-Dq-1As"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0.7" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wzw-oR-SAX"> + <rect key="frame" x="56" y="32" width="128.66666666666666" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="9bz-7X-vae"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="13"/> + <color key="textColor" red="0.57647058819999997" green="0.56078431370000004" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="N4z-Uy-fUd"> + <rect key="frame" x="0.0" y="0.0" width="398" height="56"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="livenessThreshold_clicked:" destination="4SV-lz-23f" eventType="touchUpInside" id="ZpM-1l-HH0"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="5In-Kc-DYE" firstAttribute="top" secondItem="k00-qR-bsN" secondAttribute="top" constant="8" id="6C1-OI-hFI"/> + <constraint firstItem="5In-Kc-DYE" firstAttribute="leading" secondItem="k00-qR-bsN" secondAttribute="leading" constant="56" id="Dxa-Z8-upy"/> + <constraint firstItem="N4z-Uy-fUd" firstAttribute="leading" secondItem="k00-qR-bsN" secondAttribute="leading" id="FUV-Qq-Xo2"/> + <constraint firstAttribute="trailing" secondItem="N4z-Uy-fUd" secondAttribute="trailing" id="Tfo-Dk-uTO"/> + <constraint firstItem="Wzw-oR-SAX" firstAttribute="trailing" secondItem="5In-Kc-DYE" secondAttribute="trailing" id="X5n-cs-92J"/> + <constraint firstAttribute="bottom" secondItem="Wzw-oR-SAX" secondAttribute="bottom" id="YFV-00-DAI"/> + <constraint firstAttribute="bottom" secondItem="N4z-Uy-fUd" secondAttribute="bottom" id="ZHw-k9-grd"/> + <constraint firstItem="Wzw-oR-SAX" firstAttribute="top" secondItem="5In-Kc-DYE" secondAttribute="bottom" id="bVJ-28-OG6"/> + <constraint firstItem="Wzw-oR-SAX" firstAttribute="leading" secondItem="5In-Kc-DYE" secondAttribute="leading" id="fHQ-YK-2IY"/> + <constraint firstItem="N4z-Uy-fUd" firstAttribute="top" secondItem="k00-qR-bsN" secondAttribute="top" id="zHb-9t-wgt"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MKu-cB-bnj"> + <rect key="frame" x="0.0" y="104" width="398" height="56"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Identify threshold" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h32-0R-B43"> + <rect key="frame" x="55.999999999999993" y="8" width="120.33333333333331" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="dRs-Vf-73e"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0.8" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uoz-F1-YQF"> + <rect key="frame" x="55.999999999999993" y="32" width="120.33333333333331" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="UwA-BL-hkp"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="13"/> + <color key="textColor" red="0.57647058819999997" green="0.56078431370000004" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jVn-a9-Jf7"> + <rect key="frame" x="0.0" y="0.0" width="398" height="56"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="identifyThreshold_clicked:" destination="4SV-lz-23f" eventType="touchUpInside" id="hms-Ru-2T6"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="uoz-F1-YQF" firstAttribute="trailing" secondItem="h32-0R-B43" secondAttribute="trailing" id="6Jv-ff-VFe"/> + <constraint firstItem="h32-0R-B43" firstAttribute="leading" secondItem="MKu-cB-bnj" secondAttribute="leading" constant="56" id="6yw-CR-UgE"/> + <constraint firstItem="uoz-F1-YQF" firstAttribute="leading" secondItem="h32-0R-B43" secondAttribute="leading" id="HHT-at-m4A"/> + <constraint firstItem="uoz-F1-YQF" firstAttribute="top" secondItem="h32-0R-B43" secondAttribute="bottom" id="JCF-qk-TIQ"/> + <constraint firstItem="jVn-a9-Jf7" firstAttribute="top" secondItem="MKu-cB-bnj" secondAttribute="top" id="TfV-Mf-n1b"/> + <constraint firstItem="jVn-a9-Jf7" firstAttribute="leading" secondItem="MKu-cB-bnj" secondAttribute="leading" id="YkI-sN-zQd"/> + <constraint firstItem="h32-0R-B43" firstAttribute="top" secondItem="MKu-cB-bnj" secondAttribute="top" constant="8" id="cIU-BC-YHM"/> + <constraint firstAttribute="bottom" secondItem="jVn-a9-Jf7" secondAttribute="bottom" id="mxB-H4-gHD"/> + <constraint firstAttribute="trailing" secondItem="jVn-a9-Jf7" secondAttribute="trailing" id="wK6-HU-Gjg"/> + <constraint firstAttribute="bottom" secondItem="uoz-F1-YQF" secondAttribute="bottom" id="zLK-pI-zwZ"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" red="0.19215686269999999" green="0.18823529410000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="MKu-cB-bnj" firstAttribute="leading" secondItem="osA-8u-FdT" secondAttribute="leading" id="4dg-qw-35o"/> + <constraint firstItem="nMv-NO-fSP" firstAttribute="leading" secondItem="osA-8u-FdT" secondAttribute="leading" constant="16" id="8Cu-gU-2f1"/> + <constraint firstItem="k00-qR-bsN" firstAttribute="leading" secondItem="osA-8u-FdT" secondAttribute="leading" id="8yF-bT-eHa"/> + <constraint firstAttribute="trailing" secondItem="MKu-cB-bnj" secondAttribute="trailing" id="Ns9-m9-5Z5"/> + <constraint firstAttribute="trailing" secondItem="k00-qR-bsN" secondAttribute="trailing" id="Pfa-04-9bf"/> + <constraint firstItem="9Sr-Jr-NVT" firstAttribute="centerY" secondItem="0Wj-as-Wl0" secondAttribute="centerY" id="RGO-l4-cdH"/> + <constraint firstItem="nMv-NO-fSP" firstAttribute="top" secondItem="0Wj-as-Wl0" secondAttribute="bottom" id="Ssi-7c-PwM"/> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" id="f9K-rR-UDb"/> + <constraint firstItem="k00-qR-bsN" firstAttribute="top" secondItem="nMv-NO-fSP" secondAttribute="top" id="fPU-uv-Oab"/> + <constraint firstAttribute="trailing" secondItem="nMv-NO-fSP" secondAttribute="trailing" constant="16" id="fXa-ur-bAx"/> + <constraint firstAttribute="trailing" secondItem="0Wj-as-Wl0" secondAttribute="trailing" id="ghK-o9-4lf"/> + <constraint firstItem="k00-qR-bsN" firstAttribute="bottom" secondItem="MKu-cB-bnj" secondAttribute="top" id="iHT-g1-Toh"/> + <constraint firstItem="0Wj-as-Wl0" firstAttribute="top" secondItem="osA-8u-FdT" secondAttribute="top" constant="8" id="ri9-Xr-3hp"/> + <constraint firstAttribute="bottom" secondItem="MKu-cB-bnj" secondAttribute="bottom" constant="4" id="yWL-oa-jAH"/> + <constraint firstItem="0Wj-as-Wl0" firstAttribute="leading" secondItem="9Sr-Jr-NVT" secondAttribute="trailing" constant="16" id="yeF-Bm-T5X"/> + <constraint firstItem="9Sr-Jr-NVT" firstAttribute="leading" secondItem="osA-8u-FdT" secondAttribute="leading" constant="16" id="zGk-yd-jbr"/> + </constraints> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> + <integer key="value" value="12"/> + </userDefinedRuntimeAttribute> + </userDefinedRuntimeAttributes> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wYk-XW-PFq"> + <rect key="frame" x="16" y="455" width="398" height="136"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="arrow.triangle.2.circlepath" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="q81-2d-S70"> + <rect key="frame" x="16" y="17" width="24" height="22.666666666666671"/> + <color key="tintColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="calibratedRGB"/> + <constraints> + <constraint firstAttribute="width" constant="24" id="3fc-OD-rnp"/> + <constraint firstAttribute="height" constant="24" id="h50-2u-hN7"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Reset" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hi1-Eu-18Y"> + <rect key="frame" x="56" y="8" width="342" height="40"/> + <constraints> + <constraint firstAttribute="height" constant="40" id="u1Q-7p-LMl"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="16"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dqE-CR-yBz"> + <rect key="frame" x="16" y="48" width="366" height="1"/> + <color key="backgroundColor" white="0.30827627169999999" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstAttribute="height" constant="1" id="1Ab-6H-Tmx"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2eb-C2-wOs"> + <rect key="frame" x="0.0" y="48" width="398" height="48"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Restore default settings" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QoX-UU-Ftf"> + <rect key="frame" x="56.000000000000014" y="8" width="163.33333333333337" height="32"/> + <constraints> + <constraint firstAttribute="height" constant="32" id="y9a-8H-TmA"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6Lf-Eh-5KO"> + <rect key="frame" x="0.0" y="0.0" width="398" height="48"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="restore_settings_clicked:" destination="4SV-lz-23f" eventType="touchUpInside" id="vJg-28-KXU"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstAttribute="trailing" secondItem="6Lf-Eh-5KO" secondAttribute="trailing" id="6Bi-um-AtG"/> + <constraint firstAttribute="bottom" secondItem="QoX-UU-Ftf" secondAttribute="bottom" constant="8" id="7An-xj-YeZ"/> + <constraint firstItem="6Lf-Eh-5KO" firstAttribute="top" secondItem="2eb-C2-wOs" secondAttribute="top" id="LTs-Lc-Agu"/> + <constraint firstItem="6Lf-Eh-5KO" firstAttribute="leading" secondItem="2eb-C2-wOs" secondAttribute="leading" id="MEM-P6-zNx"/> + <constraint firstAttribute="bottom" secondItem="6Lf-Eh-5KO" secondAttribute="bottom" id="ji2-7v-CwL"/> + <constraint firstItem="QoX-UU-Ftf" firstAttribute="leading" secondItem="2eb-C2-wOs" secondAttribute="leading" constant="56" id="pUJ-d2-eO6"/> + <constraint firstItem="QoX-UU-Ftf" firstAttribute="top" secondItem="2eb-C2-wOs" secondAttribute="top" constant="8" id="wRt-3w-Eid"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Nta-FW-dCR"> + <rect key="frame" x="0.0" y="96" width="398" height="40"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Clear all person" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q8V-kX-TKH"> + <rect key="frame" x="56.000000000000007" y="8" width="106.66666666666669" height="24"/> + <constraints> + <constraint firstAttribute="height" constant="24" id="WyC-va-tbu"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kIz-Om-vMm"> + <rect key="frame" x="0.0" y="0.0" width="398" height="40"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="clear_all_person_clicked:" destination="4SV-lz-23f" eventType="touchUpInside" id="xIX-lI-Blk"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstAttribute="bottom" secondItem="kIz-Om-vMm" secondAttribute="bottom" id="552-6r-xmm"/> + <constraint firstAttribute="trailing" secondItem="kIz-Om-vMm" secondAttribute="trailing" id="6ho-ie-HEo"/> + <constraint firstItem="kIz-Om-vMm" firstAttribute="leading" secondItem="Nta-FW-dCR" secondAttribute="leading" id="N80-DA-MO3"/> + <constraint firstItem="Q8V-kX-TKH" firstAttribute="top" secondItem="Nta-FW-dCR" secondAttribute="top" constant="8" id="bAv-ve-zbx"/> + <constraint firstAttribute="bottom" secondItem="Q8V-kX-TKH" secondAttribute="bottom" constant="8" id="bf4-yx-5lU"/> + <constraint firstItem="kIz-Om-vMm" firstAttribute="top" secondItem="Nta-FW-dCR" secondAttribute="top" id="oiQ-V2-TZA"/> + <constraint firstItem="Q8V-kX-TKH" firstAttribute="leading" secondItem="Nta-FW-dCR" secondAttribute="leading" constant="56" id="pkk-wO-4nH"/> + </constraints> + </view> + </subviews> + <color key="backgroundColor" red="0.19215686269999999" green="0.18823529410000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="trailing" secondItem="hi1-Eu-18Y" secondAttribute="trailing" id="4NP-ZA-bU9"/> + <constraint firstItem="dqE-CR-yBz" firstAttribute="leading" secondItem="wYk-XW-PFq" secondAttribute="leading" constant="16" id="4c6-tR-A7S"/> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" id="7xF-WK-v1n"/> + <constraint firstItem="q81-2d-S70" firstAttribute="centerY" secondItem="hi1-Eu-18Y" secondAttribute="centerY" id="Vrc-1j-rmi"/> + <constraint firstAttribute="bottom" secondItem="Nta-FW-dCR" secondAttribute="bottom" id="YyF-qq-xIi"/> + <constraint firstItem="2eb-C2-wOs" firstAttribute="leading" secondItem="wYk-XW-PFq" secondAttribute="leading" id="cG7-hi-vJj"/> + <constraint firstItem="2eb-C2-wOs" firstAttribute="top" secondItem="dqE-CR-yBz" secondAttribute="top" id="g6t-3z-meD"/> + <constraint firstItem="hi1-Eu-18Y" firstAttribute="leading" secondItem="q81-2d-S70" secondAttribute="trailing" constant="16" id="j83-Hk-XPc"/> + <constraint firstAttribute="trailing" secondItem="dqE-CR-yBz" secondAttribute="trailing" constant="16" id="r5Z-N2-ouB"/> + <constraint firstItem="hi1-Eu-18Y" firstAttribute="top" secondItem="wYk-XW-PFq" secondAttribute="top" constant="8" id="rPa-yd-chl"/> + <constraint firstItem="q81-2d-S70" firstAttribute="leading" secondItem="wYk-XW-PFq" secondAttribute="leading" constant="16" id="uve-d0-qFb"/> + <constraint firstAttribute="trailing" secondItem="Nta-FW-dCR" secondAttribute="trailing" id="vQG-du-aoN"/> + <constraint firstItem="2eb-C2-wOs" firstAttribute="bottom" secondItem="Nta-FW-dCR" secondAttribute="top" id="vvW-TL-vDP"/> + <constraint firstItem="Nta-FW-dCR" firstAttribute="leading" secondItem="wYk-XW-PFq" secondAttribute="leading" id="wRl-CD-DM5"/> + <constraint firstItem="dqE-CR-yBz" firstAttribute="top" secondItem="hi1-Eu-18Y" secondAttribute="bottom" id="yFk-tk-lLe"/> + <constraint firstAttribute="trailing" secondItem="2eb-C2-wOs" secondAttribute="trailing" id="z31-No-fJe"/> + </constraints> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> + <integer key="value" value="12"/> + </userDefinedRuntimeAttribute> + </userDefinedRuntimeAttributes> + </view> + </subviews> + <viewLayoutGuide key="safeArea" id="w3C-eo-32L"/> + <color key="backgroundColor" red="0.10980392160000001" green="0.1058823529" blue="0.1215686275" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="791-mm-gDd" firstAttribute="leading" secondItem="w3C-eo-32L" secondAttribute="leading" constant="16" id="Cyn-w9-iP2"/> + <constraint firstItem="osA-8u-FdT" firstAttribute="leading" secondItem="w3C-eo-32L" secondAttribute="leading" constant="16" id="H0j-iE-eNQ"/> + <constraint firstItem="w3C-eo-32L" firstAttribute="trailing" secondItem="BUO-La-mfo" secondAttribute="trailing" constant="5" id="JEH-Vl-K2r"/> + <constraint firstItem="wYk-XW-PFq" firstAttribute="leading" secondItem="w3C-eo-32L" secondAttribute="leading" constant="16" id="SbS-r2-6TO"/> + <constraint firstItem="osA-8u-FdT" firstAttribute="top" secondItem="791-mm-gDd" secondAttribute="bottom" constant="16" id="Sce-j6-EpN"/> + <constraint firstItem="w7V-Em-lph" firstAttribute="leading" secondItem="w3C-eo-32L" secondAttribute="leading" id="UHd-EB-M5g"/> + <constraint firstItem="w3C-eo-32L" firstAttribute="trailing" secondItem="791-mm-gDd" secondAttribute="trailing" constant="16" id="bK9-Ke-N5z"/> + <constraint firstItem="w7V-Em-lph" firstAttribute="top" secondItem="w3C-eo-32L" secondAttribute="top" constant="10" id="hRG-tp-3W3"/> + <constraint firstItem="791-mm-gDd" firstAttribute="top" secondItem="w7V-Em-lph" secondAttribute="bottom" constant="8" symbolic="YES" id="hop-KK-5hI"/> + <constraint firstItem="BUO-La-mfo" firstAttribute="top" secondItem="w3C-eo-32L" secondAttribute="top" id="mI3-JS-nfW"/> + <constraint firstItem="w3C-eo-32L" firstAttribute="trailing" secondItem="osA-8u-FdT" secondAttribute="trailing" constant="16" id="oc0-9Z-NCV"/> + <constraint firstItem="w3C-eo-32L" firstAttribute="trailing" secondItem="w7V-Em-lph" secondAttribute="trailing" id="qty-8J-HQq"/> + <constraint firstItem="w3C-eo-32L" firstAttribute="trailing" secondItem="wYk-XW-PFq" secondAttribute="trailing" constant="16" id="rDE-99-7Kd"/> + <constraint firstItem="wYk-XW-PFq" firstAttribute="top" secondItem="osA-8u-FdT" secondAttribute="bottom" constant="16" id="zuy-vC-YyB"/> + </constraints> + </view> + <navigationItem key="navigationItem" id="Rsr-RV-wmw"/> + <connections> + <outlet property="cameraLensLbl" destination="g3u-c4-acA" id="VGj-5z-FPu"/> + <outlet property="cameraLensSwitch" destination="A4e-As-Gsr" id="Rif-4x-KmJ"/> + <outlet property="identifyThresholdLbl" destination="uoz-F1-YQF" id="Cec-0x-gwh"/> + <outlet property="livenessThresholdLbl" destination="Wzw-oR-SAX" id="8V0-uc-qUz"/> + </connections> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="gbH-QU-dWe" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="-411" y="687"/> + </scene> + <!--About View Controller--> + <scene sceneID="dIj-kb-emt"> + <objects> + <viewController id="ZAF-R8-VYW" customClass="AboutViewController" customModule="FaceRecognition" customModuleProvider="target" sceneMemberID="viewController"> + <view key="view" contentMode="scaleToFill" id="xL0-iJ-Uhz"> + <rect key="frame" x="0.0" y="0.0" width="430" height="863"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="KBY-AI Technology" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hzg-L1-IZZ"> + <rect key="frame" x="0.0" y="69" width="430" height="70"/> + <constraints> + <constraint firstAttribute="height" constant="70" id="wPy-mn-SFL"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="24"/> + <color key="textColor" red="0.90196078430000004" green="0.88235294119999996" blue="0.8980392157" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lba-W9-DcF"> + <rect key="frame" x="16" y="139" width="398" height="54"/> + <constraints> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="GGD-WW-h0I"/> + </constraints> + <string key="text"> We are a leading provider of SDKs for advanced biometric authentication technology, including face recognition, liveness detection, and ID card recognition.</string> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gGF-19-zqC"> + <rect key="frame" x="16" y="199" width="398" height="54"/> + <constraints> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="auK-aH-5cK"/> + </constraints> + <string key="text"> In addition to biometric authentication solutions, we provide software development services for computer vision, mobile applications, and UI/UX design.</string> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" With our team's extensive knowledge and proficiency in these areas, we can deliver exceptional results to our clients." lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c4K-ic-ioB"> + <rect key="frame" x="16" y="259" width="398" height="54"/> + <constraints> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="OHu-2W-f84"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" If you're interested in learning more about how we can help you, please don't hesitate to get in touch with us today." lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CkY-2n-iX8"> + <rect key="frame" x="16" y="319" width="398" height="54"/> + <constraints> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="QoA-1R-yKn"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Please contact us:" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6F4-Fm-XYH"> + <rect key="frame" x="16" y="383" width="398" height="18"/> + <constraints> + <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="ebH-tx-1l3"/> + </constraints> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hfZ-RM-gWW"> + <rect key="frame" x="375" y="59" width="50" height="50"/> + <constraints> + <constraint firstAttribute="height" constant="50" id="L00-ZA-uls"/> + <constraint firstAttribute="width" constant="50" id="stl-IP-X49"/> + </constraints> + <color key="tintColor" red="0.54901960780000003" green="0.1137254902" blue="0.094117647060000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <size key="titleShadowOffset" width="2" height="2"/> + <state key="normal" image="xmark.app.fill" catalog="system"/> + <connections> + <action selector="done_clicked:" destination="ZAF-R8-VYW" eventType="touchUpInside" id="K8M-NR-pBf"/> + </connections> + </button> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oRb-WE-81E"> + <rect key="frame" x="24" y="407" width="390" height="30"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="envelope.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="W74-4d-1iM"> + <rect key="frame" x="0.0" y="5.3333333333333321" width="24" height="20.000000000000004"/> + <color key="tintColor" red="0.81568627449999997" green="0.73725490199999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="width" secondItem="W74-4d-1iM" secondAttribute="height" multiplier="1:1" id="Ika-Dz-HDy"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Email: contact@kby-ai.com" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Z5U-0Z-r0g"> + <rect key="frame" x="78" y="5.9999999999999432" width="42" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DyV-jA-zWP"> + <rect key="frame" x="0.0" y="0.0" width="390" height="30"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="mail_clicked:" destination="ZAF-R8-VYW" eventType="touchUpInside" id="bKp-Tw-O5p"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstAttribute="bottom" secondItem="DyV-jA-zWP" secondAttribute="bottom" id="4Vg-lX-V5r"/> + <constraint firstItem="DyV-jA-zWP" firstAttribute="leading" secondItem="oRb-WE-81E" secondAttribute="leading" id="6Oh-Pz-4ew"/> + <constraint firstItem="DyV-jA-zWP" firstAttribute="top" secondItem="oRb-WE-81E" secondAttribute="top" id="BAh-Cb-PE3"/> + <constraint firstItem="Z5U-0Z-r0g" firstAttribute="centerY" secondItem="oRb-WE-81E" secondAttribute="centerY" id="F4Q-R6-Bdg"/> + <constraint firstItem="W74-4d-1iM" firstAttribute="height" secondItem="oRb-WE-81E" secondAttribute="height" multiplier="0.8" id="HfS-vW-bHx"/> + <constraint firstItem="Z5U-0Z-r0g" firstAttribute="leading" secondItem="W74-4d-1iM" secondAttribute="trailing" constant="8" id="OHk-yl-tw3"/> + <constraint firstAttribute="trailing" secondItem="Z5U-0Z-r0g" secondAttribute="trailing" id="WFf-kA-DNK"/> + <constraint firstAttribute="height" constant="30" id="ZMC-hg-jej"/> + <constraint firstItem="W74-4d-1iM" firstAttribute="leading" secondItem="oRb-WE-81E" secondAttribute="leading" id="guz-CG-4JE"/> + <constraint firstItem="W74-4d-1iM" firstAttribute="centerY" secondItem="oRb-WE-81E" secondAttribute="centerY" id="ujC-82-CL5"/> + <constraint firstAttribute="trailing" secondItem="DyV-jA-zWP" secondAttribute="trailing" id="vvw-gQ-i3e"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Md8-hZ-Ue2"> + <rect key="frame" x="24" y="437" width="390" height="30"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_skype" translatesAutoresizingMaskIntoConstraints="NO" id="yeU-ue-eG8"> + <rect key="frame" x="0.0" y="3" width="24" height="24"/> + <color key="tintColor" red="0.81568627449999997" green="0.73725490199999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="width" secondItem="yeU-ue-eG8" secondAttribute="height" multiplier="1:1" id="ZV5-ve-303"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Skype: live:.cid.66e2522354b1049b" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2QU-gi-A7z"> + <rect key="frame" x="78" y="5.9999999999999432" width="42" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bSy-Ru-2jC"> + <rect key="frame" x="0.0" y="0.0" width="390" height="30"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="skype_clicked:" destination="ZAF-R8-VYW" eventType="touchUpInside" id="S7I-ed-g4y"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="2QU-gi-A7z" firstAttribute="centerY" secondItem="Md8-hZ-Ue2" secondAttribute="centerY" id="1je-vW-F4v"/> + <constraint firstAttribute="trailing" secondItem="2QU-gi-A7z" secondAttribute="trailing" id="3jZ-NK-5pt"/> + <constraint firstItem="yeU-ue-eG8" firstAttribute="leading" secondItem="Md8-hZ-Ue2" secondAttribute="leading" id="4g2-31-hXu"/> + <constraint firstAttribute="bottom" secondItem="bSy-Ru-2jC" secondAttribute="bottom" id="ELb-RD-VU7"/> + <constraint firstItem="yeU-ue-eG8" firstAttribute="height" secondItem="Md8-hZ-Ue2" secondAttribute="height" multiplier="0.8" id="MKf-wY-Q8Y"/> + <constraint firstItem="bSy-Ru-2jC" firstAttribute="top" secondItem="Md8-hZ-Ue2" secondAttribute="top" id="Pns-Q4-ZEF"/> + <constraint firstItem="bSy-Ru-2jC" firstAttribute="leading" secondItem="Md8-hZ-Ue2" secondAttribute="leading" id="PyU-zN-Ua2"/> + <constraint firstItem="2QU-gi-A7z" firstAttribute="leading" secondItem="yeU-ue-eG8" secondAttribute="trailing" constant="8" id="Rk7-4S-CnI"/> + <constraint firstItem="yeU-ue-eG8" firstAttribute="centerY" secondItem="Md8-hZ-Ue2" secondAttribute="centerY" id="SPw-Pz-dIU"/> + <constraint firstAttribute="height" constant="30" id="Siu-CV-KWy"/> + <constraint firstAttribute="trailing" secondItem="bSy-Ru-2jC" secondAttribute="trailing" id="nhW-R6-yny"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qfq-1F-AFL"> + <rect key="frame" x="24" y="467" width="390" height="30"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_telegram" translatesAutoresizingMaskIntoConstraints="NO" id="2Az-SV-7Yl"> + <rect key="frame" x="0.0" y="3" width="24" height="24"/> + <color key="tintColor" red="0.81568627449999997" green="0.73725490199999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="width" secondItem="2Az-SV-7Yl" secondAttribute="height" multiplier="1:1" id="sKu-Id-aF2"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Telegram: @kbyai" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vOk-ta-t1Y"> + <rect key="frame" x="78" y="5.9999999999999432" width="42" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="H71-as-chx"> + <rect key="frame" x="0.0" y="0.0" width="390" height="30"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="telegram_clicked:" destination="ZAF-R8-VYW" eventType="touchUpInside" id="xwC-RN-UV6"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="2Az-SV-7Yl" firstAttribute="height" secondItem="Qfq-1F-AFL" secondAttribute="height" multiplier="0.8" id="3Sn-VJ-05h"/> + <constraint firstItem="H71-as-chx" firstAttribute="top" secondItem="Qfq-1F-AFL" secondAttribute="top" id="6F6-MX-qMH"/> + <constraint firstItem="2Az-SV-7Yl" firstAttribute="leading" secondItem="Qfq-1F-AFL" secondAttribute="leading" id="6a5-7y-a3a"/> + <constraint firstAttribute="trailing" secondItem="vOk-ta-t1Y" secondAttribute="trailing" id="95c-pw-KSa"/> + <constraint firstItem="H71-as-chx" firstAttribute="leading" secondItem="Qfq-1F-AFL" secondAttribute="leading" id="BYI-Mc-pZh"/> + <constraint firstItem="2Az-SV-7Yl" firstAttribute="centerY" secondItem="Qfq-1F-AFL" secondAttribute="centerY" id="EgW-Xh-Yvx"/> + <constraint firstItem="vOk-ta-t1Y" firstAttribute="centerY" secondItem="Qfq-1F-AFL" secondAttribute="centerY" id="Epk-Ih-Qt7"/> + <constraint firstAttribute="bottom" secondItem="H71-as-chx" secondAttribute="bottom" id="Ft1-jw-uJ3"/> + <constraint firstAttribute="trailing" secondItem="H71-as-chx" secondAttribute="trailing" id="QiS-Fz-MJs"/> + <constraint firstItem="vOk-ta-t1Y" firstAttribute="leading" secondItem="2Az-SV-7Yl" secondAttribute="trailing" constant="8" id="cBT-o2-rYe"/> + <constraint firstAttribute="height" constant="30" id="fxK-xP-2Ha"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yyB-s2-gSC"> + <rect key="frame" x="24" y="497" width="390" height="30"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_whatsapp" translatesAutoresizingMaskIntoConstraints="NO" id="118-ji-WhO"> + <rect key="frame" x="0.0" y="3" width="24" height="24"/> + <color key="tintColor" red="0.81568627449999997" green="0.73725490199999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="width" secondItem="118-ji-WhO" secondAttribute="height" multiplier="1:1" id="awo-Ns-X2f"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="WhatsApp: +19092802609" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oKs-y0-fLI"> + <rect key="frame" x="78" y="5.9999999999999432" width="42" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NOD-zJ-27t"> + <rect key="frame" x="0.0" y="0.0" width="390" height="30"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="whatsapp_clicked:" destination="ZAF-R8-VYW" eventType="touchUpInside" id="KNJ-Z6-ZhX"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="NOD-zJ-27t" firstAttribute="top" secondItem="yyB-s2-gSC" secondAttribute="top" id="5Me-8D-BOZ"/> + <constraint firstAttribute="trailing" secondItem="oKs-y0-fLI" secondAttribute="trailing" id="7SR-w9-TSg"/> + <constraint firstAttribute="bottom" secondItem="NOD-zJ-27t" secondAttribute="bottom" id="7me-FU-LTB"/> + <constraint firstItem="oKs-y0-fLI" firstAttribute="centerY" secondItem="yyB-s2-gSC" secondAttribute="centerY" id="AO9-mP-2cb"/> + <constraint firstItem="118-ji-WhO" firstAttribute="centerY" secondItem="yyB-s2-gSC" secondAttribute="centerY" id="ORB-F1-Rfd"/> + <constraint firstAttribute="height" constant="30" id="ZOO-hb-rPe"/> + <constraint firstItem="118-ji-WhO" firstAttribute="leading" secondItem="yyB-s2-gSC" secondAttribute="leading" id="dOF-TW-Sok"/> + <constraint firstAttribute="trailing" secondItem="NOD-zJ-27t" secondAttribute="trailing" id="fht-bm-zjM"/> + <constraint firstItem="118-ji-WhO" firstAttribute="height" secondItem="yyB-s2-gSC" secondAttribute="height" multiplier="0.8" id="qGs-DO-6NJ"/> + <constraint firstItem="oKs-y0-fLI" firstAttribute="leading" secondItem="118-ji-WhO" secondAttribute="trailing" constant="8" id="r80-Xv-83y"/> + <constraint firstItem="NOD-zJ-27t" firstAttribute="leading" secondItem="yyB-s2-gSC" secondAttribute="leading" id="w82-M5-zTo"/> + </constraints> + </view> + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xkw-e4-RGC"> + <rect key="frame" x="24" y="527" width="390" height="30"/> + <subviews> + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_github" translatesAutoresizingMaskIntoConstraints="NO" id="LjI-Hj-43A"> + <rect key="frame" x="0.0" y="3" width="24" height="24"/> + <color key="tintColor" red="0.81568627449999997" green="0.73725490199999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstAttribute="width" secondItem="LjI-Hj-43A" secondAttribute="height" multiplier="1:1" id="7or-57-hnV"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Github: https://github.com/kby-ai" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kao-S7-S0f"> + <rect key="frame" x="78" y="5.9999999999999432" width="42" height="21"/> + <fontDescription key="fontDescription" type="system" pointSize="15"/> + <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ylQ-dV-upc"> + <rect key="frame" x="0.0" y="0.0" width="390" height="30"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <connections> + <action selector="github_clicked:" destination="ZAF-R8-VYW" eventType="touchUpInside" id="JCx-ol-XRW"/> + </connections> + </button> + </subviews> + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + <constraints> + <constraint firstItem="LjI-Hj-43A" firstAttribute="centerY" secondItem="Xkw-e4-RGC" secondAttribute="centerY" id="A2S-g0-3uS"/> + <constraint firstItem="ylQ-dV-upc" firstAttribute="top" secondItem="Xkw-e4-RGC" secondAttribute="top" id="AFU-x3-J9X"/> + <constraint firstItem="LjI-Hj-43A" firstAttribute="leading" secondItem="Xkw-e4-RGC" secondAttribute="leading" id="GqC-Ua-PKb"/> + <constraint firstItem="kao-S7-S0f" firstAttribute="centerY" secondItem="Xkw-e4-RGC" secondAttribute="centerY" id="Hp5-X7-eV5"/> + <constraint firstItem="kao-S7-S0f" firstAttribute="leading" secondItem="LjI-Hj-43A" secondAttribute="trailing" constant="8" id="NTY-T2-0d0"/> + <constraint firstAttribute="trailing" secondItem="kao-S7-S0f" secondAttribute="trailing" id="QxZ-dX-aVi"/> + <constraint firstAttribute="height" constant="30" id="XDw-b2-Ghs"/> + <constraint firstAttribute="bottom" secondItem="ylQ-dV-upc" secondAttribute="bottom" id="atX-EQ-Voj"/> + <constraint firstAttribute="trailing" secondItem="ylQ-dV-upc" secondAttribute="trailing" id="ein-Ni-3Md"/> + <constraint firstItem="LjI-Hj-43A" firstAttribute="height" secondItem="Xkw-e4-RGC" secondAttribute="height" multiplier="0.8" id="hDX-wR-H5p"/> + <constraint firstItem="ylQ-dV-upc" firstAttribute="leading" secondItem="Xkw-e4-RGC" secondAttribute="leading" id="kLZ-Cx-e3E"/> + </constraints> + </view> + </subviews> + <viewLayoutGuide key="safeArea" id="Geb-cb-4m3"/> + <color key="backgroundColor" red="0.10980392160000001" green="0.1058823529" blue="0.1215686275" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <constraints> + <constraint firstItem="6F4-Fm-XYH" firstAttribute="top" secondItem="CkY-2n-iX8" secondAttribute="bottom" constant="10" id="3ME-dH-1pj"/> + <constraint firstItem="Md8-hZ-Ue2" firstAttribute="trailing" secondItem="oRb-WE-81E" secondAttribute="trailing" id="4Lv-kh-4aq"/> + <constraint firstItem="Hzg-L1-IZZ" firstAttribute="leading" secondItem="Geb-cb-4m3" secondAttribute="leading" id="4Ub-c7-H6z"/> + <constraint firstItem="Geb-cb-4m3" firstAttribute="trailing" secondItem="Qfq-1F-AFL" secondAttribute="trailing" constant="16" id="7CZ-81-My7"/> + <constraint firstItem="Geb-cb-4m3" firstAttribute="trailing" secondItem="Hzg-L1-IZZ" secondAttribute="trailing" id="95c-Tj-LNo"/> + <constraint firstItem="CkY-2n-iX8" firstAttribute="trailing" secondItem="Geb-cb-4m3" secondAttribute="trailing" constant="-16" id="BB5-ib-0J7"/> + <constraint firstItem="gGF-19-zqC" firstAttribute="leading" secondItem="Geb-cb-4m3" secondAttribute="leading" constant="16" id="BFD-Wu-pO1"/> + <constraint firstItem="c4K-ic-ioB" firstAttribute="top" secondItem="gGF-19-zqC" secondAttribute="bottom" constant="6" id="BcQ-vh-boo"/> + <constraint firstItem="Xkw-e4-RGC" firstAttribute="trailing" secondItem="yyB-s2-gSC" secondAttribute="trailing" id="Bvj-1f-0kS"/> + <constraint firstItem="Geb-cb-4m3" firstAttribute="trailing" secondItem="yyB-s2-gSC" secondAttribute="trailing" constant="16" id="Ck6-vp-naU"/> + <constraint firstItem="hfZ-RM-gWW" firstAttribute="top" secondItem="Geb-cb-4m3" secondAttribute="top" id="Fjn-gw-x39"/> + <constraint firstItem="lba-W9-DcF" firstAttribute="trailing" secondItem="Geb-cb-4m3" secondAttribute="trailing" constant="-16" id="NvC-IT-MJa"/> + <constraint firstItem="Qfq-1F-AFL" firstAttribute="top" secondItem="Md8-hZ-Ue2" secondAttribute="bottom" id="NwA-6E-UVg"/> + <constraint firstItem="Geb-cb-4m3" firstAttribute="trailing" secondItem="6F4-Fm-XYH" secondAttribute="trailing" constant="16" id="Nyo-j1-iNX"/> + <constraint firstItem="Hzg-L1-IZZ" firstAttribute="bottom" secondItem="lba-W9-DcF" secondAttribute="top" id="QGJ-lZ-1wP"/> + <constraint firstItem="yyB-s2-gSC" firstAttribute="leading" secondItem="Geb-cb-4m3" secondAttribute="leading" constant="24" id="QYD-oS-oaO"/> + <constraint firstItem="CkY-2n-iX8" firstAttribute="top" secondItem="c4K-ic-ioB" secondAttribute="bottom" constant="6" id="RDn-eM-Rgm"/> + <constraint firstItem="oRb-WE-81E" firstAttribute="top" secondItem="6F4-Fm-XYH" secondAttribute="bottom" constant="6" id="T5z-O6-ETh"/> + <constraint firstItem="Xkw-e4-RGC" firstAttribute="leading" secondItem="yyB-s2-gSC" secondAttribute="leading" id="T8A-nO-hqH"/> + <constraint firstItem="Geb-cb-4m3" firstAttribute="trailing" secondItem="hfZ-RM-gWW" secondAttribute="trailing" constant="5" id="U8C-RH-Fnk"/> + <constraint firstItem="lba-W9-DcF" firstAttribute="leading" secondItem="Geb-cb-4m3" secondAttribute="leading" constant="16" id="Vfc-ek-70p"/> + <constraint firstItem="c4K-ic-ioB" firstAttribute="trailing" secondItem="Geb-cb-4m3" secondAttribute="trailing" constant="-16" id="WNe-aF-IOL"/> + <constraint firstItem="Qfq-1F-AFL" firstAttribute="leading" secondItem="Geb-cb-4m3" secondAttribute="leading" constant="24" id="Xte-T2-u5B"/> + <constraint firstItem="Xkw-e4-RGC" firstAttribute="top" secondItem="yyB-s2-gSC" secondAttribute="bottom" id="ak0-wq-XSn"/> + <constraint firstItem="Geb-cb-4m3" firstAttribute="trailing" secondItem="oRb-WE-81E" secondAttribute="trailing" constant="16" id="cUq-Sc-Phn"/> + <constraint firstItem="6F4-Fm-XYH" firstAttribute="leading" secondItem="Geb-cb-4m3" secondAttribute="leading" constant="16" id="je4-fw-LmR"/> + <constraint firstItem="Hzg-L1-IZZ" firstAttribute="top" secondItem="Geb-cb-4m3" secondAttribute="top" constant="10" id="m64-fw-gtp"/> + <constraint firstItem="CkY-2n-iX8" firstAttribute="leading" secondItem="Geb-cb-4m3" secondAttribute="leading" constant="16" id="mNc-cI-RVZ"/> + <constraint firstItem="c4K-ic-ioB" firstAttribute="leading" secondItem="Geb-cb-4m3" secondAttribute="leading" constant="16" id="mcA-xl-FDR"/> + <constraint firstItem="yyB-s2-gSC" firstAttribute="top" secondItem="Qfq-1F-AFL" secondAttribute="bottom" id="qFt-1k-7um"/> + <constraint firstItem="gGF-19-zqC" firstAttribute="trailing" secondItem="Geb-cb-4m3" secondAttribute="trailing" constant="-16" id="qXg-NA-sx6"/> + <constraint firstItem="oRb-WE-81E" firstAttribute="leading" secondItem="Geb-cb-4m3" secondAttribute="leading" constant="24" id="ru5-7I-h9r"/> + <constraint firstItem="Md8-hZ-Ue2" firstAttribute="leading" secondItem="oRb-WE-81E" secondAttribute="leading" id="vPs-HE-HsC"/> + <constraint firstItem="gGF-19-zqC" firstAttribute="top" secondItem="lba-W9-DcF" secondAttribute="bottom" constant="6" id="xbb-Ka-kN9"/> + <constraint firstItem="oRb-WE-81E" firstAttribute="bottom" secondItem="Md8-hZ-Ue2" secondAttribute="top" id="zdF-BX-Z1W"/> + </constraints> + </view> + <navigationItem key="navigationItem" id="IUV-4A-Mdb"/> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="Lvb-g5-HPr" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="650" y="687"/> + </scene> + </scenes> + <resources> + <image name="arrow.triangle.2.circlepath" catalog="system" width="128" height="104"/> + <image name="camera.aperture" catalog="system" width="128" height="123"/> + <image name="envelope.fill" catalog="system" width="128" height="93"/> + <image name="gearshape.fill" catalog="system" width="128" height="123"/> + <image name="ic_github" width="16" height="16"/> + <image name="ic_kby" width="133.33332824707031" height="133.33332824707031"/> + <image name="ic_skype" width="16" height="16"/> + <image name="ic_telegram" width="16" height="16"/> + <image name="ic_whatsapp" width="16" height="16"/> + <image name="info.circle.fill" catalog="system" width="128" height="123"/> + <image name="person.2.badge.gearshape.fill" catalog="system" width="128" height="87"/> + <image name="person.fill.badge.plus" catalog="system" width="128" height="125"/> + <image name="person.fill.checkmark" catalog="system" width="128" height="89"/> + <image name="sparkles" catalog="system" width="115" height="128"/> + <image name="trash.fill" catalog="system" width="119" height="128"/> + <image name="xmark.app.fill" catalog="system" width="128" height="114"/> + <namedColor name="clr_bg"> + <color red="0.18823529411764706" green="0.18823529411764706" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </namedColor> + <namedColor name="clr_text"> + <color red="0.90196078431372551" green="0.88235294117647056" blue="0.89803921568627454" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </namedColor> + <systemColor name="systemBackgroundColor"> + <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> + </systemColor> + </resources> +</document> diff --git a/FaceRecognition/CameraViewController.swift b/FaceRecognition/CameraViewController.swift new file mode 100644 index 0000000..95ed8fb --- /dev/null +++ b/FaceRecognition/CameraViewController.swift @@ -0,0 +1,205 @@ +import UIKit +import AVFoundation +import CoreData + +class CameraViewController: UIViewController, AVCaptureVideoDataOutputSampleBufferDelegate{ + + @IBOutlet weak var cameraView: UIView! + @IBOutlet weak var faceView: FaceView! + @IBOutlet weak var resultView: UIView! + + + @IBOutlet weak var enrolledImage: UIImageView! + @IBOutlet weak var identifiedImage: UIImageView! + @IBOutlet weak var identifiedLbl: UILabel! + @IBOutlet weak var similarityLbl: UILabel! + @IBOutlet weak var livenessLbl: UILabel! + @IBOutlet weak var yawLbl: UILabel! + @IBOutlet weak var rollLbl: UILabel! + @IBOutlet weak var pitchLbl: UILabel! + + var recognized = false + + var cameraLens_val = 0 + var livenessThreshold = Float(0) + var identifyThreshold = Float(0) + + lazy var persistentContainer: NSPersistentContainer = { + let container = NSPersistentContainer(name: ViewController.CORE_DATA_NAME) + container.loadPersistentStores(completionHandler: { (storeDescription, error) in + if let error = error as NSError? { + fatalError("Unresolved error \(error), \(error.userInfo)") + } + }) + return container + }() + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + cameraView.translatesAutoresizingMaskIntoConstraints = true + cameraView.frame = view.bounds + + faceView.translatesAutoresizingMaskIntoConstraints = true + faceView.frame = view.bounds + + resultView.translatesAutoresizingMaskIntoConstraints = true + resultView.frame = view.bounds + + let defaults = UserDefaults.standard + cameraLens_val = defaults.integer(forKey: "camera_lens") + livenessThreshold = defaults.float(forKey: "liveness_threshold") + identifyThreshold = defaults.float(forKey: "identify_threshold") + + startCamera() + } + + func startCamera() { + var cameraLens = AVCaptureDevice.Position.front + if(cameraLens_val == 0) { + cameraLens = AVCaptureDevice.Position.back + } + + // Create an AVCaptureSession + let session = AVCaptureSession() + session.sessionPreset = .high + + // Create an AVCaptureDevice for the camera + guard let videoDevice = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: cameraLens) else { return } + guard let input = try? AVCaptureDeviceInput(device: videoDevice) else { return } + if session.canAddInput(input) { + session.addInput(input) + } + + // Create an AVCaptureVideoDataOutput + let videoOutput = AVCaptureVideoDataOutput() + + // Set the video output's delegate and queue for processing video frames + videoOutput.setSampleBufferDelegate(self, queue: DispatchQueue.global(qos: .default)) + + // Add the video output to the session + session.addOutput(videoOutput) + + let previewLayer = AVCaptureVideoPreviewLayer(session: session) + previewLayer.videoGravity = .resizeAspectFill + previewLayer.frame = view.bounds + cameraView.layer.addSublayer(previewLayer) + + // Start the session + session.startRunning() + } + + func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) { + + if(recognized == true) { + return + } + + guard let pixelBuffer: CVPixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else { return } + + CVPixelBufferLockBaseAddress(pixelBuffer, CVPixelBufferLockFlags.readOnly) + let ciImage = CIImage(cvPixelBuffer: pixelBuffer) + + let context = CIContext() + let cgImage = context.createCGImage(ciImage, from: ciImage.extent) + let image = UIImage(cgImage: cgImage!) + CVPixelBufferUnlockBaseAddress(pixelBuffer, CVPixelBufferLockFlags.readOnly) + + // Rotate and flip the image + let capturedImage = image.rotate(radians: .pi/2).flipHorizontally() + + let faceBoxes = FaceSDK.faceDetection(capturedImage) + for faceBox in (faceBoxes as NSArray as! [FaceBox]) { + if(cameraLens_val == 0) { + let tmp = faceBox.x1 + faceBox.x1 = Int32(capturedImage.size.width) - faceBox.x2 - 1; + faceBox.x2 = Int32(capturedImage.size.width) - tmp - 1; + } + } + + DispatchQueue.main.sync { + self.faceView.setFrameSize(frameSize: capturedImage.size) + self.faceView.setFaceBoxes(faceBoxes: faceBoxes) + } + + if(faceBoxes.count > 0) { + + let faceBox = faceBoxes[0] as! FaceBox + if(faceBox.liveness > livenessThreshold) { + + let templates = FaceSDK.templateExtraction(capturedImage, faceBox: faceBox) + + var maxSimilarity = Float(0) + var maxSimilarityName = "" + var maxSimilarityFace: Data? = nil + + let context = self.persistentContainer.viewContext + let fetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: ViewController.ENTITIES_NAME) + + do { + let persons = try context.fetch(fetchRequest) as! [NSManagedObject] + for person in persons { + + let personTemplates = person.value(forKey: ViewController.ATTRIBUTE_TEMPLATES) as! Data + + let similarity = FaceSDK.similarityCalculation(templates, templates2: personTemplates) + + if(maxSimilarity < similarity) { + maxSimilarity = similarity + maxSimilarityName = person.value(forKey: ViewController.ATTRIBUTE_NAME) as! String + maxSimilarityFace = person.value(forKey: ViewController.ATTRIBUTE_FACE) as? Data + } + } + } catch { + print("Failed fetching: \(error)") + } + + if(maxSimilarity > identifyThreshold) { + let enrolledFaceImage = UIImage(data: maxSimilarityFace!) + let identifiedFaceImage = capturedImage.cropFace(faceBox: faceBox) + + recognized = true + + DispatchQueue.main.sync { + self.enrolledImage.image = enrolledFaceImage + self.identifiedImage.image = identifiedFaceImage + self.identifiedLbl.text = "Identified: " + maxSimilarityName + self.similarityLbl.text = "Similarity: " + String(format: "%.03f", maxSimilarity) + self.livenessLbl.text = "Liveness score: " + String(format: "%.03f", faceBox.liveness) + self.yawLbl.text = "Yaw: " + String(format: "%.03f", faceBox.yaw) + self.rollLbl.text = "Roll: " + String(format: "%.03f", faceBox.yaw) + self.pitchLbl.text = "Pitch: " + String(format: "%.03f", faceBox.yaw) + self.resultView.showView(isHidden_: true) + } + } + } + } + } + + @IBAction func done_clicked(_ sender: Any) { + self.resultView.showView(isHidden_: false) + recognized = false + } + +} + +extension UIView { + + func showView(isHidden_: Bool) { + + if isHidden_ { + UIView.animate(withDuration: 0.3, animations: { + self.alpha = 1.0 + }, completion: {_ in + self.isHidden = false + }) + } else { + UIView.animate(withDuration: 0.3, animations: { + self.alpha = 0.0 + }, completion: {_ in + self.isHidden = true + }) + } + } +} diff --git a/FaceRecognition/FaceRecognition.xcdatamodeld/.xccurrentversion b/FaceRecognition/FaceRecognition.xcdatamodeld/.xccurrentversion new file mode 100644 index 0000000..2d78b2a --- /dev/null +++ b/FaceRecognition/FaceRecognition.xcdatamodeld/.xccurrentversion @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>_XCCurrentVersionName</key> + <string>FaceRecognition.xcdatamodel</string> +</dict> +</plist> diff --git a/FaceRecognition/FaceRecognition.xcdatamodeld/FaceRecognition.xcdatamodel/contents b/FaceRecognition/FaceRecognition.xcdatamodeld/FaceRecognition.xcdatamodel/contents new file mode 100644 index 0000000..50d2514 --- /dev/null +++ b/FaceRecognition/FaceRecognition.xcdatamodeld/FaceRecognition.xcdatamodel/contents @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1" systemVersion="11A491" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithCloudKit="false" userDefinedModelVersionIdentifier=""> + <elements/> +</model> \ No newline at end of file diff --git a/FaceRecognition/FaceView.swift b/FaceRecognition/FaceView.swift new file mode 100644 index 0000000..74a15c6 --- /dev/null +++ b/FaceRecognition/FaceView.swift @@ -0,0 +1,56 @@ +import UIKit + +class FaceView: UIView { + + var faceBoxes: NSMutableArray? = nil + var frameSize: CGSize? + + public func setFaceBoxes(faceBoxes: NSMutableArray) { + self.faceBoxes = faceBoxes + setNeedsDisplay() + } + + public func setFrameSize(frameSize: CGSize) { + self.frameSize = frameSize + } + + // Only override draw() if you perform custom drawing. + // An empty implementation adversely affects performance during animation. + override func draw(_ rect: CGRect) { + + guard let context = UIGraphicsGetCurrentContext() else { + return + } + + let defaults = UserDefaults.standard + let livenessThreshold = defaults.float(forKey: "liveness_threshold") + + if(self.frameSize != nil) { + context.beginPath() + + let x_scale = self.frameSize!.width / self.bounds.width + let y_scale = self.frameSize!.height / self.bounds.height + + for faceBox in (faceBoxes! as NSArray as! [FaceBox]) { + var color = UIColor.green + var string = "REAL " + String(format: "%.3f", faceBox.liveness) + if(faceBox.liveness < livenessThreshold) { + color = UIColor.red + string = "SPOOF " + String(format: "%.3f", faceBox.liveness) + } + + context.setStrokeColor(color.cgColor) + context.setLineWidth(2.0) + + 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)) + context.addRect(scaledRect) + + let attributes = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 20), + NSAttributedString.Key.foregroundColor: color] + string.draw(at: CGPoint(x: CGFloat(scaledRect.minX + 5), y: CGFloat(scaledRect.minY - 25)), withAttributes: attributes) + + context.strokePath() + } + } + } +} diff --git a/FaceRecognition/Info.plist b/FaceRecognition/Info.plist new file mode 100644 index 0000000..dd3c9af --- /dev/null +++ b/FaceRecognition/Info.plist @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>UIApplicationSceneManifest</key> + <dict> + <key>UIApplicationSupportsMultipleScenes</key> + <false/> + <key>UISceneConfigurations</key> + <dict> + <key>UIWindowSceneSessionRoleApplication</key> + <array> + <dict> + <key>UISceneConfigurationName</key> + <string>Default Configuration</string> + <key>UISceneDelegateClassName</key> + <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string> + <key>UISceneStoryboardFile</key> + <string>Main</string> + </dict> + </array> + </dict> + </dict> +</dict> +</plist> diff --git a/FaceRecognition/Model.xcdatamodeld/Model.xcdatamodel/contents b/FaceRecognition/Model.xcdatamodeld/Model.xcdatamodel/contents new file mode 100644 index 0000000..5073a34 --- /dev/null +++ b/FaceRecognition/Model.xcdatamodeld/Model.xcdatamodel/contents @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="21513" systemVersion="21G72" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier=""> + <entity name="Person" representedClassName="Person" syncable="YES" codeGenerationType="class"> + <attribute name="face" optional="YES" attributeType="Binary"/> + <attribute name="name" optional="YES" attributeType="String"/> + <attribute name="templates" optional="YES" attributeType="Binary"/> + </entity> +</model> \ No newline at end of file diff --git a/FaceRecognition/PersonViewCell.swift b/FaceRecognition/PersonViewCell.swift new file mode 100644 index 0000000..f815f1a --- /dev/null +++ b/FaceRecognition/PersonViewCell.swift @@ -0,0 +1,32 @@ + + +import UIKit + +protocol PersonViewCellDelegate: AnyObject { + func didPersonDelete(_ cell: UITableViewCell) +} + +class PersonViewCell: UITableViewCell { + + @IBOutlet weak var nameLbl: UILabel! + @IBOutlet weak var faceImage: UIImageView! + + weak var delegate: PersonViewCellDelegate? + var indexPath: IndexPath? + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + + @IBAction func delete_clicked(_ sender: Any) { + delegate?.didPersonDelete(self) + } + +} diff --git a/FaceRecognition/SceneDelegate.swift b/FaceRecognition/SceneDelegate.swift new file mode 100644 index 0000000..aed0254 --- /dev/null +++ b/FaceRecognition/SceneDelegate.swift @@ -0,0 +1,50 @@ + + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + + // Save changes in the application's managed object context when the application transitions to the background. + (UIApplication.shared.delegate as? AppDelegate)?.saveContext() + } + + +} + diff --git a/FaceRecognition/SettingsViewController.swift b/FaceRecognition/SettingsViewController.swift new file mode 100644 index 0000000..6a5bbc5 --- /dev/null +++ b/FaceRecognition/SettingsViewController.swift @@ -0,0 +1,215 @@ +import UIKit +import AVFoundation +import CoreData + +class SettingsViewController: UIViewController{ + + static let CAMERA_LENS_DEFAULT = 1 + static let LIVENESS_THRESHOLD_DEFAULT = Float(0.7) + static let IDENTIFY_THRESHOLD_DEFAULT = Float(0.8) + + + @IBOutlet weak var cameraLensSwitch: UISwitch! + @IBOutlet weak var livenessThresholdLbl: UILabel! + @IBOutlet weak var identifyThresholdLbl: UILabel! + @IBOutlet weak var cameraLensLbl: UILabel! + + lazy var persistentContainer: NSPersistentContainer = { + let container = NSPersistentContainer(name: ViewController.CORE_DATA_NAME) + container.loadPersistentStores(completionHandler: { (storeDescription, error) in + if let error = error as NSError? { + fatalError("Unresolved error \(error), \(error.userInfo)") + } + }) + return container + }() + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + let defaults = UserDefaults.standard + let cameraLens = defaults.integer(forKey: "camera_lens") + + if(cameraLens == 0) { + cameraLensSwitch.isOn = false + cameraLensLbl.text = "Back" + } else { + cameraLensSwitch.isOn = true + cameraLensLbl.text = "Front" + } + + let livenessThreshold = defaults.float(forKey: "liveness_threshold") + livenessThresholdLbl.text = String(livenessThreshold) + + let identifyThreshold = defaults.float(forKey: "identify_threshold") + identifyThresholdLbl.text = String(identifyThreshold) + } + + static func setDefaultSettings() { + let defaults = UserDefaults.standard + let defaultChanged = defaults.bool(forKey: "default_changed") + if(defaultChanged == false) { + defaults.set(true, forKey: "default_changed") + + defaults.set(SettingsViewController.CAMERA_LENS_DEFAULT, forKey: "camera_lens") + defaults.set(SettingsViewController.LIVENESS_THRESHOLD_DEFAULT, forKey: "liveness_threshold") + defaults.set(SettingsViewController.IDENTIFY_THRESHOLD_DEFAULT, forKey: "identify_threshold") + } + } + + @IBAction func done_clicked(_ sender: Any) { + if let vc = self.presentingViewController as? ViewController { + self.dismiss(animated: true, completion: { + vc.personView.reloadData() + }) + } + } + + @IBAction func cameraLens_switch(_ sender: Any) { + let defaults = UserDefaults.standard + if(cameraLensSwitch.isOn) { + defaults.set(1, forKey: "camera_lens") + cameraLensLbl.text = "Front" + } else { + defaults.set(0, forKey: "camera_lens") + cameraLensLbl.text = "Back" + } + } + + + @IBAction func livenessThreshold_clicked(_ sender: Any) { + + let title = "Liveness threshold" + let alertController = UIAlertController(title: title, message: "Please input a number between 0 and 1.", preferredStyle: .alert) + + let minimum = Float(0) + let maximum = Float(1) + alertController.addTextField { (textField) in + textField.keyboardType = .decimalPad + + let defaults = UserDefaults.standard + textField.text = String(defaults.float(forKey: "liveness_threshold")) + } + + let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil) + + let submitAction = UIAlertAction(title: "Ok", style: .default) { (action) in + + var hasError = false + var errorStr = "" + let defaults = UserDefaults.standard + + if let numberString = alertController.textFields?.first?.text, let number = Float(numberString) { + if(number < Float(minimum) || number > Float(maximum)) { + hasError = true + errorStr = "Invalid value" + } else { + self.livenessThresholdLbl.text = String(number) + defaults.set(number, forKey: "liveness_threshold") + } + } else { + hasError = true + errorStr = "Invalid value" + } + + if(hasError) { + let errorNotification = UIAlertController(title: "Error", message: errorStr, preferredStyle: .alert) + let okAction = UIAlertAction(title: "OK", style: .default, handler: nil) + errorNotification.addAction(okAction) + self.present(errorNotification, animated: true, completion: nil) + + DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { + errorNotification.dismiss(animated: true, completion: nil) + } + } + } + + alertController.addAction(cancelAction) + alertController.addAction(submitAction) + + present(alertController, animated: true, completion: nil) + } + + @IBAction func identifyThreshold_clicked(_ sender: Any) { + + let title = "Identify threshold" + let alertController = UIAlertController(title: title, message: "Please input a number between 0 and 1.", preferredStyle: .alert) + + let minimum = Float(0) + let maximum = Float(1) + alertController.addTextField { (textField) in + textField.keyboardType = .decimalPad + + let defaults = UserDefaults.standard + textField.text = String(defaults.float(forKey: "identify_threshold")) + } + + let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil) + + let submitAction = UIAlertAction(title: "Ok", style: .default) { (action) in + + var hasError = false + var errorStr = "" + let defaults = UserDefaults.standard + + if let numberString = alertController.textFields?.first?.text, let number = Float(numberString) { + if(number < Float(minimum) || number > Float(maximum)) { + hasError = true + errorStr = "Invalid value" + } else { + self.identifyThresholdLbl.text = String(number) + defaults.set(number, forKey: "identify_threshold") + } + } else { + hasError = true + errorStr = "Invalid value" + } + + if(hasError) { + let errorNotification = UIAlertController(title: "Error", message: errorStr, preferredStyle: .alert) + let okAction = UIAlertAction(title: "OK", style: .default, handler: nil) + errorNotification.addAction(okAction) + self.present(errorNotification, animated: true, completion: nil) + + DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { + errorNotification.dismiss(animated: true, completion: nil) + } + } + } + + alertController.addAction(cancelAction) + alertController.addAction(submitAction) + + present(alertController, animated: true, completion: nil) + } + + + @IBAction func restore_settings_clicked(_ sender: Any) { + let defaults = UserDefaults.standard + defaults.set(false, forKey: "default_changed") + + SettingsViewController.setDefaultSettings() + showToast(message: "The default settings has been restored.") + } + + + @IBAction func clear_all_person_clicked(_ sender: Any) { + + let context = self.persistentContainer.viewContext + let fetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: ViewController.ENTITIES_NAME) + + do { + let persons = try context.fetch(fetchRequest) as! [NSManagedObject] + for person in persons { + context.delete(person) + } + try context.save() + } catch { + print("Failed fetching: \(error)") + } + + showToast(message: "All personal data has been cleared.") + } +} + diff --git a/FaceRecognition/ToastView.swift b/FaceRecognition/ToastView.swift new file mode 100644 index 0000000..d778c41 --- /dev/null +++ b/FaceRecognition/ToastView.swift @@ -0,0 +1,60 @@ + +import UIKit + +class ToastView: UIView { + private let messageLabel: UILabel = UILabel() + + init(message: String) { + super.init(frame: .zero) + configureUI() + setMessage(message) + } + + required init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + private func configureUI() { + backgroundColor = UIColor(named: "clr_toast_bg") + layer.cornerRadius = 8 + clipsToBounds = true + + messageLabel.textColor = UIColor(named: "clr_text") + messageLabel.font = UIFont.systemFont(ofSize: 16) + messageLabel.numberOfLines = 0 + messageLabel.textAlignment = .center + addSubview(messageLabel) + messageLabel.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + messageLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 16), + messageLabel.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -16), + messageLabel.topAnchor.constraint(equalTo: topAnchor, constant: 16), + messageLabel.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -16) + ]) + } + + private func setMessage(_ message: String) { + messageLabel.text = message + } +} + +func showToast(message: String, duration: TimeInterval = 2.0) { + let toastView = ToastView(message: message) + if let window = UIApplication.shared.windows.first { + window.addSubview(toastView) + toastView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + toastView.centerXAnchor.constraint(equalTo: window.centerXAnchor), + toastView.bottomAnchor.constraint(equalTo: window.bottomAnchor, constant: -100), + toastView.leadingAnchor.constraint(greaterThanOrEqualTo: window.leadingAnchor, constant: 16), + toastView.trailingAnchor.constraint(lessThanOrEqualTo: window.trailingAnchor, constant: -16), + toastView.widthAnchor.constraint(greaterThanOrEqualToConstant: 300) + ]) + + UIView.animate(withDuration: 0.2, delay: duration, options: .curveEaseInOut) { + toastView.alpha = 0 + } completion: { _ in + toastView.removeFromSuperview() + } + } +} diff --git a/FaceRecognition/UIImageExtension.swift b/FaceRecognition/UIImageExtension.swift new file mode 100644 index 0000000..710a5d6 --- /dev/null +++ b/FaceRecognition/UIImageExtension.swift @@ -0,0 +1,117 @@ +import Foundation +import UIKit + + +public extension UIImage { + + func cropFace(faceBox: FaceBox) -> UIImage? { + let centerX = Int((faceBox.x1 + faceBox.x2) / 2) + let centerY = Int((faceBox.y1 + faceBox.y2) / 2) + let cropWidth = Int(Float(faceBox.x2 - faceBox.x1) * Float(1.4)) + + let cropX1 = Int(Float(centerX) - Float(cropWidth / 2)) + let cropX2 = Int(Float(centerY) - Float(cropWidth / 2)) + let cropRect = CGRect(x: CGFloat(cropX1), y: CGFloat(cropX2), width: CGFloat(cropWidth), height: CGFloat(cropWidth)) + + guard let croppedImage = self.cgImage!.cropping(to: cropRect) else { return nil } + + let faceImage = UIImage(cgImage: croppedImage) + + let renderer = UIGraphicsImageRenderer(size: CGSize(width: 150, height: 150)) + let newImage = renderer.image { (context) in + faceImage.draw(in: CGRect(origin: .zero, size: CGSize(width: 150, height: 150))) + } + return newImage + } + + /// Extension to fix orientation of an UIImage without EXIF + func fixOrientation() -> UIImage { + + guard let cgImage = cgImage else { return self } + + if imageOrientation == .up { return self } + + var transform = CGAffineTransform.identity + + switch imageOrientation { + + case .down, .downMirrored: + transform = transform.translatedBy(x: size.width, y: size.height) + transform = transform.rotated(by: CGFloat(Double.pi)) + + case .left, .leftMirrored: + transform = transform.translatedBy(x: size.width, y: 0) + transform = transform.rotated(by: CGFloat(Double.pi/2)) + + case .right, .rightMirrored: + transform = transform.translatedBy(x: 0, y : size.height) + transform = transform.rotated(by: CGFloat(-Double.pi/2)) + + case .up, .upMirrored: + break + } + + switch imageOrientation { + + case .upMirrored, .downMirrored: + transform.translatedBy(x: size.width, y: 0) + transform.scaledBy(x: -1, y: 1) + + case .leftMirrored, .rightMirrored: + transform.translatedBy(x: size.height, y: 0) + transform.scaledBy(x: -1, y: 1) + + case .up, .down, .left, .right: + break + } + + 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) { + + ctx.concatenate(transform) + + switch imageOrientation { + + case .left, .leftMirrored, .right, .rightMirrored: + ctx.draw(cgImage, in: CGRect(x: 0, y: 0, width: size.height, height: size.width)) + + default: + ctx.draw(cgImage, in: CGRect(x: 0, y: 0, width: size.width, height: size.height)) + } + + if let finalImage = ctx.makeImage() { + return (UIImage(cgImage: finalImage)) + } + } + + // something failed -- return original + return self + } + + func rotate(radians: CGFloat) -> UIImage { + let rotatedSize = CGRect(origin: .zero, size: size) + .applying(CGAffineTransform(rotationAngle: radians)) + .integral.size + UIGraphicsBeginImageContext(rotatedSize) + if let context = UIGraphicsGetCurrentContext() { + context.translateBy(x: rotatedSize.width / 2, y: rotatedSize.height / 2) + context.rotate(by: radians) + draw(in: CGRect(x: -size.width / 2, y: -size.height / 2, width: size.width, height: size.height)) + let rotatedImage = UIGraphicsGetImageFromCurrentImageContext() + UIGraphicsEndImageContext() + return rotatedImage ?? self + } + return self + } + + // Extension to flip UIImage horizontally + func flipHorizontally() -> UIImage { + UIGraphicsBeginImageContextWithOptions(size, false, scale) + let context = UIGraphicsGetCurrentContext()! + context.translateBy(x: size.width, y: 0) + context.scaleBy(x: -1.0, y: 1.0) + draw(in: CGRect(origin: .zero, size: size)) + let flippedImage = UIGraphicsGetImageFromCurrentImageContext()! + UIGraphicsEndImageContext() + return flippedImage + } +} diff --git a/FaceRecognition/ViewController.swift b/FaceRecognition/ViewController.swift new file mode 100644 index 0000000..e886c59 --- /dev/null +++ b/FaceRecognition/ViewController.swift @@ -0,0 +1,284 @@ +import UIKit +import AVFoundation +import CoreData + +class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UITableViewDataSource, UITableViewDelegate, PersonViewCellDelegate{ + + static let CORE_DATA_NAME = "Model" + static let ENTITIES_NAME = "Person" + static let ATTRIBUTE_NAME = "name" + static let ATTRIBUTE_FACE = "face" + static let ATTRIBUTE_TEMPLATES = "templates" + + @IBOutlet weak var warningLbl: UILabel! + + @IBOutlet weak var enrollBtnView: UIView! + @IBOutlet weak var identifyBtnView: UIView! + @IBOutlet weak var settingsBtnView: UIView! + @IBOutlet weak var aboutBtnView: UIView! + + @IBOutlet weak var personView: UITableView! + + + lazy var persistentContainer: NSPersistentContainer = { + let container = NSPersistentContainer(name: ViewController.CORE_DATA_NAME) + container.loadPersistentStores(completionHandler: { (storeDescription, error) in + if let error = error as NSError? { + fatalError("Unresolved error \(error), \(error.userInfo)") + } + }) + return container + }() + + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + + var ret = FaceSDK.setActivation("bv5lxJJiUWq/TW3LDv4VUIQLMRN0TeOQSaMmAvt1jIRwfTjMIIh9IZxl5R1wncfiituo8sf9N+62" + + "L+CcSdMdDNBaXAdwWNRvahc8G4cUTpH6jcchgqdf0evH/syEqvc4ew8ZXDf/kyMYFMwhXPWsuuDA" + + "mxZrbrdZPHMJgTBNTKOP0ntD2ao81sSpCaXsEaIe6eYGJRUiJ5txMERM5Q3w6bnZEXjvBu1kXsup" + + "OEYrxnynCxK4OodTp1M5VscT8THm+QKLnxRX7X69hD1zfIUKTlMXrLWFmGSmWJeC5Z/MzHqkuqOd" + + "bSNBO/7yHLCil6ViA7VY7scdto2yyaF7yZakQg==") + + if(ret == SDK_SUCCESS.rawValue) { + ret = FaceSDK.initSDK() + } + + if(ret != SDK_SUCCESS.rawValue) { + warningLbl.isHidden = false + + if(ret == SDK_LICENSE_KEY_ERROR.rawValue) { + warningLbl.text = "Invalid license!" + } else if(ret == SDK_LICENSE_APPID_ERROR.rawValue) { + warningLbl.text = "Invalid license!" + } else if(ret == SDK_LICENSE_EXPIRED.rawValue) { + warningLbl.text = "License expired!" + } else if(ret == SDK_NO_ACTIVATED.rawValue) { + warningLbl.text = "No activated!" + } else if(ret == SDK_INIT_ERROR.rawValue) { + warningLbl.text = "Init error!" + } + } + + SettingsViewController.setDefaultSettings() + + personView.delegate = self + personView.dataSource = self + personView.separatorStyle = .none + personView.reloadData() + } + + @IBAction func enroll_touch_down(_ sender: Any) { + UIView.animate(withDuration: 0.5) { + self.enrollBtnView.backgroundColor = UIColor(named: "clr_main_button_bg2") // Change to desired color + } + } + + @IBAction func enroll_touch_cancel(_ sender: Any) { + UIView.animate(withDuration: 0.5) { + self.enrollBtnView.backgroundColor = UIColor(named: "clr_main_button_bg1") // Change to desired color + } + } + + @IBAction func enroll_clicked(_ sender: Any) { + UIView.animate(withDuration: 0.5) { + self.enrollBtnView.backgroundColor = UIColor(named: "clr_main_button_bg1") // Change to desired color + } + + let imagePicker = UIImagePickerController() + imagePicker.sourceType = .photoLibrary + imagePicker.delegate = self + present(imagePicker, animated: true, completion: nil) + } + + + @IBAction func identify_touch_down(_ sender: Any) { + UIView.animate(withDuration: 0.5) { + self.identifyBtnView.backgroundColor = UIColor(named: "clr_main_button_bg2") // Change to desired color + } + } + + @IBAction func identify_touch_up(_ sender: Any) { + UIView.animate(withDuration: 0.5) { + self.identifyBtnView.backgroundColor = UIColor(named: "clr_main_button_bg1") // Change to desired color + } + } + + @IBAction func identify_clicked(_ sender: Any) { + UIView.animate(withDuration: 0.5) { + self.identifyBtnView.backgroundColor = UIColor(named: "clr_main_button_bg1") // Change to desired color + } + + performSegue(withIdentifier: "camera", sender: self) + } + + + @IBAction func settings_touch_down(_ sender: Any) { + UIView.animate(withDuration: 0.5) { + self.settingsBtnView.backgroundColor = UIColor(named: "clr_main_button_bg2") // Change to desired color + } + } + + + @IBAction func settings_touch_up(_ sender: Any) { + UIView.animate(withDuration: 0.5) { + self.settingsBtnView.backgroundColor = UIColor(named: "clr_main_button_bg1") // Change to desired color + } + } + + @IBAction func settings_clicked(_ sender: Any) { + UIView.animate(withDuration: 0.5) { + self.settingsBtnView.backgroundColor = UIColor(named: "clr_main_button_bg1") // Change to desired color + } + + performSegue(withIdentifier: "settings", sender: self) + } + + @IBAction func about_touch_down(_ sender: Any) { + UIView.animate(withDuration: 0.5) { + self.aboutBtnView.backgroundColor = UIColor(named: "clr_main_button_bg2") // Change to desired color + } + } + + + @IBAction func about_touch_up(_ sender: Any) { + UIView.animate(withDuration: 0.5) { + self.aboutBtnView.backgroundColor = UIColor(named: "clr_main_button_bg1") // Change to desired color + } + } + + @IBAction func about_clicked(_ sender: Any) { + UIView.animate(withDuration: 0.5) { + self.aboutBtnView.backgroundColor = UIColor(named: "clr_main_button_bg1") // Change to desired color + } + + performSegue(withIdentifier: "about", sender: self) + } + + @IBAction func brand_clicked(_ sender: Any) { + let webURL = URL(string: "https://kby-ai.com") + UIApplication.shared.open(webURL!, options: [:], completionHandler: nil) + } + + + func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { + + dismiss(animated: true, completion: nil) + + guard let image = info[.originalImage] as? UIImage else { + return + } + + let fixed_image = image.fixOrientation() + let faceBoxes = FaceSDK.faceDetection(fixed_image) + if(faceBoxes.count == 0) { + showToast(message: "No face detected!") + return + } else if(faceBoxes.count > 1) { + showToast(message: "Multiple face detected!") + } + + for faceBox in (faceBoxes as NSArray as! [FaceBox]) { + + let templates = FaceSDK.templateExtraction(fixed_image, faceBox: faceBox) + if(templates.isEmpty) { + continue + } + + let faceImage = fixed_image.cropFace(faceBox: faceBox) + + let context = self.persistentContainer.viewContext + let entity = NSEntityDescription.entity(forEntityName: ViewController.ENTITIES_NAME, in: context)! + let user = NSManagedObject(entity: entity, insertInto: context) + + let name = "Person" + String(Int.random(in: 10000...20000)) + let face = faceImage!.jpegData(compressionQuality: CGFloat(1.0)) + + user.setValue(name, forKey: ViewController.ATTRIBUTE_NAME) + user.setValue(templates, forKey: ViewController.ATTRIBUTE_TEMPLATES) + user.setValue(face, forKey: ViewController.ATTRIBUTE_FACE) + + do { + try context.save() + } catch let error as NSError { + print("Could not save. \(error), \(error.userInfo)") + } + } + + personView.reloadData() + showToast(message: "Person enrolled!") + } + + func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { + dismiss(animated: true, completion: nil) + } + + // UITableViewDataSource methods + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + // Return the number of cells in the table view + + let context = self.persistentContainer.viewContext + let count = try! context.count(for: NSFetchRequest(entityName: ViewController.ENTITIES_NAME)) + + return count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + // Get the table view cell for the specified index path + let cell = tableView.dequeueReusableCell(withIdentifier: "PersonCell", for: indexPath) as! PersonViewCell + cell.delegate = self + cell.indexPath = indexPath + + let context = self.persistentContainer.viewContext + let fetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: ViewController.ENTITIES_NAME) + do { + let persons = try context.fetch(fetchRequest) as! [NSManagedObject] + var rowCount = 0 + for person in persons { + if(rowCount == indexPath.row) { + cell.nameLbl.text = person.value(forKey: ViewController.ATTRIBUTE_NAME) as? String + cell.faceImage.image = UIImage(data: person.value(forKey: ViewController.ATTRIBUTE_FACE) as! Data) + + break + } + rowCount = rowCount + 1 + } + } catch { + print("Failed fetching: \(error)") + } + + // Customize the cell + return cell + } + + // UITableViewDelegate methods + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + // Handle cell selection + tableView.deselectRow(at: indexPath, animated: true) + } + + func didPersonDelete(_ cell: UITableViewCell) { + let context = self.persistentContainer.viewContext + let fetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: ViewController.ENTITIES_NAME) + let personCell = cell as! PersonViewCell + + do { + let persons = try context.fetch(fetchRequest) as! [NSManagedObject] + var rowCount = 0 + for person in persons { + if(rowCount == personCell.indexPath?.row) { + context.delete(person) + try context.save() + break + } + rowCount = rowCount + 1 + } + } catch { + print("Failed fetching: \(error)") + } + + self.personView.reloadData() + } +} + diff --git a/FaceRecognitionTests/FaceRecognitionTests.swift b/FaceRecognitionTests/FaceRecognitionTests.swift new file mode 100644 index 0000000..1dc6871 --- /dev/null +++ b/FaceRecognitionTests/FaceRecognitionTests.swift @@ -0,0 +1,36 @@ +// +// FaceRecognitionTests.swift +// FaceRecognitionTests +// +// Created by user on 4/17/23. +// + +import XCTest +@testable import FaceRecognition + +final class FaceRecognitionTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + // Any test you write for XCTest can be annotated as throws and async. + // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. + // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/FaceRecognitionUITests/FaceRecognitionUITests.swift b/FaceRecognitionUITests/FaceRecognitionUITests.swift new file mode 100644 index 0000000..af0b193 --- /dev/null +++ b/FaceRecognitionUITests/FaceRecognitionUITests.swift @@ -0,0 +1,41 @@ +// +// FaceRecognitionUITests.swift +// FaceRecognitionUITests +// +// Created by user on 4/17/23. +// + +import XCTest + +final class FaceRecognitionUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // 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. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testLaunchPerformance() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/FaceRecognitionUITests/FaceRecognitionUITestsLaunchTests.swift b/FaceRecognitionUITests/FaceRecognitionUITestsLaunchTests.swift new file mode 100644 index 0000000..6e8ccb2 --- /dev/null +++ b/FaceRecognitionUITests/FaceRecognitionUITestsLaunchTests.swift @@ -0,0 +1,32 @@ +// +// FaceRecognitionUITestsLaunchTests.swift +// FaceRecognitionUITests +// +// Created by user on 4/17/23. +// + +import XCTest + +final class FaceRecognitionUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +} diff --git a/facesdk.framework/Headers/facesdk.h b/facesdk.framework/Headers/facesdk.h new file mode 100644 index 0000000..e4c2bd5 --- /dev/null +++ b/facesdk.framework/Headers/facesdk.h @@ -0,0 +1,19 @@ +// +// facesdk.h +// facesdk +// +// Created by user on 4/12/23. +// + +#import <Foundation/Foundation.h> + +//! Project version number for facesdk. +FOUNDATION_EXPORT double facesdkVersionNumber; + +//! Project version string for facesdk. +FOUNDATION_EXPORT const unsigned char facesdkVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import <facesdk/PublicHeader.h> + + +#include "facesdk_api.h" diff --git a/facesdk.framework/Headers/facesdk_api.h b/facesdk.framework/Headers/facesdk_api.h new file mode 100644 index 0000000..cd4e30d --- /dev/null +++ b/facesdk.framework/Headers/facesdk_api.h @@ -0,0 +1,38 @@ +#import <Foundation/Foundation.h> +#import <UIKit/UIKit.h> + +NS_ASSUME_NONNULL_BEGIN + +enum SDK_ERROR +{ + SDK_SUCCESS = 0, + SDK_LICENSE_KEY_ERROR = -1, + SDK_LICENSE_APPID_ERROR = -2, + SDK_LICENSE_EXPIRED = -3, + SDK_NO_ACTIVATED = -4, + SDK_INIT_ERROR = -5, +}; + +@interface FaceBox : NSObject + +@property (nonatomic) int x1; +@property (nonatomic) int y1; +@property (nonatomic) int x2; +@property (nonatomic) int y2; +@property (nonatomic) float liveness; +@property (nonatomic) float yaw; +@property (nonatomic) float roll; +@property (nonatomic) float pitch; +@end + +@interface FaceSDK : NSObject + ++(int) setActivation: (NSString*) license; ++(int) initSDK; ++(NSMutableArray*) faceDetection: (UIImage*) image; ++(NSData*) templateExtraction: (UIImage*) image faceBox: (FaceBox*) faceBox; ++(float) similarityCalculation: (NSData*) templates1 templates2: (NSData*) templates2; + +@end + +NS_ASSUME_NONNULL_END diff --git a/facesdk.framework/Info.plist b/facesdk.framework/Info.plist new file mode 100644 index 0000000..10898d4 Binary files /dev/null and b/facesdk.framework/Info.plist differ diff --git a/facesdk.framework/Modules/module.modulemap b/facesdk.framework/Modules/module.modulemap new file mode 100644 index 0000000..28bee10 --- /dev/null +++ b/facesdk.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module facesdk { + umbrella header "facesdk.h" + + export * + module * { export * } +} diff --git a/facesdk.framework/_CodeSignature/CodeResources b/facesdk.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..96ada2a --- /dev/null +++ b/facesdk.framework/_CodeSignature/CodeResources @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>files</key> + <dict> + <key>Headers/facesdk.h</key> + <data> + iXedJdnTNjJdkav0lex0htXPBa8= + </data> + <key>Headers/facesdk_api.h</key> + <data> + nvq2BAwf5zwJ4Ztl7CQydAFcrZo= + </data> + <key>Info.plist</key> + <data> + +SvIfsGnFHBVJaHBQiElfACQ340= + </data> + <key>Modules/module.modulemap</key> + <data> + X8zglrv2quSgEMFeVf0TybJa6gA= + </data> + <key>detection.bin</key> + <data> + G52JYi47ACwak8HkEcpkm9zo1as= + </data> + <key>detection.param</key> + <data> + tHFm7ohczZG7KEtACVgRSjX3XIA= + </data> + <key>landmark.bin</key> + <data> + YwuxUSePlqnFEDLD95H35rgexRI= + </data> + <key>landmark.param</key> + <data> + HHZGt8b9GPLjgGplhK/7hcOW0Mo= + </data> + <key>liveness.bin</key> + <data> + qh1obYoGNe0LoyD5JBmUkdeYrEY= + </data> + <key>mfn.bin</key> + <data> + 44c7zIxObpyYRRgGO9WjmAsw/s0= + </data> + </dict> + <key>files2</key> + <dict> + <key>Headers/facesdk.h</key> + <dict> + <key>hash2</key> + <data> + CEHWZwXGt6HTp0cWeGAWrhBufzotOw42QLbWl2FjbpE= + </data> + </dict> + <key>Headers/facesdk_api.h</key> + <dict> + <key>hash2</key> + <data> + AzDRsIwSMWBPsvoOmXuBP3EefyILyncJlo/a6keydI0= + </data> + </dict> + <key>Modules/module.modulemap</key> + <dict> + <key>hash2</key> + <data> + MPLn3hXOxK25/iaEZAyvAIf2qaUvsHUOWkHsaZrg7LY= + </data> + </dict> + <key>detection.bin</key> + <dict> + <key>hash2</key> + <data> + aSBPVzW2w5vueXMHRoelxdPFfzE45CIHzJJfvcmNVVc= + </data> + </dict> + <key>detection.param</key> + <dict> + <key>hash2</key> + <data> + yb/QW3dSgGun1LdCqss+oipjB11F0sE0NtewKSJibFo= + </data> + </dict> + <key>landmark.bin</key> + <dict> + <key>hash2</key> + <data> + q59zkpnecoyeYz1houDmoVK0+ROe2x8l/0dtpqDC9Ic= + </data> + </dict> + <key>landmark.param</key> + <dict> + <key>hash2</key> + <data> + nkGOHyOPviHWfG8E67n+geJfRcw+yc7qGU4famEpZNc= + </data> + </dict> + <key>liveness.bin</key> + <dict> + <key>hash2</key> + <data> + 3XjsZ9HffijptH6kD8YcgXR9DwsM2tDsYTNDvdErRkE= + </data> + </dict> + <key>mfn.bin</key> + <dict> + <key>hash2</key> + <data> + NZcoiSgg4LgzyYzDPjuYJ+d2nbqCFMR2pg9ZrjwPtDE= + </data> + </dict> + </dict> + <key>rules</key> + <dict> + <key>^.*</key> + <true/> + <key>^.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^Base\.lproj/</key> + <dict> + <key>weight</key> + <real>1010</real> + </dict> + <key>^version.plist$</key> + <true/> + </dict> + <key>rules2</key> + <dict> + <key>.*\.dSYM($|/)</key> + <dict> + <key>weight</key> + <real>11</real> + </dict> + <key>^(.*/)?\.DS_Store$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>2000</real> + </dict> + <key>^.*</key> + <true/> + <key>^.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^Base\.lproj/</key> + <dict> + <key>weight</key> + <real>1010</real> + </dict> + <key>^Info\.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^PkgInfo$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^embedded\.provisionprofile$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^version\.plist$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + </dict> +</dict> +</plist> diff --git a/facesdk.framework/detection.bin b/facesdk.framework/detection.bin new file mode 100644 index 0000000..e1af3b5 Binary files /dev/null and b/facesdk.framework/detection.bin differ diff --git a/facesdk.framework/detection.param b/facesdk.framework/detection.param new file mode 100644 index 0000000..4bbbabb --- /dev/null +++ b/facesdk.framework/detection.param @@ -0,0 +1,236 @@ +7767517 +234 255 +Input data 0 1 data 0=60 1=60 2=3 +Split splitncnn_0 1 4 data data_splitncnn_0 data_splitncnn_1 data_splitncnn_2 data_splitncnn_3 +Convolution conv1 1 1 data_splitncnn_3 conv_blob1 0=8 1=3 2=1 3=2 4=1 5=0 6=216 +BatchNorm batch_norm1 1 1 conv_blob1 batch_norm_blob1 0=8 +Scale bn_scale1 1 1 batch_norm_blob1 batch_norm_blob1_bn_scale1 0=8 1=1 +ReLU relu1 1 1 batch_norm_blob1_bn_scale1 relu_blob1 +ConvolutionDepthWise conv2 1 1 relu_blob1 conv_blob2 0=8 1=3 2=1 3=1 4=1 5=0 6=72 7=8 +BatchNorm batch_norm2 1 1 conv_blob2 batch_norm_blob2 0=8 +Scale bn_scale2 1 1 batch_norm_blob2 batch_norm_blob2_bn_scale2 0=8 1=1 +ReLU relu2 1 1 batch_norm_blob2_bn_scale2 relu_blob2 +Convolution conv3 1 1 relu_blob2 conv_blob3 0=16 1=1 2=1 3=1 4=0 5=0 6=128 +BatchNorm batch_norm3 1 1 conv_blob3 batch_norm_blob3 0=16 +Scale bn_scale3 1 1 batch_norm_blob3 batch_norm_blob3_bn_scale3 0=16 1=1 +ReLU relu3 1 1 batch_norm_blob3_bn_scale3 relu_blob3 +ConvolutionDepthWise conv4 1 1 relu_blob3 conv_blob4 0=16 1=3 2=1 3=2 4=1 5=0 6=144 7=16 +BatchNorm batch_norm4 1 1 conv_blob4 batch_norm_blob4 0=16 +Scale bn_scale4 1 1 batch_norm_blob4 batch_norm_blob4_bn_scale4 0=16 1=1 +ReLU relu4 1 1 batch_norm_blob4_bn_scale4 relu_blob4 +Convolution conv5 1 1 relu_blob4 conv_blob5 0=32 1=1 2=1 3=1 4=0 5=0 6=512 +BatchNorm batch_norm5 1 1 conv_blob5 batch_norm_blob5 0=32 +Scale bn_scale5 1 1 batch_norm_blob5 batch_norm_blob5_bn_scale5 0=32 1=1 +ReLU relu5 1 1 batch_norm_blob5_bn_scale5 relu_blob5 +ConvolutionDepthWise conv6 1 1 relu_blob5 conv_blob6 0=32 1=3 2=1 3=1 4=1 5=0 6=288 7=32 +BatchNorm batch_norm6 1 1 conv_blob6 batch_norm_blob6 0=32 +Scale bn_scale6 1 1 batch_norm_blob6 batch_norm_blob6_bn_scale6 0=32 1=1 +ReLU relu6 1 1 batch_norm_blob6_bn_scale6 relu_blob6 +Convolution conv7 1 1 relu_blob6 conv_blob7 0=32 1=1 2=1 3=1 4=0 5=0 6=1024 +BatchNorm batch_norm7 1 1 conv_blob7 batch_norm_blob7 0=32 +Scale bn_scale7 1 1 batch_norm_blob7 batch_norm_blob7_bn_scale7 0=32 1=1 +ReLU relu7 1 1 batch_norm_blob7_bn_scale7 relu_blob7 +ConvolutionDepthWise conv8 1 1 relu_blob7 conv_blob8 0=32 1=3 2=1 3=2 4=1 5=0 6=288 7=32 +BatchNorm batch_norm8 1 1 conv_blob8 batch_norm_blob8 0=32 +Scale bn_scale8 1 1 batch_norm_blob8 batch_norm_blob8_bn_scale8 0=32 1=1 +ReLU relu8 1 1 batch_norm_blob8_bn_scale8 relu_blob8 +Convolution conv9 1 1 relu_blob8 conv_blob9 0=64 1=1 2=1 3=1 4=0 5=0 6=2048 +BatchNorm batch_norm9 1 1 conv_blob9 batch_norm_blob9 0=64 +Scale bn_scale9 1 1 batch_norm_blob9 batch_norm_blob9_bn_scale9 0=64 1=1 +ReLU relu9 1 1 batch_norm_blob9_bn_scale9 relu_blob9 +ConvolutionDepthWise conv10 1 1 relu_blob9 conv_blob10 0=64 1=3 2=1 3=1 4=1 5=0 6=576 7=64 +BatchNorm batch_norm10 1 1 conv_blob10 batch_norm_blob10 0=64 +Scale bn_scale10 1 1 batch_norm_blob10 batch_norm_blob10_bn_scale10 0=64 1=1 +ReLU relu10 1 1 batch_norm_blob10_bn_scale10 relu_blob10 +Convolution conv11 1 1 relu_blob10 conv_blob11 0=64 1=1 2=1 3=1 4=0 5=0 6=4096 +BatchNorm batch_norm11 1 1 conv_blob11 batch_norm_blob11 0=64 +Scale bn_scale11 1 1 batch_norm_blob11 batch_norm_blob11_bn_scale11 0=64 1=1 +ReLU relu11 1 1 batch_norm_blob11_bn_scale11 relu_blob11 +Split splitncnn_1 1 2 relu_blob11 relu_blob11_splitncnn_0 relu_blob11_splitncnn_1 +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 +BatchNorm batch_norm12 1 1 conv_blob12 batch_norm_blob12 0=64 +Scale bn_scale12 1 1 batch_norm_blob12 batch_norm_blob12_bn_scale12 0=64 1=1 +ReLU relu12 1 1 batch_norm_blob12_bn_scale12 relu_blob12 +Convolution conv13 1 1 relu_blob12 conv_blob13 0=128 1=1 2=1 3=1 4=0 5=0 6=8192 +BatchNorm batch_norm13 1 1 conv_blob13 batch_norm_blob13 0=128 +Scale bn_scale13 1 1 batch_norm_blob13 batch_norm_blob13_bn_scale13 0=128 1=1 +ReLU relu13 1 1 batch_norm_blob13_bn_scale13 relu_blob13 +ConvolutionDepthWise conv14 1 1 relu_blob13 conv_blob14 0=128 1=3 2=1 3=1 4=1 5=0 6=1152 7=128 +BatchNorm batch_norm14 1 1 conv_blob14 batch_norm_blob14 0=128 +Scale bn_scale14 1 1 batch_norm_blob14 batch_norm_blob14_bn_scale14 0=128 1=1 +ReLU relu14 1 1 batch_norm_blob14_bn_scale14 relu_blob14 +Convolution conv15 1 1 relu_blob14 conv_blob15 0=128 1=1 2=1 3=1 4=0 5=0 6=16384 +BatchNorm batch_norm15 1 1 conv_blob15 batch_norm_blob15 0=128 +Scale bn_scale15 1 1 batch_norm_blob15 batch_norm_blob15_bn_scale15 0=128 1=1 +ReLU relu15 1 1 batch_norm_blob15_bn_scale15 relu_blob15 +ConvolutionDepthWise conv16 1 1 relu_blob15 conv_blob16 0=128 1=3 2=1 3=1 4=1 5=0 6=1152 7=128 +BatchNorm batch_norm16 1 1 conv_blob16 batch_norm_blob16 0=128 +Scale bn_scale16 1 1 batch_norm_blob16 batch_norm_blob16_bn_scale16 0=128 1=1 +ReLU relu16 1 1 batch_norm_blob16_bn_scale16 relu_blob16 +Convolution conv17 1 1 relu_blob16 conv_blob17 0=128 1=1 2=1 3=1 4=0 5=0 6=16384 +BatchNorm batch_norm17 1 1 conv_blob17 batch_norm_blob17 0=128 +Scale bn_scale17 1 1 batch_norm_blob17 batch_norm_blob17_bn_scale17 0=128 1=1 +ReLU relu17 1 1 batch_norm_blob17_bn_scale17 relu_blob17 +ConvolutionDepthWise conv18 1 1 relu_blob17 conv_blob18 0=128 1=3 2=1 3=1 4=1 5=0 6=1152 7=128 +BatchNorm batch_norm18 1 1 conv_blob18 batch_norm_blob18 0=128 +Scale bn_scale18 1 1 batch_norm_blob18 batch_norm_blob18_bn_scale18 0=128 1=1 +ReLU relu18 1 1 batch_norm_blob18_bn_scale18 relu_blob18 +Convolution conv19 1 1 relu_blob18 conv_blob19 0=128 1=1 2=1 3=1 4=0 5=0 6=16384 +BatchNorm batch_norm19 1 1 conv_blob19 batch_norm_blob19 0=128 +Scale bn_scale19 1 1 batch_norm_blob19 batch_norm_blob19_bn_scale19 0=128 1=1 +ReLU relu19 1 1 batch_norm_blob19_bn_scale19 relu_blob19 +ConvolutionDepthWise conv20 1 1 relu_blob19 conv_blob20 0=128 1=3 2=1 3=1 4=1 5=0 6=1152 7=128 +BatchNorm batch_norm20 1 1 conv_blob20 batch_norm_blob20 0=128 +Scale bn_scale20 1 1 batch_norm_blob20 batch_norm_blob20_bn_scale20 0=128 1=1 +ReLU relu20 1 1 batch_norm_blob20_bn_scale20 relu_blob20 +Convolution conv21 1 1 relu_blob20 conv_blob21 0=128 1=1 2=1 3=1 4=0 5=0 6=16384 +BatchNorm batch_norm21 1 1 conv_blob21 batch_norm_blob21 0=128 +Scale bn_scale21 1 1 batch_norm_blob21 batch_norm_blob21_bn_scale21 0=128 1=1 +ReLU relu21 1 1 batch_norm_blob21_bn_scale21 relu_blob21 +ConvolutionDepthWise conv22 1 1 relu_blob21 conv_blob22 0=128 1=3 2=1 3=1 4=1 5=0 6=1152 7=128 +BatchNorm batch_norm22 1 1 conv_blob22 batch_norm_blob22 0=128 +Scale bn_scale22 1 1 batch_norm_blob22 batch_norm_blob22_bn_scale22 0=128 1=1 +ReLU relu22 1 1 batch_norm_blob22_bn_scale22 relu_blob22 +Convolution conv23 1 1 relu_blob22 conv_blob23 0=128 1=1 2=1 3=1 4=0 5=0 6=16384 +BatchNorm batch_norm23 1 1 conv_blob23 batch_norm_blob23 0=128 +Scale bn_scale23 1 1 batch_norm_blob23 batch_norm_blob23_bn_scale23 0=128 1=1 +ReLU relu23 1 1 batch_norm_blob23_bn_scale23 relu_blob23 +Split splitncnn_2 1 2 relu_blob23 relu_blob23_splitncnn_0 relu_blob23_splitncnn_1 +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 +BatchNorm batch_norm24 1 1 conv_blob24 batch_norm_blob24 0=128 +Scale bn_scale24 1 1 batch_norm_blob24 batch_norm_blob24_bn_scale24 0=128 1=1 +ReLU relu24 1 1 batch_norm_blob24_bn_scale24 relu_blob24 +Convolution conv25 1 1 relu_blob24 conv_blob25 0=256 1=1 2=1 3=1 4=0 5=0 6=32768 +BatchNorm batch_norm25 1 1 conv_blob25 batch_norm_blob25 0=256 +Scale bn_scale25 1 1 batch_norm_blob25 batch_norm_blob25_bn_scale25 0=256 1=1 +ReLU relu25 1 1 batch_norm_blob25_bn_scale25 relu_blob25 +ConvolutionDepthWise conv26 1 1 relu_blob25 conv_blob26 0=256 1=3 2=1 3=1 4=1 5=0 6=2304 7=256 +BatchNorm batch_norm26 1 1 conv_blob26 batch_norm_blob26 0=256 +Scale bn_scale26 1 1 batch_norm_blob26 batch_norm_blob26_bn_scale26 0=256 1=1 +ReLU relu26 1 1 batch_norm_blob26_bn_scale26 relu_blob26 +Convolution conv27 1 1 relu_blob26 conv_blob27 0=256 1=1 2=1 3=1 4=0 5=0 6=65536 +BatchNorm batch_norm27 1 1 conv_blob27 batch_norm_blob27 0=256 +Scale bn_scale27 1 1 batch_norm_blob27 batch_norm_blob27_bn_scale27 0=256 1=1 +ReLU relu27 1 1 batch_norm_blob27_bn_scale27 relu_blob27 +Convolution conv28 1 1 relu_blob11_splitncnn_0 conv_blob28 0=64 1=1 2=1 3=1 4=0 5=0 6=4096 +BatchNorm batch_norm28 1 1 conv_blob28 batch_norm_blob28 0=64 +Scale bn_scale28 1 1 batch_norm_blob28 batch_norm_blob28_bn_scale28 0=64 1=1 +ReLU relu28 1 1 batch_norm_blob28_bn_scale28 relu_blob28 +Split splitncnn_3 1 2 relu_blob28 relu_blob28_splitncnn_0 relu_blob28_splitncnn_1 +Convolution conv29 1 1 relu_blob23_splitncnn_0 conv_blob29 0=64 1=1 2=1 3=1 4=0 5=0 6=8192 +BatchNorm batch_norm29 1 1 conv_blob29 batch_norm_blob29 0=64 +Scale bn_scale29 1 1 batch_norm_blob29 batch_norm_blob29_bn_scale29 0=64 1=1 +ReLU relu29 1 1 batch_norm_blob29_bn_scale29 relu_blob29 +Split splitncnn_4 1 2 relu_blob29 relu_blob29_splitncnn_0 relu_blob29_splitncnn_1 +Convolution conv30 1 1 relu_blob27 conv_blob30 0=64 1=1 2=1 3=1 4=0 5=0 6=16384 +BatchNorm batch_norm30 1 1 conv_blob30 batch_norm_blob30 0=64 +Scale bn_scale30 1 1 batch_norm_blob30 batch_norm_blob30_bn_scale30 0=64 1=1 +ReLU relu30 1 1 batch_norm_blob30_bn_scale30 relu_blob30 +Split splitncnn_5 1 3 relu_blob30 relu_blob30_splitncnn_0 relu_blob30_splitncnn_1 relu_blob30_splitncnn_2 +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 +Crop crop1 2 1 conv_transpose_blob1 relu_blob29_splitncnn_1 crop1 +Eltwise add1 2 1 relu_blob29_splitncnn_0 crop1 add_blob1 0=1 -23301=0 +Convolution conv31 1 1 add_blob1 conv_blob31 0=64 1=3 2=1 3=1 4=1 5=0 6=36864 +BatchNorm batch_norm31 1 1 conv_blob31 batch_norm_blob31 0=64 +Scale bn_scale31 1 1 batch_norm_blob31 batch_norm_blob31_bn_scale31 0=64 1=1 +ReLU relu31 1 1 batch_norm_blob31_bn_scale31 relu_blob31 +Split splitncnn_6 1 3 relu_blob31 relu_blob31_splitncnn_0 relu_blob31_splitncnn_1 relu_blob31_splitncnn_2 +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 +Crop crop2 2 1 conv_transpose_blob2 relu_blob28_splitncnn_1 crop2 +Eltwise add2 2 1 relu_blob28_splitncnn_0 crop2 add_blob2 0=1 -23301=0 +Convolution conv32 1 1 add_blob2 conv_blob32 0=64 1=3 2=1 3=1 4=1 5=0 6=36864 +BatchNorm batch_norm32 1 1 conv_blob32 batch_norm_blob32 0=64 +Scale bn_scale32 1 1 batch_norm_blob32 batch_norm_blob32_bn_scale32 0=64 1=1 +ReLU relu32 1 1 batch_norm_blob32_bn_scale32 relu_blob32 +Split splitncnn_7 1 2 relu_blob32 relu_blob32_splitncnn_0 relu_blob32_splitncnn_1 +Convolution conv33 1 1 relu_blob32_splitncnn_1 conv_blob33 0=32 1=3 2=1 3=1 4=1 5=0 6=18432 +BatchNorm batch_norm33 1 1 conv_blob33 batch_norm_blob33 0=32 +Scale bn_scale33 1 1 batch_norm_blob33 batch_norm_blob33_bn_scale33 0=32 1=1 +Convolution conv34 1 1 relu_blob32_splitncnn_0 conv_blob34 0=16 1=3 2=1 3=1 4=1 5=0 6=9216 +BatchNorm batch_norm34 1 1 conv_blob34 batch_norm_blob34 0=16 +Scale bn_scale34 1 1 batch_norm_blob34 batch_norm_blob34_bn_scale34 0=16 1=1 +ReLU relu33 1 1 batch_norm_blob34_bn_scale34 relu_blob33 +Split splitncnn_8 1 2 relu_blob33 relu_blob33_splitncnn_0 relu_blob33_splitncnn_1 +Convolution conv35 1 1 relu_blob33_splitncnn_1 conv_blob35 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 +BatchNorm batch_norm35 1 1 conv_blob35 batch_norm_blob35 0=16 +Scale bn_scale35 1 1 batch_norm_blob35 batch_norm_blob35_bn_scale35 0=16 1=1 +Convolution conv36 1 1 relu_blob33_splitncnn_0 conv_blob36 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 +BatchNorm batch_norm36 1 1 conv_blob36 batch_norm_blob36 0=16 +Scale bn_scale36 1 1 batch_norm_blob36 batch_norm_blob36_bn_scale36 0=16 1=1 +ReLU relu34 1 1 batch_norm_blob36_bn_scale36 relu_blob34 +Convolution conv37 1 1 relu_blob34 conv_blob37 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 +BatchNorm batch_norm37 1 1 conv_blob37 batch_norm_blob37 0=16 +Scale bn_scale37 1 1 batch_norm_blob37 batch_norm_blob37_bn_scale37 0=16 1=1 +Concat cat1 3 1 batch_norm_blob33_bn_scale33 batch_norm_blob35_bn_scale35 batch_norm_blob37_bn_scale37 cat_blob1 0=0 +ReLU relu35 1 1 cat_blob1 relu_blob35 +Split splitncnn_9 1 3 relu_blob35 relu_blob35_splitncnn_0 relu_blob35_splitncnn_1 relu_blob35_splitncnn_2 +Convolution conv38 1 1 relu_blob31_splitncnn_1 conv_blob38 0=32 1=3 2=1 3=1 4=1 5=0 6=18432 +BatchNorm batch_norm38 1 1 conv_blob38 batch_norm_blob38 0=32 +Scale bn_scale38 1 1 batch_norm_blob38 batch_norm_blob38_bn_scale38 0=32 1=1 +Convolution conv39 1 1 relu_blob31_splitncnn_0 conv_blob39 0=16 1=3 2=1 3=1 4=1 5=0 6=9216 +BatchNorm batch_norm39 1 1 conv_blob39 batch_norm_blob39 0=16 +Scale bn_scale39 1 1 batch_norm_blob39 batch_norm_blob39_bn_scale39 0=16 1=1 +ReLU relu36 1 1 batch_norm_blob39_bn_scale39 relu_blob36 +Split splitncnn_10 1 2 relu_blob36 relu_blob36_splitncnn_0 relu_blob36_splitncnn_1 +Convolution conv40 1 1 relu_blob36_splitncnn_1 conv_blob40 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 +BatchNorm batch_norm40 1 1 conv_blob40 batch_norm_blob40 0=16 +Scale bn_scale40 1 1 batch_norm_blob40 batch_norm_blob40_bn_scale40 0=16 1=1 +Convolution conv41 1 1 relu_blob36_splitncnn_0 conv_blob41 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 +BatchNorm batch_norm41 1 1 conv_blob41 batch_norm_blob41 0=16 +Scale bn_scale41 1 1 batch_norm_blob41 batch_norm_blob41_bn_scale41 0=16 1=1 +ReLU relu37 1 1 batch_norm_blob41_bn_scale41 relu_blob37 +Convolution conv42 1 1 relu_blob37 conv_blob42 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 +BatchNorm batch_norm42 1 1 conv_blob42 batch_norm_blob42 0=16 +Scale bn_scale42 1 1 batch_norm_blob42 batch_norm_blob42_bn_scale42 0=16 1=1 +Concat cat2 3 1 batch_norm_blob38_bn_scale38 batch_norm_blob40_bn_scale40 batch_norm_blob42_bn_scale42 cat_blob2 0=0 +ReLU relu38 1 1 cat_blob2 relu_blob38 +Split splitncnn_11 1 3 relu_blob38 relu_blob38_splitncnn_0 relu_blob38_splitncnn_1 relu_blob38_splitncnn_2 +Convolution conv43 1 1 relu_blob30_splitncnn_1 conv_blob43 0=32 1=3 2=1 3=1 4=1 5=0 6=18432 +BatchNorm batch_norm43 1 1 conv_blob43 batch_norm_blob43 0=32 +Scale bn_scale43 1 1 batch_norm_blob43 batch_norm_blob43_bn_scale43 0=32 1=1 +Convolution conv44 1 1 relu_blob30_splitncnn_0 conv_blob44 0=16 1=3 2=1 3=1 4=1 5=0 6=9216 +BatchNorm batch_norm44 1 1 conv_blob44 batch_norm_blob44 0=16 +Scale bn_scale44 1 1 batch_norm_blob44 batch_norm_blob44_bn_scale44 0=16 1=1 +ReLU relu39 1 1 batch_norm_blob44_bn_scale44 relu_blob39 +Split splitncnn_12 1 2 relu_blob39 relu_blob39_splitncnn_0 relu_blob39_splitncnn_1 +Convolution conv45 1 1 relu_blob39_splitncnn_1 conv_blob45 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 +BatchNorm batch_norm45 1 1 conv_blob45 batch_norm_blob45 0=16 +Scale bn_scale45 1 1 batch_norm_blob45 batch_norm_blob45_bn_scale45 0=16 1=1 +Convolution conv46 1 1 relu_blob39_splitncnn_0 conv_blob46 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 +BatchNorm batch_norm46 1 1 conv_blob46 batch_norm_blob46 0=16 +Scale bn_scale46 1 1 batch_norm_blob46 batch_norm_blob46_bn_scale46 0=16 1=1 +ReLU relu40 1 1 batch_norm_blob46_bn_scale46 relu_blob40 +Convolution conv47 1 1 relu_blob40 conv_blob47 0=16 1=3 2=1 3=1 4=1 5=0 6=2304 +BatchNorm batch_norm47 1 1 conv_blob47 batch_norm_blob47 0=16 +Scale bn_scale47 1 1 batch_norm_blob47 batch_norm_blob47_bn_scale47 0=16 1=1 +Concat cat3 3 1 batch_norm_blob43_bn_scale43 batch_norm_blob45_bn_scale45 batch_norm_blob47_bn_scale47 cat_blob3 0=0 +ReLU relu41 1 1 cat_blob3 relu_blob41 +Split splitncnn_13 1 3 relu_blob41 relu_blob41_splitncnn_0 relu_blob41_splitncnn_1 relu_blob41_splitncnn_2 +Convolution conv48 1 1 relu_blob35_splitncnn_2 conv_blob48 0=8 1=1 2=1 3=1 4=0 5=1 6=512 +Convolution conv49 1 1 relu_blob35_splitncnn_1 conv_blob49 0=4 1=1 2=1 3=1 4=0 5=1 6=256 +Convolution conv50 1 1 relu_blob38_splitncnn_2 conv_blob50 0=8 1=1 2=1 3=1 4=0 5=1 6=512 +Convolution conv51 1 1 relu_blob38_splitncnn_1 conv_blob51 0=4 1=1 2=1 3=1 4=0 5=1 6=256 +Convolution conv52 1 1 relu_blob41_splitncnn_2 conv_blob52 0=8 1=1 2=1 3=1 4=0 5=1 6=512 +Convolution conv53 1 1 relu_blob41_splitncnn_1 conv_blob53 0=4 1=1 2=1 3=1 4=0 5=1 6=256 +Permute conv4_3_norm_mbox_loc_perm 1 1 conv_blob48 conv4_3_norm_mbox_loc_perm 0=3 +Flatten conv4_3_norm_mbox_loc_flat 1 1 conv4_3_norm_mbox_loc_perm conv4_3_norm_mbox_loc_flat +Permute conv4_3_norm_mbox_conf_perm 1 1 conv_blob49 conv4_3_norm_mbox_conf_perm 0=3 +Flatten conv4_3_norm_mbox_conf_flat 1 1 conv4_3_norm_mbox_conf_perm conv4_3_norm_mbox_conf_flat +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 +Permute conv5_3_norm_mbox_loc_perm 1 1 conv_blob50 conv5_3_norm_mbox_loc_perm 0=3 +Flatten conv5_3_norm_mbox_loc_flat 1 1 conv5_3_norm_mbox_loc_perm conv5_3_norm_mbox_loc_flat +Permute conv5_3_norm_mbox_conf_perm 1 1 conv_blob51 conv5_3_norm_mbox_conf_perm 0=3 +Flatten conv5_3_norm_mbox_conf_flat 1 1 conv5_3_norm_mbox_conf_perm conv5_3_norm_mbox_conf_flat +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 +Permute conv6_3_norm_mbox_loc_perm 1 1 conv_blob52 conv6_3_norm_mbox_loc_perm 0=3 +Flatten conv6_3_norm_mbox_loc_flat 1 1 conv6_3_norm_mbox_loc_perm conv6_3_norm_mbox_loc_flat +Permute conv6_3_norm_mbox_conf_perm 1 1 conv_blob53 conv6_3_norm_mbox_conf_perm 0=3 +Flatten conv6_3_norm_mbox_conf_flat 1 1 conv6_3_norm_mbox_conf_perm conv6_3_norm_mbox_conf_flat +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 +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 +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 +Concat mbox_priorbox 3 1 conv4_3_norm_mbox_priorbox conv5_3_norm_mbox_priorbox conv6_3_norm_mbox_priorbox mbox_priorbox 0=1 +Reshape mbox_conf_reshape 1 1 mbox_conf mbox_conf_reshape 0=2 1=-1 2=-233 3=0 +Softmax mbox_conf_softmax 1 1 mbox_conf_reshape mbox_conf_softmax 0=1 1=1 +Flatten mbox_conf_flatten 1 1 mbox_conf_softmax mbox_conf_flatten +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 diff --git a/facesdk.framework/facesdk b/facesdk.framework/facesdk new file mode 100644 index 0000000..c1b0df4 Binary files /dev/null and b/facesdk.framework/facesdk differ diff --git a/facesdk.framework/landmark.bin b/facesdk.framework/landmark.bin new file mode 100644 index 0000000..1250575 Binary files /dev/null and b/facesdk.framework/landmark.bin differ diff --git a/facesdk.framework/landmark.param b/facesdk.framework/landmark.param new file mode 100644 index 0000000..f8bf71d --- /dev/null +++ b/facesdk.framework/landmark.param @@ -0,0 +1,17 @@ +7767517 +15 15 +Input input 0 1 data 0=60 1=60 2=1 +Convolution Conv1 1 1 data Conv1 0=20 1=5 2=1 3=1 4=2 5=1 6=500 +ReLU ActivationReLU1 1 1 Conv1 ActivationReLU1 +Pooling Pool1 1 1 ActivationReLU1 Pool1 0=0 1=2 2=2 3=0 4=0 +Convolution Conv2 1 1 Pool1 Conv2 0=48 1=5 2=1 3=1 4=2 5=1 6=24000 +ReLU ActivationReLU2 1 1 Conv2 ActivationReLU2 +Pooling Pool2 1 1 ActivationReLU2 Pool2 0=0 1=2 2=2 3=0 4=0 +Convolution Conv3 1 1 Pool2 Conv3 0=64 1=3 2=1 3=1 4=0 5=1 6=27648 +ReLU ActivationReLU3 1 1 Conv3 ActivationReLU3 +Pooling Pool3 1 1 ActivationReLU3 Pool3 0=0 1=3 2=2 3=0 4=0 +Convolution Conv4 1 1 Pool3 Conv4 0=80 1=3 2=1 3=1 4=0 5=1 6=46080 +ReLU ActivationReLU4 1 1 Conv4 ActivationReLU4 +InnerProduct Dense1 1 1 ActivationReLU4 Dense1 0=512 1=1 2=655360 +ReLU ActivationReLU5 1 1 Dense1 ActivationReLU5 +InnerProduct Dense3 1 1 ActivationReLU5 Dense3 0=136 1=1 2=69632 diff --git a/facesdk.framework/liveness.bin b/facesdk.framework/liveness.bin new file mode 100644 index 0000000..67fd25e Binary files /dev/null and b/facesdk.framework/liveness.bin differ diff --git a/facesdk.framework/mfn.bin b/facesdk.framework/mfn.bin new file mode 100644 index 0000000..bdad775 Binary files /dev/null and b/facesdk.framework/mfn.bin differ