Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Releasing SimdPaddleOCR – a complete OCR inference library in pure C#

Description and use

SimdPaddleOCR is a fully managed C# OCR library that eliminates native dependencies, simplifies deployment, and outperforms a pure‑C reference on the same model.

Problem

Deploying OCR engines in .NET projects often requires native dependencies (P/Invoke, OpenCV DLLs, CUDA, etc.) that complicate distribution and cause runtime failures on different platforms.

Outcome

SimdPaddleOCR delivers end‑to‑end scene OCR inference entirely in managed code, eliminating native DLLs, reducing deployment friction, and achieving faster inference than a comparable pure‑C implementation on the same model.

Workflow

  • 1. Add NuGet packages: Sdcb.SimdPaddleOCR, Sdcb.SimdPaddleOCR.Models.ChineseV6Tiny, and an image decoder such as SixLabors.ImageSharp.
  • 2. Load the embedded model: await PaddleOcrAll.LoadAsync(ChineseV6TinyModels.Default).
  • 3. Decode an image to a raw 8‑bit BGR byte array using any image library (ImageSharp, SkiaSharp, OpenCvSharp, etc.).
  • 4. Run inference: PaddleOcrResult result = ocr.Run(bgr, width, height).
  • 5. Consume the OCR text from result.Text.
  • 6. (Optional) Use other model packages (Small, Medium, TextLineOrientation) or load custom ONNX files from a local path.

Evidence

SimdPaddleOCR is a complete OCR inference engine written entirely in C#. It does not depend on Paddle Inference, does not depend on ONNX Runtime, and does not ship OpenCV native DLLs.

Source

On the same model, the C# version is faster end-to-end than the pure C version (the trade‑off is higher managed memory; native C still wins there).

Source

Install the core package and the tiny Chinese model in your project (installing tiny automatically pulls in the orientation classification package TextLineOrientation).

Source

  • Record date: 2026-09-13T20:00:55.965Z