- 一个基于 SeetaFace6 的 .NET 离线人脸识别解决方案
- 此项目来源于ViewFaceCore,在ViewFaceCore基础上二次开发与分发
- 开源、免费、跨平台
受支持的 .NET Runtime 和 操作系统
OS | Runtime | x86 | x64 | ARM | ARM64 |
---|---|---|---|---|---|
Windows | .NET Framework | √ | √ | ||
Windows | .NET Core 3.1+ | √ | √ | ||
Linux | .NET Core 3.1+ | √ | √ | √ |
注意: Windows 系统需要安装Visual C++ 14,下载链接:https://learn.microsoft.com/zh-CN/cpp/windows/latest-supported-vc-redist
-
在 Windows x64 下, 快速集成人脸检测
- 创建控制台项目
- 使用 Nuget 安装以下依赖
包名称 版本 说明 SeetaFace6Sharp SeetaFace6Sharp 核心包 SeetaFace6Sharp.model.face_detector 人脸检测 模型包 SeetaFace6Sharp.runtime.win.x64 Windows-x64 运行时包 SeetaFace6Sharp.Extension.SystemDrawing System.Drawing 图像扩展包 - 获取人脸信息
using SeetaFace6Sharp; using System; using System.Drawing; namespace ConsoleApp1 { internal class Program { static void Main(string[] args) { string imagePath = @"images/Jay_3.jpg"; using var bitmap = (Bitmap)Image.FromFile(imagePath); using var imgData = bitmap.ToFaceImage(); using FaceDetector faceDetector = new FaceDetector(); FaceInfo[] infos = faceDetector.Detect(imgData); Console.WriteLine($"识别到 {infos.Length} 个人脸信息:\n"); Console.WriteLine($"No.\t人脸置信度\t位置信息"); for (int i = 0; i < infos.Length; i++) { Console.WriteLine($"{i}\t{infos[i].Score:f8}\t{infos[i].Location}"); } Console.ReadKey(); } } }
测试项目 | 特征长度 | 速度(AMD 5950x) | 速度(Intel N305) | 速度(NVDIA GTX1650) | 速度(RK3588) |
---|---|---|---|---|---|
特征值检测 | 1024 | 14ms | 42ms | 7ms | 未测试 |
人脸比对(从跟踪到比对) | 1024 | 54ms | 96ms | 18ms | 未测试 |
SeetaFace 开源版 可以免费用于商业和个人用途。如果需要更多的商业支持,请联系商务邮件 [email protected]