Skip to content

Commit fd3a379

Browse files
committed
chore(rapidocr): update install
1 parent 3394c1a commit fd3a379

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

docs/install_usage/rapidocr/install.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,34 @@ pip install rapidocr
3030
国内安装速度慢的话,可以指定国内的安装源,如使用清华源:
3131

3232
```bash linenums="1"
33-
pip install rapidocr-i https://pypi.tuna.tsinghua.edu.cn/simple/
33+
pip install rapidocr -i https://pypi.tuna.tsinghua.edu.cn/simple/
3434
```
3535

3636
#### 验证安装是否成功
3737

38-
运行以下代码,终端可以打印出文字内容,即安装成功。
38+
=== `rapidocr>=2.0.3`验证方式
3939

40-
```bash linenums="1"
41-
rapidocr -img "https://github.com/RapidAI/RapidOCR/blob/main/python/tests/test_files/ch_en_num.jpg?raw=true" --vis_res
42-
```
40+
```bash linenums="1"
41+
$ rapidocr check
42+
43+
# 输出以下内容即证明安装成功
44+
[INFO] 2025-03-20 21:46:47,854 base.py:30: Using engine_name: onnxruntime
45+
[INFO] 2025-03-20 21:46:47,886 utils.py:35: File already exists in /Users/jiahuawang/miniconda3/envs/py310/lib/python3.10/site-packages/rapidocr/models/ch_PP-OCRv4_det_infer.onnx
46+
[INFO] 2025-03-20 21:46:47,931 base.py:30: Using engine_name: onnxruntime
47+
[INFO] 2025-03-20 21:46:47,931 utils.py:35: File already exists in /Users/jiahuawang/miniconda3/envs/py310/lib/python3.10/site-packages/rapidocr/models/ch_ppocr_mobile_v2.0_cls_infer.onnx
48+
[INFO] 2025-03-20 21:46:47,949 base.py:30: Using engine_name: onnxruntime
49+
[INFO] 2025-03-20 21:46:47,949 utils.py:35: File already exists in /Users/jiahuawang/miniconda3/envs/py310/lib/python3.10/site-packages/rapidocr/models/ch_PP-OCRv4_rec_infer.onnx
50+
51+
Success! rapidocr is installed correctly!
52+
```
53+
54+
=== `rapidocr>=2.0.0,<2.0.2`验证方式
55+
56+
运行以下代码,终端可以打印出文字内容,即安装成功。
57+
58+
```bash linenums="1"
59+
rapidocr -img "https://github.com/RapidAI/RapidOCR/blob/main/python/tests/test_files/ch_en_num.jpg?raw=true" --vis_res
60+
```
4361

4462
!!! info
4563

docs/install_usage/rapidocr/usage.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ result.vis()
3232

3333
=== "传入`config.yaml`使用"
3434

35-
自定义`config.yaml`配置,
36-
37-
```bash linenums="1"
38-
rapidocr -img "https://github.com/RapidAI/RapidOCR/blob/main/python/tests/test_files/ch_en_num.jpg?raw=true" --vis_res
39-
```
35+
1. 生成`default_rapidocr.yaml`的配置文件
36+
```bash linenums="1"
37+
$ rapidocr config
38+
```
39+
2. 根据自己的需要更改YAML相应的值
40+
3. 传入到`RapidOCR`中使用
4041

4142
=== "直接传入参数"
4243

0 commit comments

Comments
 (0)