CosmoBiometric.Fingerprint.Zkt 0.2.0

dotnet add package CosmoBiometric.Fingerprint.Zkt --version 0.2.0
                    
NuGet\Install-Package CosmoBiometric.Fingerprint.Zkt -Version 0.2.0
                    
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="CosmoBiometric.Fingerprint.Zkt" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CosmoBiometric.Fingerprint.Zkt" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="CosmoBiometric.Fingerprint.Zkt" />
                    
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 CosmoBiometric.Fingerprint.Zkt --version 0.2.0
                    
#r "nuget: CosmoBiometric.Fingerprint.Zkt, 0.2.0"
                    
#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 CosmoBiometric.Fingerprint.Zkt@0.2.0
                    
#: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=CosmoBiometric.Fingerprint.Zkt&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=CosmoBiometric.Fingerprint.Zkt&version=0.2.0
                    
Install as a Cake Tool

CosmoBiometric

CI

A production-grade, cross-platform fingerprint recognition engine for .NET 10: enrollment, minutiae template generation, template serialization/protection, 1:1 verification, and 1:N identification — consuming captures from the ZKTeco Live20R/SLK20R scanner driven by CosmoUsb (no vendor SDK, no libusb), or from any other source that can produce a FingerprintImage.

Pure managed code, no native dependencies, runs on Windows, Linux, and macOS.

Projects

Project Purpose
CosmoBiometric.Fingerprint.Abstractions Domain models and contracts: FingerprintImage, Minutia, FingerprintTemplate, IFingerprintCaptureDevice, IFingerprintTemplateStore, IFingerprintTemplateProtector, exceptions
CosmoBiometric.Fingerprint The engine: preprocessing pipeline, minutiae extraction, template generation/serialization, matcher, enrollment service, in-memory store, AES-GCM protector
CosmoBiometric.Fingerprint.Diagnostics Development-time tooling: pipeline stage export, image codecs (PGM/BMP/PNG), synthetic pattern generator, dataset evaluation harness (FAR/FRR/EER/ROC → CSV)
CosmoBiometric.Fingerprint.Zkt IFingerprintCaptureDevice adapter for the ZKTeco Live20R/SLK20R over CosmoUsb
samples/FingerprintDemo Console walkthrough: capture → enroll → persist → verify (works without hardware via --synthetic)
samples/FingerprintEval Threshold-calibration CLI over a real capture dataset
benchmarks/… BenchmarkDotNet benchmarks for every stage and the matching hot path

Quick start

using CosmoBiometric.Fingerprint;
using CosmoBiometric.Fingerprint.Devices.Zkt;
using CosmoBiometric.Fingerprint.Enrollment;
using CosmoBiometric.Fingerprint.Matching;
using CosmoBiometric.Fingerprint.Serialization;

// 1. Capture (any IFingerprintCaptureDevice; here the ZKT scanner)
await using var device = await ZktLive20RCaptureDevice.OpenAsync();
FingerprintImage image = await device.CaptureAsync(cancellationToken);

// 2. Template generation
var generator = new FingerprintTemplateGenerator(
    FingerprintTemplateGeneratorOptions.ForScanner(FingerprintScannerProfile.ZktLive20R()));
FingerprintTemplate template = generator.Generate(image);

// 3. Persist (serialize; encrypt with IFingerprintTemplateProtector before real storage)
byte[] blob = FingerprintTemplateSerializer.Serialize(template);

// 4. Verify a later capture
FingerprintTemplate probe = generator.Generate(await device.CaptureAsync(cancellationToken));
FingerprintMatchResult result = new FingerprintMatcher().Verify(
    FingerprintTemplateSerializer.Deserialize(blob), probe);
Console.WriteLine($"{(result.IsMatch ? "MATCH" : "NO MATCH")} score={result.Score:0.00} " +
    $"({result.MatchedMinutiae} minutiae, rotation {result.RotationDegrees:0.0}°)");

Multi-capture enrollment with retry workflow:

var enrollment = new FingerprintEnrollmentService(generator, new FingerprintMatcher());
FingerprintEnrollmentResult enrolled = await enrollment.EnrollAsync(device, progress, cancellationToken);

Run the demo without hardware:

dotnet run --project samples/FingerprintDemo -- --synthetic

Building

Requires the .NET 10 SDK. The ZKT adapter consumes the CosmoUsb package from nuget.org; the repository is fully self-contained.

dotnet build
dotnet test
dotnet run -c Release --project benchmarks/CosmoBiometric.Fingerprint.Benchmarks -- --filter '*'

Releasing

Packages (CosmoBiometric.Fingerprint.Abstractions, .Fingerprint, .Fingerprint.Diagnostics, .Fingerprint.Zkt) are published to nuget.org by the release workflow when a version tag is pushed:

git tag v0.1.0 && git push origin v0.1.0

The workflow builds, runs the full test suite, packs with the tag's version, pushes to nuget.org (requires the NUGET_API_KEY repository secret), and creates a GitHub release with the packages attached.

Documentation

Status: what is validated and what is not

Validated end-to-end on real hardware (ZKTeco Live20R over CosmoUsb, Windows 11/WinUSB): capture → 3-sample enrollment → encrypted template storage → verification-with-retry → MATCH, with impostor pairs rejected. The engine was calibrated against 17 real captures of 2 fingers (see calibration): effective sensor resolution measured at ~1000 DPI, hybrid minutiae + ridge-correlation matching at EER ≈ 12%, zero false accepts (0/52) at the demo threshold. Every pipeline stage additionally has synthetic unit tests (80 passing).

Honest limits:

  • The calibration dataset is tiny (1 subject, 2 fingers). It demonstrates the system works; it does not establish deployment-grade FAR/FRR. Collect a multi-subject dataset and rerun samples/FingerprintEval before quoting error rates.
  • The class-default MatchThreshold (0.25) is generic; the ZKT-calibrated operating point used by the demo is threshold 0.15 with RidgeCorrelationWeight 0.75.
  • Match scores are engine-specific similarities in [0, 1], not probabilities; the quality score is application-specific, not NFIQ.

License

Same spirit as CosmoUsb: MIT OR Apache-2.0.

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.  net9.0 was computed.  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 Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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

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.2.0 125 8/19/2026
0.1.0 109 8/18/2026