OpenVinoSharp.SFace
1.0.1
See the version list below for details.
dotnet add package OpenVinoSharp.SFace --version 1.0.1
NuGet\Install-Package OpenVinoSharp.SFace -Version 1.0.1
<PackageReference Include="OpenVinoSharp.SFace" Version="1.0.1" />
<PackageVersion Include="OpenVinoSharp.SFace" Version="1.0.1" />
<PackageReference Include="OpenVinoSharp.SFace" />
paket add OpenVinoSharp.SFace --version 1.0.1
#r "nuget: OpenVinoSharp.SFace, 1.0.1"
#:package OpenVinoSharp.SFace@1.0.1
#addin nuget:?package=OpenVinoSharp.SFace&version=1.0.1
#tool nuget:?package=OpenVinoSharp.SFace&version=1.0.1
OpenVinoSharp.SFace
YuNet face detection + SFace face recognition on Intel OpenVINO, implemented in pure C# on top of OpenVinoSharp (Guojin Yan) — no OpenCV dependency.
The pre/post-processing is a faithful port of the OpenCV Zoo reference implementations
(face_detection_yunet,
face_recognition_sface), so results
match cv.FaceDetectorYN / cv.FaceRecognizerSF.
Usage
using OpenVinoSharp.FaceRecognition;
using var detector = new YuNetFaceDetector("face_detection_yunet_2023mar.onnx", "CPU", confThreshold: 0.9f);
using var recognizer = new SFaceRecognizer("face_recognition_sface_2021dec.onnx", "CPU");
var faces1 = detector.Detect(image1); // List<FaceDet>, ordered by descending score
var faces2 = detector.Detect(image2);
float[] f1 = recognizer.ExtractFeature(image1, faces1[0]); // 128-D
float[] f2 = recognizer.ExtractFeature(image2, faces2[0]);
FaceMatch m = SFaceRecognizer.Match(f1, f2); // cosine >= 0.363 -> same identity
Console.WriteLine($"{m.Score:F4} {m.Verdict}");
Provide your own BGR byte buffers via BgrImage(width, height, byte[])
(H * W * 3, interleaved BGR), or convert System.Drawing.Bitmap in your app.
Supported models
| Model | File | Notes |
|---|---|---|
| YuNet face detection | face_detection_yunet_2023mar.onnx |
5-landmark, any input size (padded to /32) |
| SFace recognition | face_recognition_sface_2021dec.onnx |
128-D embedding |
Download them from the OpenCV Zoo repository.
Targets
.NET Framework 4.6 / 4.8, .NET 8.0, 9.0, 10.0 (Windows x64; GPU device requires an Intel GPU with OpenVINO GPU plugin).
License
Apache-2.0. Model weights follow the OpenCV Zoo licenses.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
-
.NETFramework 4.6
- JYPPX.OpenVINO.CSharp.API (>= 3.3.1)
- OpenVINO.runtime.win (>= 2026.3.0)
-
.NETFramework 4.8
- JYPPX.OpenVINO.CSharp.API (>= 3.3.1)
- OpenVINO.runtime.win (>= 2026.3.0)
-
net10.0
- JYPPX.OpenVINO.CSharp.API (>= 3.3.1)
- OpenVINO.runtime.win (>= 2026.3.0)
- System.Drawing.Common (>= 8.0.0)
-
net8.0
- JYPPX.OpenVINO.CSharp.API (>= 3.3.1)
- OpenVINO.runtime.win (>= 2026.3.0)
- System.Drawing.Common (>= 8.0.0)
-
net9.0
- JYPPX.OpenVINO.CSharp.API (>= 3.3.1)
- OpenVINO.runtime.win (>= 2026.3.0)
- System.Drawing.Common (>= 8.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on OpenVinoSharp.SFace:
| Package | Downloads |
|---|---|
|
OpenVinoSharp.SFace.OpenCvSharp
OpenCvSharp interop for OpenVinoSharp.SFace. Accepts OpenCvSharp Mat input directly for YuNet face detection and SFace face recognition - no Bitmap detour for camera/realtime pipelines. Requires the main OpenVinoSharp.SFace package. |
GitHub repositories
This package is not used by any popular GitHub repositories.