ArcFace.Net 3.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ArcFace.Net --version 3.2.1
NuGet\Install-Package ArcFace.Net -Version 3.2.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ArcFace.Net" Version="3.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ArcFace.Net --version 3.2.1
#r "nuget: ArcFace.Net, 3.2.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ArcFace.Net as a Cake Addin
#addin nuget:?package=ArcFace.Net&version=3.2.1

// Install ArcFace.Net as a Cake Tool
#tool nuget:?package=ArcFace.Net&version=3.2.1

ArcFace.Net

虹软人脸识别.NET工具库(.Net Standard 2.1)。基于ArcFace 3.x C++ SDK, 支持Windows x86/x64和Linux x64. 支持人脸属性检测、人脸特征提取、人脸库维护、人脸搜索、活体检测等功能。

平台支持

  1. Windows x86/x64

  2. Linux x64

    • 该程序基于ArcFace 3.x C++ SDK开发,DllImport引入C++动态库时依赖于Linux系统库(libdl.so.2),因此低配Linux环境(如Alpine等)可能存在兼容性问题。 经测试以下可以正常运行。
      • Debian 10 +
      • Ubuntu20.04 +
      • CentOS 8 +
    • Linux环境中图像处理依赖libgdiplus包,需要手动安装到系统中。需要特别注意的是,libgdiplus是基于Mono框架开发的,系统中务必要安装Mono框架,否则可能会导致Graphics等对象申请的内存无法被回收最终导致内存溢出。
      # Debian 10
      sudo apt install apt-transport-https dirmngr gnupg ca-certificates
      sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
      echo "deb https://download.mono-project.com/repo/debian stable-buster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
      sudo apt update
      sudo apt install mono-devel
      sudo apt install libgdiplus/stable
      
      # Ubuntu 20.04
      sudo apt install gnupg ca-certificates
      sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
      echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
      sudo apt update
      sudo apt install mono-devel
      sudo apt install libgdiplus/focal
      
      # CentOS 8
      rpmkeys --import "http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x3fa7e0328081bff6a14da29aa6a19b38d3d831ef"
      su -c 'curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo'
      sudo yum install mono-devel
      sudo yum install libgdiplus-devel.x86_64
      

SDK

虹软开发者中心此处下载需要的SDK 3.x文件并放置同特定目录。

  • Windows 需要将SDK dll文件拷贝到执行程序所在目录,或环境变量配置的目录
  • Linux 需要将SDK so文件拷贝到/lib等系统程序目录,或环境变量配置的目录

虹软开发者中心 获取授权信息(AppId/SdkKey),通过ArcFaceOptions传入配置。具体用法参见 示例程序

资源回收

  • 工具中自动维护引擎池进行资源回收利用,无需手动管理。
  • 工具支持多并发操作。
  • 推荐使用单例方式使用。
  • ArcFace实现IDisposable,使用完毕后需要Dispose()以销毁引擎回收其它相关内存。

图像质量要求

  • 图片尺寸大于2K且小于10MB
  • 图片格式支持 ".jpg",".png",".bmp"
  • 图片中人脸尺寸不小于50 x 50像素
  • 建议待检测的图像人脸角度上、下、左、右转向小于30度

人脸3D角度

俯仰角(pitch), 横滚角(roll), 偏航角(yaw)

alternate text is missing from this package README image

问题

  • 人脸检测和特性提取目前进识别到的人脸角度不准确,目前识别到的角度均为0度。
  • 视频模式人脸追踪未开发
  • 活体检测未开发

参考文档

https://github.com/colin-chang/ArcFace.Net/blob/main/sdk_3.0.pdf

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ArcFace.Net:

Package Downloads
VIT.Infrastructure

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.1.4 518 5/26/2023
5.1.3 746 5/22/2023
5.1.2 169 5/18/2023
5.0.0 149 5/14/2023
4.2.4 170 5/26/2023
4.2.2 147 5/18/2023
4.1.2 155 5/13/2023
4.1.1 688 1/30/2023
4.1.0 1,254 6/11/2022
4.0.2 467 6/7/2022
4.0.1 616 2/28/2022
4.0.0 443 2/27/2022
3.2.9 443 2/25/2022
3.2.8 464 1/29/2022
3.2.7 434 1/21/2022
3.2.6 479 8/12/2021
3.2.5 356 8/3/2021
3.2.4 407 5/6/2021
3.2.3 339 5/3/2021
3.2.2 368 4/19/2021
3.2.1 341 4/6/2021
3.2.0 560 12/25/2020
3.1.0 417 12/16/2020
3.0.3 428 12/9/2020
3.0.2 426 12/8/2020
3.0.1 405 12/7/2020
3.0.0 433 12/2/2020

supporting reload configurations