File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
docs/blog/posts/about_model Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : Python版支持MNN推理
3+ date : 20260121
4+ authors : [SWHL]
5+ categories :
6+ - 模型相关
7+ comments : true
8+ hide :
9+ - toc
10+ draft : true
11+ ---
12+
13+ 记录支持MNN推理的过程文档。
14+
15+ <!-- more -->
16+
17+ ### 引言
18+
19+ 首先感谢[ narc1ssus1] ( https://github.com/narc1ssus1 ) 小伙伴的PR [ #613 ] ( https://github.com/RapidAI/RapidOCR/pull/613 ) 。有了这个PR,我这也有了着手来推动支持MNN作为推理引擎的动力。
20+
21+ ### 支持Det模型
22+
23+ !!! note
24+
25+ MNN部分主要参考官方文档:https://mnn-docs.readthedocs.io/en/latest/tools/convert.html
26+
27+ #### 安装MNN
28+
29+ ``` bash linenums="1"
30+ pip install MNN
31+ ```
32+
33+ #### 转换ONNX模型
34+
35+ 转换命令:
36+
37+ ``` bash linenums="1"
38+ MNNConvert -f ONNX --modelFile rapidocr/models/ch_PP-OCRv4_det_infer.onnx --MNNModel mnn/ch_PP-OCRv4_det_infer.mnn --bizCode MNN
39+ ```
40+
You can’t perform that action at this time.
0 commit comments