Tronnx.Ocr
1.2.4
dotnet add package Tronnx.Ocr --version 1.2.4
NuGet\Install-Package Tronnx.Ocr -Version 1.2.4
<PackageReference Include="Tronnx.Ocr" Version="1.2.4" />
<PackageVersion Include="Tronnx.Ocr" Version="1.2.4" />
<PackageReference Include="Tronnx.Ocr" />
paket add Tronnx.Ocr --version 1.2.4
#r "nuget: Tronnx.Ocr, 1.2.4"
#:package Tronnx.Ocr@1.2.4
#addin nuget:?package=Tronnx.Ocr&version=1.2.4
#tool nuget:?package=Tronnx.Ocr&version=1.2.4
Tronnx.Ocr is a lightweight, open-source, fully offline OCR engine built on ONNX Runtime.
It provides an end-to-end text detection + text recognition pipeline using two open-source ONNX models:
• linknet_resnet18.onnx – text detection (Apache 2.0 License)
• crnn_vgg16_bn_dynW.onnx – text recognition (Apache 2.0 License)
Both models originate from open-source research projects and are redistributed here in compliance with their Apache 2.0 licenses.
This NuGet package performs all inference locally — no network activity, no telemetry, and your images never leave your device.
Key features:
• 100% offline OCR pipeline
• Fast ONNX Runtime inference
• OpenCV-based preprocessing and detection geometry
• Simple, developer-friendly API
• Automatic model caching for repeated runs
• Embedded ONNX models, no downloads required
• Generate fully searchable PDFs from images
• Highlight specific words in output PDFs
Dependencies:
• Microsoft.ML.OnnxRuntime (MIT License)
• OpenCvSharp4 + OpenCvSharp4.runtime.win (MIT License)
• PdfSharpCore (MIT License)
• SkiaSharp (MIT License)
Current limitations:
• English-only OCR recognition (initial version)
• Multi-language support coming in future releases (extended vocabularies, new recognition models, language packs)
This is an initial, early version of the library and will continue to evolve.
Suggestions, ideas, and contributions are welcome on the GitHub repository.
| 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 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 was computed. 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. |
-
net8.0
- Microsoft.ML.OnnxRuntime (>= 1.23.2)
- OpenCvSharp4 (>= 4.11.0.20250507)
- OpenCvSharp4.runtime.win (>= 4.11.0.20250507)
- PdfSharpCore (>= 1.3.67)
- SkiaSharp (>= 3.119.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.