v0.1.0 lw.PPOCR.Inference - Unified PP-OCR for Windows / Windows 统一推理首发版
lw.PPOCR.Inference v0.1.0
首个公开预览版本,统一了 OpenCV DNN、ONNX Runtime DirectML、OpenVINO 和 TensorRT 四种 PP-OCR 推理后端。
This is the first public preview, providing one unified PP-OCR API across OpenCV DNN, ONNX Runtime DirectML, OpenVINO, and TensorRT.
主要内容 / Highlights
-
稳定、语言无关的 C ABI,任何能够调用 C DLL 的语言均可接入。
-
四种 Runtime 完全隔离,减少 OpenCV、ONNX Runtime、OpenVINO、CUDA 和 TensorRT 的 DLL 冲突。
-
支持文字检测、方向分类、文字识别、结构化结果、JSON、文字框、置信度和分阶段耗时。
-
提供 .NET 8 封装、统一 CLI 和可用 Visual Studio Designer 编辑的 WinForms Demo。
-
提供 PP-OCRv6 tiny ONNX 体验模型;TensorRT FP16 engine 与运行库放在 Windows Release 包中。
-
DirectML 支持 CPU/GPU 切换和 GPU ID;TensorRT 支持预生成 FP16 engine。
-
CLI 支持预热与多轮基准测试,输出均值、中位数、P95、最小值和最大值。
-
附带中英文 README、TensorRT 转换文档和四后端性能测试报告。
-
Stable, language-neutral C ABI for any language that can call a C DLL.
-
Four isolated Runtime packages that avoid cross-framework DLL conflicts.
-
Detection, direction classification, recognition, structured/JSON output, boxes, scores, and stage timings.
-
.NET 8 binding, unified CLI, and a WinForms demo editable with the Visual Studio Designer.
-
Bundled PP-OCRv6 tiny ONNX experience model; TensorRT FP16 engines are included in the Windows Release package.
-
DirectML CPU/GPU selection and GPU ID support; TensorRT prebuilt FP16 engine support.
-
Repeatable CLI benchmarks with mean, median, P95, minimum, and maximum latency.
-
Chinese and English README files, TensorRT conversion guidance, and a four-backend performance report.
性能摘要 / Performance Snapshot
测试机器为 AMD Ryzen 7 7735H、RTX 4060 Laptop GPU,图片为 500×500,CLS 开启,预热 5 次后统计 30 次:
Tested on an AMD Ryzen 7 7735H and RTX 4060 Laptop GPU with a 500×500 image, CLS enabled, 5 warmups, and 30 measured runs:
| Backend | Mean latency | P95 | Estimated throughput |
|---|---|---|---|
| OpenCV DNN CPU | 108.500 ms | 111.118 ms | 9.22 runs/s |
| OpenVINO CPU | 45.892 ms | 48.579 ms | 21.79 runs/s |
| DirectML GPU | 66.559 ms | 72.218 ms | 15.02 runs/s |
| TensorRT FP16 | 12.187 ms | 13.636 ms | 82.05 runs/s |
完整测试条件见 docs/performance-report.md。Results are specific to this hardware and software stack; see docs/performance-report.md for the complete conditions.
下载与校验 / Download and Verification
下载 lw.PPOCR.Inference-v0.1.0-win-x64.zip,并使用同目录下的 .sha256 文件验证完整性:
Download lw.PPOCR.Inference-v0.1.0-win-x64.zip and verify it with the accompanying .sha256 file:
$expected = (Get-Content .\lw.PPOCR.Inference-v0.1.0-win-x64.zip.sha256).Split(' ')[0]
$actual = (Get-FileHash .\lw.PPOCR.Inference-v0.1.0-win-x64.zip -Algorithm SHA256).Hash.ToLowerInvariant()
$actual -eq $expectedTensorRT engine 与 GPU 架构、TensorRT、CUDA 和驱动环境相关。生产部署建议在目标机器或相同环境中重新生成 engine。
TensorRT engines depend on the GPU architecture, TensorRT, CUDA, and driver stack. Regenerate production engines on the target machine or an identical environment.
兼容性 / Compatibility
- Windows 10/11 x64
- .NET 8 Desktop Runtime for the managed demo and CLI
- NVIDIA GPU, compatible driver, and CUDA/TensorRT stack for the TensorRT backend
- MIT License; Clipper 6.4.2 remains under BSL-1.0
v0.1.0is a pre-1.0 preview. Public interfaces may still evolve before API v1 is frozen.