pock-programming.FaceONNXSkiasharp 0.1.2

dotnet add package pock-programming.FaceONNXSkiasharp --version 0.1.2
                    
NuGet\Install-Package pock-programming.FaceONNXSkiasharp -Version 0.1.2
                    
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="pock-programming.FaceONNXSkiasharp" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="pock-programming.FaceONNXSkiasharp" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="pock-programming.FaceONNXSkiasharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add pock-programming.FaceONNXSkiasharp --version 0.1.2
                    
#r "nuget: pock-programming.FaceONNXSkiasharp, 0.1.2"
                    
#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.
#:package pock-programming.FaceONNXSkiasharp@0.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=pock-programming.FaceONNXSkiasharp&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=pock-programming.FaceONNXSkiasharp&version=0.1.2
                    
Install as a Cake Tool

FaceONNX ๐Ÿ‘ค

Lightweight .NET 10 face detection library based on ONNX Runtime and SkiaSharp.

Projects ๐Ÿ“ฆ

  • FaceONNX: core library
  • FaceONNX.Samples: console sample app (images/ โ†’ results/)

Quick start ๐Ÿš€

cd FaceONNX.Samples
dotnet run

Installation ๐Ÿ“ฅ

From NuGet Package

dotnet add package pock-programming.FaceONNXSkiasharp

Or via Package Manager:

Install-Package pock-programming.FaceONNXSkiasharp

Model Deployment

When you install this package via NuGet:

  1. ONNX models are automatically included in the package as content files
  2. Models are automatically copied to your project's output directory (bin\Debug\net10.0\Models\ or equivalent)
  3. Model resolution is handled automatically by the FaceDetector class

Supported frameworks: .NET 10+

Usage ๐Ÿงฉ

using FaceONNX;
using SkiaSharp;

using var detector = new FaceDetector(model: FaceDetectorModel.Yolov5);
using var bitmap = SKBitmap.Decode("images/group.jpg");

FaceDetectionResult[] detections = detector.ForwardDetection(bitmap);
SKRectI[] boxes = detector.Forward(bitmap);

var roi = new SKRectI(100, 80, 500, 420);
FaceDetectionResult[] roiDetections = detector.ForwardDetection(bitmap, roi, clamp: true);

Model selection ๐Ÿง 

// Default
using var yolov5Detector = new FaceDetector(model: FaceDetectorModel.Yolov5);

using var yolo26Detector = new FaceDetector(model: FaceDetectorModel.Yolo26);
using var faceOnnxDetector = new FaceDetector(model: FaceDetectorModel.FaceOnnx);
Model enum ONNX file Model size Output Landmarks
FaceDetectorModel.Yolov5 yolov5s-face.onnx 29.3 MB Single YOLOv5-style tensor Yes (5-point)
FaceDetectorModel.Yolo26 yolo26_face_fp16.onnx 18.3 MB Single YOLO tensor (xyxy + confidence + class) No
FaceDetectorModel.FaceOnnx face_detector_640.onnx 1.5 MB Split outputs (confidences + boxes) No

API summary ๐Ÿ› ๏ธ

  • Forward(...) returns SKRectI[]
  • ForwardDetection(...) returns FaceDetectionResult[]
  • ROI overloads: Forward(image, rectangle, clamp) and ForwardDetection(image, rectangle, clamp)
  • Raw float-channel overloads: Forward(float[][,]) and ForwardDetection(float[][,]) (CHW, 0โ€“255 range)
  • Thresholds: detectionThreshold, confidenceThreshold, nmsThreshold
  • Default model: FaceDetectorModel.Yolov5

Attribution and licenses ๐Ÿ™

FaceONNX model (face_detector_640.onnx) ๐Ÿงพ

Source:

Thanks to arieffauzi-st for maintaining and sharing this FaceONNX fork.

License status in source repo:

  • no root LICENSE file
  • no model-specific license/notice file in FaceONNX/Models

Reference:

Source:

Thanks to the FaceONNX maintainers and contributors for publishing the models and implementation details used by this project.

License:

  • MIT
  • Copyright (c) 2020-2025 Valery Asiryan
  • base models: Ultralytics YOLOv5 (AGPL-3.0, or Ultralytics Enterprise License)

Reference:

YOLO26 model (yolo26_face_fp16.onnx) ๐Ÿ†•

Source:

License details from source repo:

  • training code: MIT
  • base models: Ultralytics YOLO26 (AGPL-3.0, or Ultralytics Enterprise License)
  • dataset terms: WiderFace terms

Reference:

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.2 99 8/20/2026
0.1.1 100 8/20/2026
0.1.0 120 7/9/2026