File tree Expand file tree Collapse file tree 8 files changed +21
-10
lines changed
Expand file tree Collapse file tree 8 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 1+ zhuanlan.zhihu.com/*
2+ https://demo.doctrp.top/
3+ http://127.0.0.1:8001/
4+ http://localhost:9003
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ comments: true
1616
1717### 引言
1818
19- - 关于模型的推理框架有很多,包括PC/移动端等等。之前在 [ 老潘的个人博客 ] ( https://ai.oldpan.me/t/topic/24 ) 里看到过相关介绍
19+ - 关于模型的推理框架有很多,包括PC/移动端等等。
2020- 我在这里做一个简单汇总。但更侧重于寻找一个在GPU上,可以支持动态输入且在GPU上更快,轻量的推理引擎。
2121
2222### 目前已知推理引擎
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ $ pip install openvino-dev
5757# ## OpenVINO与ONNXRuntime性能对比
5858
5959- 推理设备:` Windows 64位 Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz 2.59 GHz`
60- - [ 测试图像宽高](https://drive.google.com/file/d/1iJcGvOVIdUlyOS52bBdvO8uzx8QORo5M/view ? usp=sharing) : ` 12119x810`
60+ - 测试图像宽高: ` 12119x810`
6161
6262| 测试模型 | 推理框架 | 占用内存(3次平均) | 推理时间(3次平均) |
6363| ------------------------------------ | -------------------- | ----------------- | ----------------- |
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ categories:
1010comments : true
1111---
1212
13+ !!! warning
14+
15+ 文章发布较早,内容可能过时,阅读注意甄别。
16+
1317介绍在CPU端和GPU端,OCR模型的推理引擎选择问题。
1418
1519<!-- more -->
@@ -41,7 +45,7 @@ paddlepaddle推理引擎,并未测试与其他两个速度差异。但是相
4145
4246### ☆ 推荐:` rapidocr_paddle `
4347
44- ### 推荐理由 → [ link] ( ../../.. /install_usage/rapidocr_paddle/usage.md )
48+ ### 推荐理由 → [ link] ( https://rapidai.github.io/RapidOCRDocs/v1.4.4 /install_usage/rapidocr_paddle/usage/ )
4549
4650### 其他不推荐原因
4751
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ comments: true
1313
1414#### [ RapidStructure] ( https://github.com/RapidAI/RapidStructure ) :版面分析
1515
16- - [ 含文本的图像方向分类] ( https://github.com/RapidAI/RapidStructure/blob/main/docs/README_Orientation.md )
17- - [ 版面分析] ( https://github.com/RapidAI/RapidStructure/blob/main/docs/README_Layout.md )
18- - [ 表格还原] ( https://github.com/RapidAI/RapidStructure/blob/main/docs/README_Table.md )
16+ - [ 含文本的图像方向分类] ( https://github.com/RapidAI/RapidOrientation )
17+ - [ 版面分析] ( https://github.com/RapidAI/RapidLayout )
18+ - [ 表格还原] ( https://github.com/RapidAI/RapidTable )
1919
2020#### [ RapidOCRServer] ( https://github.com/Physton/RapidOCRServer ) :RapidOCR HTTP服务/win32程序/易语言编写
2121
Original file line number Diff line number Diff line change 55 - toc
66---
77
8+ !!! warning
9+
10+ 文章发布较早,内容可能过时,阅读注意甄别。
811
912#### Q: 为什么我的模型在ONNXRuntime GPU版上比在CPU上还要慢?
1013
1114** A:** 因为OCR任务中输入图像Shape是动态的。每次GPU上都需要重新清空上一次不同Shape的缓存结果。如果输入图像Shape不变的情况下,ONNXRuntime GPU版一般都要比CPU快的。该问题已经提了相关issue([ issue #13198 ] ( https://github.com/microsoft/onnxruntime/issues/13198 ) )。
1215
13- 推荐CPU端推理用` rapidocr_onnxruntime ` 或者` rapidocr_openvino ` ,GPU端用` rapidocr_paddle ` 。关于` rapidocr_onnxruntime ` 和` rapidocr_paddle ` 两者之间推理,可参见:[ docs] ( ../.. /install_usage/rapidocr_paddle.md#推理速度比较 )
16+ 推荐CPU端推理用` rapidocr_onnxruntime ` 或者` rapidocr_openvino ` ,GPU端用` rapidocr_paddle ` 。关于` rapidocr_onnxruntime ` 和` rapidocr_paddle ` 两者之间推理,可参见:[ docs] ( .https://rapidai.github.io/RapidOCRDocs/v1.4.4 /install_usage/rapidocr_paddle/usage/#_4 )
1417
1518#### Q: 请问这个能在32位C#中用嘛?
1619
5861
5962#### Q: 您好,我想部署下咱们的ocr识别,有提供linux版本的ocr部署包吗?
6063
61- ** A:** linux版本的自己编译即可, 可以参考我们的action中的脚本;其实编译非常容易,安装个opencv后,在cmakelists.txt中修改一下onnxruntime的路径即可,具体参考这个: < https://github.com/RapidOCR /RapidOCR/blob/main /.github/workflows/make-linux.yml >
64+ ** A:** linux版本的自己编译即可, 可以参考我们的action中的脚本;其实编译非常容易,安装个opencv后,在cmakelists.txt中修改一下onnxruntime的路径即可,具体参考这个: < https://github.com/RapidAI /RapidOCR/blob/v0.1.5 /.github/workflows/make-linux.yml >
6265
6366#### Q: onnxruntime编译好的C++库,哪里可以下载到?
6467
Original file line number Diff line number Diff line change 3030
3131 OCR API的输出结果为最原始结果,大家可按需进一步扩展。
3232
33- 该包是将[ rapidocr] ( ./rapidocr/install.md ) 库做了API封装,采用[ FastAPI] ( https://fastapi.tiangolo.com/ ) + [ uvicorn] ( https://www.uvicorn.org/ ) 实现。
33+ 该包是将[ rapidocr] ( .. /rapidocr/install.md ) 库做了API封装,采用[ FastAPI] ( https://fastapi.tiangolo.com/ ) + [ uvicorn] ( https://www.uvicorn.org/ ) 实现。
3434
3535定位是一个快速调用` rapidocr ` 的API接口,没有考虑多进程处理并发请求,如果有这需求的小伙伴,可以看看[ gunicorn] ( https://gunicorn.org/ ) 等。
3636
Original file line number Diff line number Diff line change @@ -77,4 +77,4 @@ comments: true
7777
78783. 打开 < http://127.0.0.1:8001> 即可, enjoy it!
7979
80- ! [ocr_web_multi_demo](https://raw.githubusercontent.com/RapidAI/RapidOCR/main /ocrweb_multi/assets/ocr_web_multi.jpg)
80+ ! [ocr_web_multi_demo](https://raw.githubusercontent.com/RapidAI/RapidOCR/refs/tags/v1.4.1 /ocrweb_multi/assets/ocr_web_multi.jpg)
You can’t perform that action at this time.
0 commit comments