You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/version3.x/algorithm/PP-OCRv5/PP-OCRv5_multi_languages.en.md
+68-26Lines changed: 68 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,42 @@ comments: true
4
4
5
5
# 1. Introduction to PP-OCRv5 Multilingual Text Recognition
6
6
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.
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:
22
43
23
44
```bash
24
45
# Use the `--lang` parameter to specify the French recognition model
For explanations of other commandline 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:
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:
62
84
63
85
```python
64
86
from paddleocr import PaddleOCR
65
87
66
88
ocr = PaddleOCR(
67
-
lang="fr", # Specify the French recognition model via the lang parameter
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
71
93
)
72
94
result = ocr.predict("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_french01.png")
73
95
for res in result:
74
96
res.print()
75
97
res.save_to_img("output")
76
98
res.save_to_json("output")
77
99
```
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
+
79
102
80
-
## 3. Benchmark Comparison
103
+
## 3. Performance Comparison
81
104
82
-
| Model | Korean Dataset Accuracy (%) || Model | Latin Script Languages Dataset Accuracy (%) || Model | East Slavic Languages Dataset Accuracy (%) |
0 commit comments