kby-ai/FaceRecognition-iOS

GitHub: kby-ai/FaceRecognition-iOS

一款在NIST FRVT榜单表现优异的商业级iOS人脸识别SDK,集成了人脸检测、活体检测和1:1比对功能。

Stars: 37 | Forks: 16

### 我们的人脸识别算法在 NIST FRVT 1:1 排行榜中位居全球前列。 badge [最新 NIST FRVT 评估报告 2024-12-20](https://pages.nist.gov/frvt/html/frvt11.html) ![FRVT Sheet](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/312851f476213011.jpg) #### 🆔 ID Document Liveness Detection - Linux - [点击此处](https://web.kby-ai.com) badge #### 🤗 Hugging Face - [点击此处](https://huggingface.co/kby-ai) #### 📚 产品与资源 - [点击此处](https://github.com/kby-ai/Product) #### 🛟 帮助中心 - [点击此处](https://docs.kby-ai.com) #### 💼 KYC 验证演示 - [点击此处](https://github.com/kby-ai/KYC-Verification-Demo-Android) #### 🙋‍♀️ Docker Hub - [点击此处](https://hub.docker.com/u/kbyai) # FaceRecognition-iOS ## 概述 本仓库演示了由 `KBY-AI` 开发的 `face liveness detection`(人脸活体检测)和 `face recognition`(人脸识别)技术。 ### ◾FaceSDK(Mobile) 详情 | Basic | 🔽 Standard | Premium | |------------------|------------------|------------------| | Face Detection | Face Detection | Face Detection | | Face Liveness Detection | Face Liveness Detection | Face Liveness Detection | | Pose Estimation | Pose Estimation | Pose Estimation | | | Face Recognition | Face Recognition | | | | 68 points Face Landmark Detection | | | | Face Quality Calculation | | | | Face Occlusion Detection | | | | Eye Closure Detection | | | | Age, Gender Estimation | ### ◾FaceSDK(Mobile) 产品列表 | No. | Repository | SDK Details | |------------------|------------------|------------------| | 1 | [Face Liveness Detection - Android](https://github.com/kby-ai/FaceLivenessDetection-Android) | Basic SDK | | 2 | [Face Liveness Detection - iOS](https://github.com/kby-ai/FaceLivenessDetection-iOS) | Basic SDK | | 3 | [Face Recognition + Face Liveness Detection - Android](https://github.com/kby-ai/FaceRecognition-Android) | Standard SDK | | ➡️ | [Face Recognition + Face Liveness Detection - iOS](https://github.com/kby-ai/FaceRecognition-iOS) | Standard SDK | | 5 | [Face Recognition + Face Liveness Detection - Flutter](https://github.com/kby-ai/FaceRecognition-Flutter) | Standard SDK | | 6 | [Face Recognition + Face Liveness Detection - Ionic-Cordova](https://github.com/kby-ai/FaceRecognition-Ionic-Cordova) | Standard SDK | | 7 | [Face Recognition + Face Liveness Detection - React-Native](https://github.com/kby-ai/FaceRecognition-React-Native) | Standard SDK | | 8 | [Face Attribute - Android](https://github.com/kby-ai/FaceAttribute-Android) | Premium SDK | | 9 | [Face Attribute - iOS](https://github.com/kby-ai/FaceAttribute-iOS) | Premium SDK | | 10 | [Face Attribute - Flutter](https://github.com/kby-ai/FaceAttribute-Flutter) | Premium SDK | ## 在 App Store 下载 ## 性能视频 您可以访问我们的 YouTube 视频[此处](https://www.youtube.com/watch?v=HpDggnWsG1c),查看我们演示应用的实际运行效果。

[![Face Recognition Android](https://img.youtube.com/vi/HpDggnWsG1c/0.jpg)](https://www.youtube.com/watch?v=HpDggnWsG1c) ## 截图

## SDK 许可证 本仓库集成了 `KBY-AI` 的 `face recognition SDK`,该 SDK 需要针对 `iOS` 项目的每个 `bundle ID` 获取许可证。 - 以下代码展示了如何使用许可证:https://github.com/kby-ai/FaceRecognition-iOS/blob/53cec3872bf52f772e7025be65db54fe4880484d/FaceRecognition/ViewController.swift#L36-L45 - 如需申请许可证,请通过以下联系方式联系我们: #### 请联系我们: 🧙`Email:` contact@kby-ai.com
🧙`Telegram:` [@kbyaisupport](https://t.me/kbyaisupport)
🧙`WhatsApp:` [+19092802609](https://wa.me/+19092802609)
🧙`Discord:` [KBY-AI](https://discord.gg/6wm383re2s)
🧙`Teams:` [KBY-AI](https://teams.live.com/l/invite/FBAYGB1-IlXkuQM3AY)
## 关于 SDK ### 设置 1. 将 SDK(`facesdk.framework` 文件夹)复制到项目的 `root`(根)文件夹中。 2. 在 `Xcode` 中将 `SDK framework` 添加到项目中。 ![image](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/e8d1dd3db5213017.png) 3. 将 bridging header 添加到您的项目设置中 ![image](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/0876ec99d3213019.png) ### 初始化 SDK - 第一步 首先,您需要使用收到的许可证激活 SDK。 ``` FaceSDK.setActivation("...") ``` 如果激活成功,返回值将为 `SDK_SUCCESS`。否则,将返回错误值。 - 第二步 激活后,调用 `SDK` 的初始化函数。 ``` FaceSDK.initSDK() ``` 如果初始化成功,返回值将为 `SDK_SUCCESS`。否则,将返回错误值。 ### 人脸检测与活体检测 `FaceSDK` 提供了一个用于 `face detection`(人脸检测)和 `face liveness detection`(人脸活体检测)的单一函数,使用方法如下: ``` let faceBoxes = FaceSDK.faceDetection(image) ``` https://github.com/kby-ai/FaceRecognition-iOS/blob/53cec3872bf52f772e7025be65db54fe4880484d/FaceRecognition/CameraViewController.swift#L111-L117 该函数接受一个参数,即一个 `UIImage` 对象。 函数的返回值是一个 `FaceBox` 对象列表。 每个 `FaceBox` 对象包含检测到的人脸矩形、活体分数以及面部角度(如 `yaw`、`roll` 和 `pitch`)。 ### 创建模板 `FaceSDK` 提供了一个可以从 `UIImage` 生成 `template`(模板)的函数。然后可以使用此 `template` 来验证所捕获的个人图像的身份。 ``` let templates = FaceSDK.templateExtraction(capturedImage, faceBox: faceBox) ``` https://github.com/kby-ai/FaceRecognition-iOS/blob/53cec3872bf52f772e7025be65db54fe4880484d/FaceRecognition/CameraViewController.swift#L125-L129 `SDK` 的 `template` 提取函数接受两个参数:一个 `UIImage` 对象和一个 `FaceBox` 对象。 该函数返回一个 `Data`,其中包含可用于人员验证的 `template`。 ### 计算相似度 `similarityCalculation` 函数将两个 `template` 的字节数组作为参数。 ``` let similarity = FaceSDK.similarityCalculation(templates, templates2: personTemplates) ``` 它返回两个 `template` 之间的相似度值,该值可用于确定两个个体之间的相似程度。
标签:CVE监控, FaceSDK, IDV, iOS开发, KYC, NIST FRVT, 人脸关键点检测, 人脸匹配, 人脸比对, 人脸活体检测, 人脸识别, 人脸重建, 人脸防伪, 反欺诈, 姿态估计, 安防监控, 深度学习, 生物特征识别, 移动SDK, 计算机视觉, 身份管理, 金融科技