mirror of
https://github.com/RapidAI/RapidOCR.git
synced 2026-11-10 21:10:55 +08:00
Update README.md
This commit is contained in:
1 parent
281ab13bf0
commit
29e1d2bceb
1 file changed
+16
-1
+16
-1
@@ -2,4 +2,19 @@
|
||||
|
||||
## 简介
|
||||
本目录存放C++相关demo项目
|
||||
1. BaiPiaoOcrOnnx项目: 模型源自paddleOCR,转为onnx格式后,使用onnxruntime框架进行推理。
|
||||
1. BaiPiaoOcrOnnx项目: 模型源自paddleOCR,转为onnx格式后,使用onnxruntime框架进行推理。
|
||||
|
||||
|
||||
|
||||
怎样添加provider 以支持gpu等,下面以cuda为例
|
||||
`
|
||||
OrtEnv* env;
|
||||
OrtInitialize(ORT_LOGGING_LEVEL_WARNING, "test", &env)
|
||||
OrtSessionOptions* session_option = OrtCreateSessionOptions();
|
||||
OrtProviderFactoryInterface** factory;
|
||||
OrtCreateCUDAExecutionProviderFactory(0, &factory);
|
||||
OrtSessionOptionsAppendExecutionProvider(session_option, factory);
|
||||
OrtReleaseObject(factory);
|
||||
OrtCreateSession(env, model_path, session_option, &session);
|
||||
|
||||
`
|
||||
Reference in new issue
Block a user