Skip to content

Commit 9bb0f21

Browse files
authored
Doc refine (#15907)
* support ppocrv5 minor lang docs * fixed bugs * fixed bugs * refine docs * refine docs * fixed bugs
1 parent aeef330 commit 9bb0f21

File tree

7 files changed

+129
-48
lines changed

7 files changed

+129
-48
lines changed

docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.en.md

Lines changed: 68 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,42 @@ comments: true
44

55
# 1. Introduction to PP-OCRv5 Multilingual Text Recognition
66

7-
PP-OCRv5 is the latest generation of the PP-OCR series text recognition solutions, focusing on text recognition tasks across multiple scenarios and languages. By default, the recognition model supports accurate recognition of five mainstream text types: Simplified Chinese, Chinese Pinyin, Traditional Chinese, English, and Japanese. In addition, PP-OCRv5 provides multilingual recognition capabilities covering 37 languages, including Korean, Spanish, French, Portuguese, German, Italian, Russian, and more (see [Section 4](#4-supported-languages-and-abbreviations) for the full list of supported languages and abbreviations). Compared to the previous PP-OCRv3 version, PP-OCRv5 achieves more than a 30% improvement in recognition accuracy for multilingual tasks.
7+
[PP-OCRv5](./PP-OCRv5.md) is the latest generation text recognition solution in the PP-OCR series, focusing on multi-scenario and multilingual text recognition tasks. In terms of supported text types, the default configuration of the recognition model can accurately identify five major types: Simplified Chinese, Pinyin, Traditional Chinese, English, and Japanese. Additionally, PP-OCRv5 offers multilingual text recognition capabilities covering 37 languages, including Korean, Spanish, French, Portuguese, German, Italian, Russian, and more (for a full list of supported languages and abbreviations, see [Section 4](#4-supported-languages-and-abbreviations)). Compared to the previous PP-OCRv3 version, PP-OCRv5 achieves over a 30% improvement in accuracy for multilingual text recognition.
88

9-
![img](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/japan_2_res.jpg)
9+
<div align="center">
10+
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/french_0_res.jpg" alt="French recognition result" width="500"/>
11+
<br>
12+
<b>French Recognition Result</b>
13+
</div>
1014

11-
![img](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/french_0_res.jpg)
15+
<br>
1216

13-
![img](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/german_0_res.png)
17+
<div align="center">
18+
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/german_0_res.png" alt="German recognition result" width="500"/>
19+
<br>
20+
<b>German Recognition Result</b>
21+
</div>
1422

15-
![img](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/korean_1_res.jpg)
23+
<br>
24+
25+
<div align="center">
26+
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/korean_1_res.jpg" alt="Korean recognition result" width="500"/>
27+
<br>
28+
<b>Korean Recognition Result</b>
29+
</div>
30+
31+
<br>
32+
33+
<div align="center">
34+
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/ru_0.jpeg" alt="Russian recognition result" width="500"/>
35+
<br>
36+
<b>Russian Recognition Result</b>
37+
</div>
1638

17-
![img](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/ru_0.jpeg)
1839

1940
## 2. Quick Start
2041

21-
You can use the `--lang` parameter in the command line to specify the text recognition model for your target language when running the general OCR pipeline:
42+
You can specify the language for text recognition by using the `--lang` parameter when running the general OCR pipeline in the command line:
2243

2344
```bash
2445
# Use the `--lang` parameter to specify the French recognition model
@@ -30,7 +51,7 @@ paddleocr ocr -i https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_im
3051
--save_path ./output \
3152
--device gpu:0
3253
```
33-
For explanations of other command line parameters, please refer to the [command line usage](../../pipeline_usage/OCR.en.md#21-command-line) of the general OCR pipeline. After execution, results will be printed to the terminal:
54+
For explanations of the other command-line parameters, please refer to the [Command Line Usage](../../pipeline_usage/OCR.md#21-command-line-usage) section of the general OCR pipeline documentation. After running, the results will be displayed in the terminal:
3455

3556
```bash
3657
{'res': {'input_path': '/root/.paddlex/predict_input/general_ocr_french01.png', 'page_index': None, 'model_settings': {'use_doc_preprocessor': True, 'use_textline_orientation': False}, 'doc_preprocessor_res': {'input_path': None, 'page_index': None, 'model_settings': {'use_doc_orientation_classify': False, 'use_doc_unwarping': False}, 'angle': -1}, 'dt_polys': array([[[119, 23],
@@ -54,52 +75,64 @@ For explanations of other command line parameters, please refer to the [command
5475
[108, ..., 562]], dtype=int16)}}
5576
```
5677

57-
If you specify `save_path`, the visualization results will be saved in the `save_path` directory. An example visualization is shown below:
78+
If you specify `save_path`, the visualization results will be saved to the specified path. An example of the visualized result is shown below:
5879

5980
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/general_ocr_french01_res.png"/>
6081

61-
You can also use Python code to specify the recognition model for your target language using the `lang` parameter when initializing the general OCR pipeline:
82+
83+
You can also use Python code to specify the recognition model for a particular language when initializing the general OCR pipeline via the `lang` parameter:
6284

6385
```python
6486
from paddleocr import PaddleOCR
6587

6688
ocr = PaddleOCR(
67-
lang="fr", # Specify the French recognition model via the lang parameter
68-
use_doc_orientation_classify=False, # Disable document orientation classification
69-
use_doc_unwarping=False, # Disable text image unwarping
70-
use_textline_orientation=False, # Disable textline orientation classification
89+
lang="fr", # Specify French recognition model with the lang parameter
90+
use_doc_orientation_classify=False, # Disable document orientation classification model
91+
use_doc_unwarping=False, # Disable text image unwarping model
92+
use_textline_orientation=False, # Disable text line orientation classification model
7193
)
7294
result = ocr.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_french01.png")
7395
for res in result:
7496
res.print()
7597
res.save_to_img("output")
7698
res.save_to_json("output")
7799
```
78-
For more details on the `PaddleOCR` class parameters, refer to the [Python script integration](../../pipeline_usage/OCR.en.md#22-python-script-integration) of the general OCR pipeline.
100+
For more details on the `PaddleOCR` class parameters, please refer to the [Python Scripting Integration](../../pipeline_usage/OCR.md#22-python-scripting-integration) section of the general OCR pipeline documentation.
101+
79102

80-
## 3. Benchmark Comparison
103+
## 3. Performance Comparison
81104

82-
| Model | Korean Dataset Accuracy (%) | | Model | Latin Script Languages Dataset Accuracy (%) | | Model | East Slavic Languages Dataset Accuracy (%) |
83-
|--|--|--|--|--|--|--|--|
84-
| korean_PP-OCRv5_mobile_rec | 88.0 | | latin_PP-OCRv5_mobile_rec | 84.7 | | eslav_PP-OCRv5_mobile_rec | 85.8 |
85-
| korean_PP-OCRv3_mobile_rec | 23.0 | | latin_PP-OCRv3_mobile_rec | 37.9 | | cyrillic_PP-OCRv3_mobile_rec| 50.2 |
105+
| Model | Download Link | Korean Dataset Accuracy (%) |
106+
|-|-|-|
107+
| korean_PP-OCRv5_mobile_rec |<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/korean_PP-OCRv5_mobile_rec_infer.tar">Inference Model</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/korean_PP-OCRv5_mobile_rec_pretrained.pdparams">Pretrained Model</a> | 88.0|
108+
| korean_PP-OCRv3_mobile_rec | <a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/korean_PP-OCRv3_mobile_rec_infer.tar">Inference Model</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/korean_PP-OCRv3_mobile_rec_pretrained.pdparams">Pretrained Model</a> | 23.0 |
109+
110+
| Model | Download Link | Latin Script Language Dataset Accuracy (%) |
111+
|-|-|-|
112+
| latin_PP-OCRv5_mobile_rec | <a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/latin_PP-OCRv5_mobile_rec_infer.tar">Inference Model</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/latin_PP-OCRv5_mobile_rec_pretrained.pdparams">Pretrained Model</a> | 84.7 |
113+
| latin_PP-OCRv3_mobile_rec | <a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/latin_PP-OCRv3_mobile_rec_infer.tar">Inference Model</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/latin_PP-OCRv3_mobile_rec_pretrained.pdparams">Pretrained Model</a> | 37.9 |
114+
115+
| Model | Download Link | East Slavic Language Dataset Accuracy (%) |
116+
|-|-|-|
117+
| eslav_PP-OCRv5_mobile_rec |<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/eslav_PP-OCRv5_mobile_rec_infer.tar">Inference Model</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/eslav_PP-OCRv5_mobile_rec_pretrained.pdparams">Pretrained Model</a> | 81.6 |
118+
| cyrillic_PP-OCRv3_mobile_rec | <a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/cyrillic_PP-OCRv3_mobile_rec_infer.tar">Inference Model</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/cyrillic_PP-OCRv3_mobile_rec_pretrained.pdparams">Pretrained Model</a> | 50.2 |
86119

87120
**Notes:**
88-
- Korean Dataset: PP-OCRv5's latest dataset containing 5,007 Korean text images.
89-
- Latin Script Languages Dataset: The latest PP-OCRv5 recognition dataset, containing 3,111 text images in Latin script languages.
90-
- East Slavic Languages Dataset: PP-OCRv5's latest dataset containing a total of 7,031 Russian, Belarusian, and Ukrainian text images.
121+
- Korean Dataset: The latest PP-OCRv5 dataset containing 5,007 Korean text images.
122+
- Latin Script Language Dataset: The latest PP-OCRv5 dataset containing 3,111 images of Latin script languages.
123+
- East Slavic Language Dataset: The latest PP-OCRv5 dataset containing a total of 7,031 text images in Russian, Belarusian, and Ukrainian.
91124

92125
## 4. Supported Languages and Abbreviations
93126

94127
| Language | Description | Abbreviation | | Language | Description | Abbreviation |
95128
| --- | --- | --- | ---|--- | --- | --- |
96129
| Chinese | Chinese & English | ch | | Hungarian | Hungarian | hu |
97-
| English | English | en | | Serbian (Latin) | Serbian(latin) | rslatin |
130+
| English | English | en | | Serbian (latin) | Serbian (latin) | rs_latin |
98131
| French | French | fr | | Indonesian | Indonesian | id |
99132
| German | German | de | | Occitan | Occitan | oc |
100133
| Japanese | Japanese | japan | | Icelandic | Icelandic | is |
101134
| Korean | Korean | korean | | Lithuanian | Lithuanian | lt |
102-
| Chinese Traditional | Chinese Traditional | chinese_cht | | Maori | Maori | mi |
135+
| Traditional Chinese | Chinese Traditional | chinese_cht | | Maori | Maori | mi |
103136
| Afrikaans | Afrikaans | af | | Malay | Malay | ms |
104137
| Italian | Italian | it | | Dutch | Dutch | nl |
105138
| Spanish | Spanish | es | | Norwegian | Norwegian | no |
@@ -113,4 +146,13 @@ For more details on the `PaddleOCR` class parameters, refer to the [Python scrip
113146
| Croatian | Croatian | hr | | Turkish | Turkish | tr |
114147
| Uzbek | Uzbek | uz | | Latin | Latin | la |
115148
| Russian | Russian | ru | | Belarusian | Belarusian | be |
116-
| Ukrainian | Ukranian | uk | | | | |
149+
| Ukrainian | Ukrainian | uk | | | | |
150+
151+
152+
## 5. Models and Their Supported Languages
153+
154+
| Model | Supported Languages |
155+
|-|-|
156+
| korean_PP-OCRv5_mobile_rec | Korean |
157+
| latin_PP-OCRv5_mobile_rec | English, French, German, Afrikaans, Italian, Spanish, Bosnian, Portuguese, Czech, Welsh, Danish, Estonian, Irish, Croatian, Uzbek, Hungarian, Serbian (Latin), Indonesian, Occitan, Icelandic, Lithuanian, Maori, Malay, Dutch, Norwegian, Polish, Slovak, Slovenian, Albanian, Swedish, Swahili, Tagalog, Turkish, Latin |
158+
| eslav_PP-OCRv5_mobile_rec | Russian, Belarusian, Ukrainian |

docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.md

Lines changed: 51 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,41 @@
22
comments: true
33
---
44

5-
# 一、PP-OCRv5多语种文本识别介绍
5+
# 一、PP-OCRv5多语种文字识别介绍
66

77

8-
PP-OCRv5 是 PP-OCR 系列的最新一代文字识别解决方案,专注于多场景、多语种的文字识别任务。在文字类型支持方面,默认配置的识别模型可准确识别简体中文、中文拼音、繁体中文、英文和日文这五大主流文字类型。同时,PP-OCRv5还提供了覆盖37种语言的多语种识别能力,包括韩文、西班牙文、法文、葡萄牙文、德文、意大利文、俄罗斯文等(具体支持语种及缩写详见[第四节](#四-支持语种及缩写))。相较于前代 PP-OCRv3 版本,PP-OCRv5 在多语言识别准确率上实现了超过30%的提升。
8+
[PP-OCRv5](./PP-OCRv5.md) 是 PP-OCR 系列的最新一代文字识别解决方案,专注于多场景、多语种的文字识别任务。在文字类型支持方面,默认配置的识别模型可准确识别简体中文、中文拼音、繁体中文、英文和日文这五大主流文字类型。同时,PP-OCRv5还提供了覆盖37种语言的多语种文字识别能力,包括韩文、西班牙文、法文、葡萄牙文、德文、意大利文、俄罗斯文等(具体支持语种及缩写详见[第四节](#四-支持语种及缩写))。相较于前代 PP-OCRv3 版本,PP-OCRv5 在多语言文字识别准确率上实现了超过30%的提升。
99

10+
<div align="center">
11+
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/french_0_res.jpg" alt="法文识别结" width="500"/>
12+
<br>
13+
<b>法文识别结果</b>
14+
</div>
1015

11-
![img](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/japan_2_res.jpg)
16+
<br>
1217

13-
![img](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/french_0_res.jpg)
18+
<div align="center">
19+
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/german_0_res.png" alt="德文识别结" width="500"/>
20+
<br>
21+
<b>德文识别结果</b>
22+
</div>
1423

15-
![img](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/german_0_res.png)
24+
<br>
1625

17-
![img](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/korean_1_res.jpg)
26+
<div align="center">
27+
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/korean_1_res.jpg" alt="韩文识别结果" width="500"/>
28+
<br>
29+
<b>韩文识别结果</b>
30+
</div>
31+
32+
<br>
33+
34+
<div align="center">
35+
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/ru_0.jpeg" alt="俄文识别结果" width="500"/>
36+
<br>
37+
<b>俄文识别结果</b>
38+
</div>
1839

19-
![img](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/ocr/ru_0.jpeg)
2040

2141
## 二、快速使用
2242

@@ -83,10 +103,20 @@ for res in result:
83103

84104
## 三、指标对比
85105

86-
| 模型 |韩语数据集 精度 (%)| | 模型 | 拉丁字母语言数据集 精度 (%)| | 模型| 东斯拉夫语言数据集 精度 (%) |
87-
|--|--|--|--|--|--|--|--|
88-
| korean_PP-OCRv5_mobile_rec | 88.0 | | latin_PP-OCRv5_mobile_rec | 84.7 | | eslav_PP-OCRv5_mobile_rec | 85.8 |
89-
| korean_PP-OCRv3_mobile_rec | 23.0 | | latin_PP-OCRv3_mobile_rec | 37.9 | | cyrillic_PP-OCRv3_mobile_rec| 50.2 |
106+
| 模型 | 模型下载链接 | 韩语数据集 精度 (%) |
107+
|-|-|-|
108+
| korean_PP-OCRv5_mobile_rec |<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/korean_PP-OCRv5_mobile_rec_infer.tar">推理模型</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/korean_PP-OCRv5_mobile_rec_pretrained.pdparams">训练模型</a> | 88.0|
109+
| korean_PP-OCRv3_mobile_rec | <a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/korean_PP-OCRv3_mobile_rec_infer.tar">推理模型</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/korean_PP-OCRv3_mobile_rec_pretrained.pdparams">训练模型</a> | 23.0 |
110+
111+
| 模型 | 模型下载链接 |拉丁字母语言数据集 精度 (%) |
112+
|-|-|-|
113+
| latin_PP-OCRv5_mobile_rec | <a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/latin_PP-OCRv5_mobile_rec_infer.tar">推理模型</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/latin_PP-OCRv5_mobile_rec_pretrained.pdparams">训练模型</a> | 84.7 |
114+
| latin_PP-OCRv3_mobile_rec | <a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/latin_PP-OCRv3_mobile_rec_infer.tar">推理模型</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/latin_PP-OCRv3_mobile_rec_pretrained.pdparams">训练模型</a> | 37.9 |
115+
116+
| 模型 | 模型下载链接 | 东斯拉夫语言数据集 精度 (%) |
117+
|-|-|-|
118+
| eslav_PP-OCRv5_mobile_rec |<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/eslav_PP-OCRv5_mobile_rec_infer.tar">推理模型</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/eslav_PP-OCRv5_mobile_rec_pretrained.pdparams">训练模型</a> | 81.6 |
119+
| cyrillic_PP-OCRv3_mobile_rec | <a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/cyrillic_PP-OCRv3_mobile_rec_infer.tar">推理模型</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/cyrillic_PP-OCRv3_mobile_rec_pretrained.pdparams">训练模型</a> | 50.2 |
90120

91121
**注:**
92122
- 韩语数据集:PP-OCRv5 最新构建的包含了 5007 张韩语文本图片的识别数据集。
@@ -98,7 +128,7 @@ for res in result:
98128
| 语种 | 描述 | 缩写 | | 语种 | 描述 | 缩写 |
99129
| --- | --- | --- | ---|--- | --- | --- |
100130
| 中文 | Chinese & English | ch | | 匈牙利文 | Hungarian | hu |
101-
| 英文 | English | en | | 塞尔维亚文(latin) | Serbian(latin) | rslatin |
131+
| 英文 | English | en | | 塞尔维亚文(latin) | Serbian(latin) | rs_latin |
102132
| 法文 | French | fr | | 印度尼西亚文 | Indonesian | id |
103133
| 德文 | German | de | | 欧西坦文 | Occitan | oc |
104134
| 日文 | Japanese | japan | | 冰岛文 | Icelandic | is |
@@ -118,3 +148,12 @@ for res in result:
118148
| 乌兹别克文 | Uzbek | uz | | 拉丁文 | Latin | la |
119149
| 俄罗斯文 | Russian | ru | | 白俄罗斯文 | Belarusian | be |
120150
| 乌克兰文 | Ukranian | uk | | | | |
151+
152+
153+
## 五、模型及其支持的语种
154+
155+
| 模型 | 支持语种 |
156+
|-|-|
157+
| korean_PP-OCRv5_mobile_rec | 韩文 |
158+
| latin_PP-OCRv5_mobile_rec |英文、法文、德文、南非荷兰文、意大利文、西班牙文、波斯尼亚文、葡萄牙文、捷克文、威尔士文、丹麦文、爱沙尼亚文、爱尔兰文、克罗地亚文、乌兹别克文、匈牙利文、塞尔维亚文(latin)、印度尼西亚文、欧西坦文、冰岛文、立陶宛文、毛利文、马来文、荷兰文、挪威文、波兰文、斯洛伐克文、斯洛文尼亚文、阿尔巴尼亚文、瑞典文、西瓦希里文、塔加洛文、土耳其文、拉丁文|
159+
| eslav_PP-OCRv5_mobile_rec | 俄罗斯文、白俄罗斯文、乌克兰文 |

0 commit comments

Comments
 (0)