Shiny.VoiceIntelligence.DocumentDb 1.0.0-beta-0002

Prefix Reserved
This is a prerelease version of Shiny.VoiceIntelligence.DocumentDb.
dotnet add package Shiny.VoiceIntelligence.DocumentDb --version 1.0.0-beta-0002
                    
NuGet\Install-Package Shiny.VoiceIntelligence.DocumentDb -Version 1.0.0-beta-0002
                    
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="Shiny.VoiceIntelligence.DocumentDb" Version="1.0.0-beta-0002" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Shiny.VoiceIntelligence.DocumentDb" Version="1.0.0-beta-0002" />
                    
Directory.Packages.props
<PackageReference Include="Shiny.VoiceIntelligence.DocumentDb" />
                    
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 Shiny.VoiceIntelligence.DocumentDb --version 1.0.0-beta-0002
                    
#r "nuget: Shiny.VoiceIntelligence.DocumentDb, 1.0.0-beta-0002"
                    
#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 Shiny.VoiceIntelligence.DocumentDb@1.0.0-beta-0002
                    
#: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=Shiny.VoiceIntelligence.DocumentDb&version=1.0.0-beta-0002&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Shiny.VoiceIntelligence.DocumentDb&version=1.0.0-beta-0002&prerelease
                    
Install as a Cake Tool

Shiny Face & Document Intelligence

On-device intelligence for .NET (MAUI + native), built on the Shiny stack. Two independent stacks:

Face intelligence — enrollment + recognition

  • Capture + detectShiny.Maui.Controls.Camera + Shiny.Maui.Controls.Camera.Face (live preview, on-device detection via Apple Vision / Android ML Kit). Detection gives face bounds, not embeddings.
  • EmbedShiny.FaceIntelligence.Onnx: crop the detected face → ArcFace ONNX (Microsoft.ML.OnnxRuntime) → a 512-d, L2-normalized vector.
  • Store + matchShiny.FaceIntelligence.DocumentDb.Sqlite over Shiny.DocumentDb.Sqlite vector search (NearestVectors, backed by sqlite-vec / vec0).

"Training" here is enrollment: store several embeddings per person; recognition is a nearest-neighbor lookup with a cosine-distance threshold. No model is trained on-device. The pipeline is split into a core package plus swappable embedder/store packages, composed via a registration builder — pull only what you use (native embedder without ONNX, Postgres without sqlite, etc.).

Document intelligence — native modal scanner

Shiny.DocumentIntelligence puts one IDocumentScanner.ScanAsync(...) over each platform's first-party scanner: VisionKit (iOS/Mac Catalyst), ML Kit (Android, optional PDF), and Vision document segmentation on macOS AppKit (which has no document camera — it deskews picked images). No MAUI dependency.

Package TFM Role
Shiny.FaceIntelligence net10.0 Core: contracts (IFaceEmbedder, IFaceStore, IFaceIntelligence), FaceIntelligenceManager, imaging, builder. SkiaSharp only.
Shiny.FaceIntelligence.Onnx net10.0 ONNX ArcFace embedder (UseOnnxEmbedder) + iOS linker fix.
Shiny.FaceIntelligence.DocumentDb net10.0 Provider-agnostic Shiny.DocumentDb store (UseDocumentDbStore).
Shiny.FaceIntelligence.DocumentDb.Sqlite net10.0 Turnkey sqlite-vec store (UseSqliteStore).
Shiny.DocumentIntelligence net10.0;-android;-ios;-maccatalyst;-macos Native document scanner (IDocumentScanner, AddDocumentIntelligence).
Sample (root) net10.0-android;net10.0-ios MAUI app (Shiny.Maui.Shell MVVM): Recognize / Enroll / People / Scan tabs.

Quick start

dotnet build Sample/Sample.csproj -f net10.0-android
dotnet build Sample/Sample.csproj -f net10.0-ios

Compose the pipeline at startup:

services.AddFaceIntelligence(face =>
{
    face.Options.MaxDistance = 0.6f;
    face.UseOnnxEmbedder(o => o.ModelBytesProvider = () => LoadBundledModel("arcface.onnx"));
    face.UseSqliteStore(o => { o.ConnectionString = "Data Source=faces.db"; o.VectorExtensionPath = "vec0"; });
});

Add the document scanner alongside it and call it from anywhere:

services.AddDocumentIntelligence(); // registers IDocumentScanner

// later, in a ViewModel/service
var result = await scanner.ScanAsync(new DocumentScanRequest { PageLimit = 10 });
if (!result.IsCancelled)
    foreach (var page in result.Pages) { /* page.ImageData (PNG/JPEG) */ }

Two assets are not in the repo and required at runtime: an ArcFace ONNX model and the sqlite-vec native binary (vec0.dylib/vec0.so). Drop the model at Sample/Resources/Raw/arcface.onnx (a compact 112×112 ArcFace like MobileFaceNet keeps app size down) — it's loaded from the app package as bytes. The app launches without these; enroll/recognize report "model missing". See CLAUDE.md for details.

Benchmarks

Recognition latency (embed + sqlite-vec NearestVectors + threshold) as the enrolled gallery grows, at the real 512-d ArcFace width. A deterministic fake embedder isolates the vector-store cost; no ONNX model involved. Reproduce with dotnet run --project tests/Shiny.FaceIntelligence.Benchmarks -c Release -- --filter '*'.

BenchmarkDotNet v0.15.8 · Apple M5 Pro · .NET 10.0.8 (Arm64) · macOS 26.5

Gallery size Mean Allocated
100 259.0 µs 91 KB
1,000 487.8 µs 91 KB
10,000 4,758.3 µs 91 KB

Brute-force exact search scales roughly linearly with gallery size (VectorIndexKind.None); ~4.8 ms at 10k enrolled shots is comfortable for on-device use. Managed allocations are constant (the result set), independent of gallery size. For much larger galleries, switch to an ANN index.

Development

Architecture, build/pack details, the ONNX Runtime iOS linker fix, tuning, and the open TODOs (identity hardening, coordinate space, landmark alignment) are documented in CLAUDE.md — the canonical reference for working in this repo.

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 (1)

Showing the top 1 NuGet packages that depend on Shiny.VoiceIntelligence.DocumentDb:

Package Downloads
Shiny.VoiceIntelligence.DocumentDb.Sqlite

Turnkey SQLite (sqlite-vec) voice store for Shiny.VoiceIntelligence. Bundle the vec0 native binary per platform.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-beta-0002 39 7/27/2026