From 9bb0f2149a9eb78d5e0d222dba8df7cbec2419f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=E5=8D=BF?= <64625668+leo-q8@users.noreply.github.com> Date: Wed, 2 Jul 2025 15:58:02 +0800 Subject: [PATCH] Doc refine (#15907) * support ppocrv5 minor lang docs * fixed bugs * fixed bugs * refine docs * refine docs * fixed bugs --- .../PP-OCRv5/PP-OCRv5_multi_languages.en.md | 94 ++++++++++++++----- .../PP-OCRv5/PP-OCRv5_multi_languages.md | 63 ++++++++++--- .../module_usage/text_recognition.en.md | 4 +- .../module_usage/text_recognition.md | 4 +- docs/version3.x/pipeline_usage/OCR.en.md | 4 +- docs/version3.x/pipeline_usage/OCR.md | 4 +- mkdocs.yml | 4 +- 7 files changed, 129 insertions(+), 48 deletions(-) diff --git a/docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.en.md b/docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.en.md index ad09d42ce6..e206d7f51a 100644 --- a/docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.en.md +++ b/docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.en.md @@ -4,21 +4,42 @@ comments: true # 1. Introduction to PP-OCRv5 Multilingual Text Recognition -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. +[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. - +
+
+
+
+
-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:
+
+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:
```python
from paddleocr import PaddleOCR
ocr = PaddleOCR(
- lang="fr", # Specify the French recognition model via the lang parameter
- use_doc_orientation_classify=False, # Disable document orientation classification
- use_doc_unwarping=False, # Disable text image unwarping
- use_textline_orientation=False, # Disable textline orientation classification
+ lang="fr", # Specify French recognition model with the lang parameter
+ use_doc_orientation_classify=False, # Disable document orientation classification model
+ use_doc_unwarping=False, # Disable text image unwarping model
+ use_textline_orientation=False, # Disable text line orientation classification model
)
result = ocr.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_french01.png")
for res in result:
@@ -75,31 +97,42 @@ for res in result:
res.save_to_img("output")
res.save_to_json("output")
```
-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.
+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.
-## 3. Benchmark Comparison
-| Model | Korean Dataset Accuracy (%) | | Model | Latin Script Languages Dataset Accuracy (%) | | Model | East Slavic Languages Dataset Accuracy (%) |
-|--|--|--|--|--|--|--|--|
-| korean_PP-OCRv5_mobile_rec | 88.0 | | latin_PP-OCRv5_mobile_rec | 84.7 | | eslav_PP-OCRv5_mobile_rec | 85.8 |
-| korean_PP-OCRv3_mobile_rec | 23.0 | | latin_PP-OCRv3_mobile_rec | 37.9 | | cyrillic_PP-OCRv3_mobile_rec| 50.2 |
+## 3. Performance Comparison
+
+| Model | Download Link | Korean Dataset Accuracy (%) |
+|-|-|-|
+| korean_PP-OCRv5_mobile_rec |Inference Model/Pretrained Model | 88.0|
+| korean_PP-OCRv3_mobile_rec | Inference Model/Pretrained Model | 23.0 |
+
+| Model | Download Link | Latin Script Language Dataset Accuracy (%) |
+|-|-|-|
+| latin_PP-OCRv5_mobile_rec | Inference Model/Pretrained Model | 84.7 |
+| latin_PP-OCRv3_mobile_rec | Inference Model/Pretrained Model | 37.9 |
+
+| Model | Download Link | East Slavic Language Dataset Accuracy (%) |
+|-|-|-|
+| eslav_PP-OCRv5_mobile_rec |Inference Model/Pretrained Model | 81.6 |
+| cyrillic_PP-OCRv3_mobile_rec | Inference Model/Pretrained Model | 50.2 |
**Notes:**
- - Korean Dataset: PP-OCRv5's latest dataset containing 5,007 Korean text images.
- - Latin Script Languages Dataset: The latest PP-OCRv5 recognition dataset, containing 3,111 text images in Latin script languages.
- - East Slavic Languages Dataset: PP-OCRv5's latest dataset containing a total of 7,031 Russian, Belarusian, and Ukrainian text images.
+ - Korean Dataset: The latest PP-OCRv5 dataset containing 5,007 Korean text images.
+ - Latin Script Language Dataset: The latest PP-OCRv5 dataset containing 3,111 images of Latin script languages.
+ - East Slavic Language Dataset: The latest PP-OCRv5 dataset containing a total of 7,031 text images in Russian, Belarusian, and Ukrainian.
## 4. Supported Languages and Abbreviations
| Language | Description | Abbreviation | | Language | Description | Abbreviation |
| --- | --- | --- | ---|--- | --- | --- |
| Chinese | Chinese & English | ch | | Hungarian | Hungarian | hu |
-| English | English | en | | Serbian (Latin) | Serbian(latin) | rslatin |
+| English | English | en | | Serbian (latin) | Serbian (latin) | rs_latin |
| French | French | fr | | Indonesian | Indonesian | id |
| German | German | de | | Occitan | Occitan | oc |
| Japanese | Japanese | japan | | Icelandic | Icelandic | is |
| Korean | Korean | korean | | Lithuanian | Lithuanian | lt |
-| Chinese Traditional | Chinese Traditional | chinese_cht | | Maori | Maori | mi |
+| Traditional Chinese | Chinese Traditional | chinese_cht | | Maori | Maori | mi |
| Afrikaans | Afrikaans | af | | Malay | Malay | ms |
| Italian | Italian | it | | Dutch | Dutch | nl |
| Spanish | Spanish | es | | Norwegian | Norwegian | no |
@@ -113,4 +146,13 @@ For more details on the `PaddleOCR` class parameters, refer to the [Python scrip
| Croatian | Croatian | hr | | Turkish | Turkish | tr |
| Uzbek | Uzbek | uz | | Latin | Latin | la |
| Russian | Russian | ru | | Belarusian | Belarusian | be |
-| Ukrainian | Ukranian | uk | | | | |
+| Ukrainian | Ukrainian | uk | | | | |
+
+
+## 5. Models and Their Supported Languages
+
+| Model | Supported Languages |
+|-|-|
+| korean_PP-OCRv5_mobile_rec | Korean |
+| 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 |
+| eslav_PP-OCRv5_mobile_rec | Russian, Belarusian, Ukrainian |
diff --git a/docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.md b/docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.md
index 429b4f97a7..65471f3909 100644
--- a/docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.md
+++ b/docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.md
@@ -2,21 +2,41 @@
comments: true
---
-# 一、PP-OCRv5多语种文本识别介绍
+# 一、PP-OCRv5多语种文字识别介绍
-PP-OCRv5 是 PP-OCR 系列的最新一代文字识别解决方案,专注于多场景、多语种的文字识别任务。在文字类型支持方面,默认配置的识别模型可准确识别简体中文、中文拼音、繁体中文、英文和日文这五大主流文字类型。同时,PP-OCRv5还提供了覆盖37种语言的多语种识别能力,包括韩文、西班牙文、法文、葡萄牙文、德文、意大利文、俄罗斯文等(具体支持语种及缩写详见[第四节](#四-支持语种及缩写))。相较于前代 PP-OCRv3 版本,PP-OCRv5 在多语言识别准确率上实现了超过30%的提升。
+[PP-OCRv5](./PP-OCRv5.md) 是 PP-OCR 系列的最新一代文字识别解决方案,专注于多场景、多语种的文字识别任务。在文字类型支持方面,默认配置的识别模型可准确识别简体中文、中文拼音、繁体中文、英文和日文这五大主流文字类型。同时,PP-OCRv5还提供了覆盖37种语言的多语种文字识别能力,包括韩文、西班牙文、法文、葡萄牙文、德文、意大利文、俄罗斯文等(具体支持语种及缩写详见[第四节](#四-支持语种及缩写))。相较于前代 PP-OCRv3 版本,PP-OCRv5 在多语言文字识别准确率上实现了超过30%的提升。
+
+
+
+
+