Back to Chineseocr Lite

OcrLiteOnnxCs

dotnet_projects/OcrLiteOnnxCs/README.md

latest1.7 KB
Original Source

OcrLiteOnnxCs

介绍

  • 本项目为Windows平台C# WinForm范例。
  • 部分代码来自:cnlite_cs
  • 依赖的包:Emgu.CV、MicroSoft.ML.OnnxRuntime、clipper_library

编译环境

  1. Windows 10 x64
  2. Visual Studio 2017或以上
编译说明
  1. Vs2017打开OcrLiteOnnxCs.sln。
  2. 解决方案资源管理器->OcrLiteLib->右键->管理NuGet程序包->浏览->搜索->安装
  • 注意:Emgu.CV要选作者是“Emgu Corporation”
  • Emgu.CV 4.4.0.4099
  • Emgu.CV.runtime.windows 4.4.0.4099
  • MicroSoft.ML.OnnxRuntime 1.6.0
  • clipper_library 6.2.1
  1. 解决方案资源管理器->OcrLiteOnnxForm->右键->管理NuGet程序包->浏览->搜索->安装
  • 注意:Emgu.CV要选作者是“Emgu Corporation”
  • Emgu.CV 4.4.0.4099
  • Emgu.CV.Bitmap 4.4.0.4099
  1. 确保:OcrLiteOnnxForm设为启动项目
  2. 确保:OcrLiteOnnxForm->右键->属性->生成->平台目标:x64
  3. 确保:OcrLiteLib->右键->属性->生成->平台目标:x64
  4. 生成解决方案
  5. 把models文件夹复制到\OcrLiteOnnxCs\OcrLiteOnnxForm\bin\Debug(或Release)
Debug\models
├── angle_net.onnx
├── crnn_lite_lstm.onnx
├── dbnet.onnx
└── keys.txt
  1. 运行
其它
  • 修改线程数,必须“重新初始化”才能生效
  • “models”按钮修改模型路径,必须“重新初始化”才能生效
  • 输入参数说明请参考OcrLiteOnnx项目