Skip to content

Commit 676f8c4

Browse files
committed
chore: update files
1 parent 77ab198 commit 676f8c4

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

docs/install_usage/rapidocr/how_to_convert_to_markdown.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ hide:
66

77
`rapidocr>=3.2.0`中粗略支持了导出markdown格式排版,后续会逐步优化。使用方法:
88

9-
```python linenums="1"
9+
```python linenums="1" hl_lines="10"
1010
from rapidocr import RapidOCR
1111

1212
engine = RapidOCR()

docs/install_usage/rapidocr/how_to_use_infer_engine.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ hide:
88

99
`rapidocr>=3.0.0`版本之后,`rapidocr`可以单独为文本检测、文本行方向分类和文本识别单独指定不同的推理引擎。
1010

11-
例如:文本检测使用ONNXRuntime,文本识别使用Paddle`params={"Rec.engine_type": EngineType.PADDLE}`)。同时,不同版本的OCR也可以通过`Det.ocr_version`灵活指定。
11+
例如:文本检测使用ONNXRuntime,文本识别使用PaddlePaddle`params={"Rec.engine_type": EngineType.PADDLE}`)。同时,不同版本的OCR也可以通过`Det.ocr_version`灵活指定。
1212

1313
`rapidocr`支持4种推理引擎(**ONNXRuntime / OpenVINO / PaddlePaddle / PyTorch**),推荐首先使用 **ONNXRuntime CPU** 版。默认为ONNXRuntime。
1414

1515
`rapidocr`是通过指定不同参数来选择使用不同的推理引擎的。当然,使用不同推理引擎的前提是事先安装好对应的推理引擎库,并确保安装正确。
1616

1717
### 使用ONNXRuntime
1818

19-
1. 安装ONNXRuntime。推荐用CPU版的ONNXRuntime,GPU版不推荐在`rapidocr`中使用,相关原因参见:[ONNXRuntime GPU推理](../../blog/posts/inference_engine/onnxruntime/onnxruntime-gpu.md)
19+
1. 安装ONNXRuntime。推荐用CPU版的ONNXRuntime,GPU版不推荐在`rapidocr`中使用,相关原因参见:[ONNXRuntime GPU推理](../../blog/posts/inference_engine/onnxruntime/onnxruntime-gpu.md)
2020

2121
```bash linenums="1"
2222
pip install onnxruntime
@@ -42,9 +42,7 @@ hide:
4242

4343
!!! tip
4444

45-
仅在`rapidocr>=3.1.0`中支持。
46-
47-
ONNXRuntime官方相关文档:[link](https://onnxruntime.ai/docs/execution-providers/community-maintained/CANN-ExecutionProvider.html)
45+
仅在`rapidocr>=3.1.0`中支持。ONNXRuntime官方相关文档:[link](https://onnxruntime.ai/docs/execution-providers/community-maintained/CANN-ExecutionProvider.html)
4846

4947
1. 安装
5048

@@ -106,13 +104,13 @@ hide:
106104

107105
### 使用OpenVINO
108106

109-
1. 安装OpenVINO
107+
1. 安装OpenVINO
110108

111109
```bash linenums="1"
112110
pip install openvino
113111
```
114112

115-
2. 指定OpenVINO作为推理引擎
113+
2. 指定OpenVINO作为推理引擎
116114

117115
```python linenums="1" hl_lines="5-7"
118116
from rapidocr import RapidOCR, EngineType
@@ -151,7 +149,7 @@ hide:
151149

152150
大家可以根据实际情况,选择安装需要的版本。
153151

154-
2. 指定PaddlePaddle作为推理引擎
152+
2. 指定PaddlePaddle作为推理引擎
155153

156154
=== "CPU"
157155

@@ -195,6 +193,10 @@ hide:
195193

196194
=== "NPU"
197195

196+
!!! tip
197+
198+
仅在`rapidocr>=3.3.0`中支持。对应版本的PaddlePaddle安装文档:[link](https://www.paddlepaddle.org.cn/install/quick?docurl=undefined)
199+
198200
```python linenums="1" hl_lines="3-9"
199201
from rapidocr import EngineType, RapidOCR
200202
@@ -230,11 +232,11 @@ hide:
230232

231233
1. 安装PyTorch。
232234

233-
参见PyTorch官方安装文档 → [Install PyTorch](https://pytorch.org/#:~:text=and%20easy%20scaling.-,INSTALL%20PYTORCH,-Select%20your%20preferences)
235+
参见PyTorch官方安装文档 → [Install PyTorch](https://pytorch.org/#:~:text=and%20easy%20scaling.-,INSTALL%20PYTORCH,-Select%20your%20preferences)
234236

235237
大家可以根据实际情况,选择安装需要的版本。
236238

237-
2. 指定PyTorch作为推理引擎
239+
2. 指定PyTorch作为推理引擎
238240

239241
=== "CPU"
240242

@@ -282,11 +284,9 @@ hide:
282284

283285
!!! tip
284286

285-
仅在`rapidocr>3.4.0`中支持。
286-
287-
`torch_npu`官方相关文档:[link](https://github.com/Ascend/pytorch)
287+
仅在`rapidocr>3.4.0`中支持。`torch_npu`官方相关文档:[link](https://github.com/Ascend/pytorch)
288288

289-
1. 安装`torch_npu`,参见:[docs](https://github.com/Ascend/pytorch#installation)
289+
1. 安装`torch_npu`,参见:[docs](https://github.com/Ascend/pytorch#installation)
290290

291291
2. 使用
292292

docs/install_usage/rapidocr/how_to_use_ppocrv5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hide:
88

99
值得说明的是,得益于解耦的设计,现在可以组合不同推理引擎、不同版本模型来灵活搭配使用。大家可以按需搭配哈。
1010

11-
```python linenums="1"
11+
```python linenums="1" hl_lines="3-14"
1212
from rapidocr import EngineType, LangDet, LangRec, ModelType, OCRVersion, RapidOCR
1313

1414
engine = RapidOCR(

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ nav:
155155
- 使用: install_usage/rapidocr/usage.md
156156
- 参数介绍: install_usage/rapidocr/parameters.md
157157
- 如何使用不同推理引擎?: install_usage/rapidocr/how_to_use_infer_engine.md
158-
- 如何使用本地已下载模型推理: install_usage/rapidocr/how_to_use_offline_model.md
158+
- 如何使用本地模型推理: install_usage/rapidocr/how_to_use_offline_model.md
159159
- 如何使用PP-OCRv5模型?: install_usage/rapidocr/how_to_use_ppocrv5.md
160160
- 如何将识别结果导出为markdown格式?: install_usage/rapidocr/how_to_convert_to_markdown.md
161161
- rapidocr_web:

0 commit comments

Comments
 (0)