Skip to content

Commit 2cf8612

Browse files
[Cherry-pick] #15471 #15542 #15561 #15329 (#15563)
* [WIP][Feat] Accommodate PaddleX MKL-DNN new behavior (#15471) * Accommodate PaddleX MKL-DNN new behavior * Bump paddlex version * Use stderr * Fix data (#15542) * Update PP-OCRv4 supported languages and default models (#15561) Co-authored-by: Sam-gsj <[email protected]> * Update default models (#15329) --------- Co-authored-by: Sam-gsj <[email protected]>
1 parent 7ef86f6 commit 2cf8612

30 files changed

+97
-138
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,16 +277,16 @@ Unless otherwise specified:
277277
| Config | Avg Time/Image (s) | Avg Chars/sec | Avg CPU Usage (%) | Peak RAM (MB) | Avg RAM (MB) | Peak VRAM (MB) | Avg VRAM (MB) |
278278
| -------------- | ------------------ | ------------- | ----------------- | ------------- | ------------ | -------------- | ------------- |
279279
| base | 0.56 | 1162 | 106.02 | 1576.43 | 1420.83 | 4342.00 | 3258.95 |
280-
| with_textline | 0.60 | 1083 | 105.59 | 1715.65 | 1510.83 | 4342.00 | 3266.05 |
281-
| with_all | 1.01 | 605 | 104.89 | 1949.11 | 1612.00 | 2624.00 | 2210.15 |
280+
| with_textline | 0.59 | 1104 | 105.58 | 1765.64 | 1478.53 | 19.48 | 4350.00 | 3267.77 |
281+
| with_all | 1.02 | 600 | 104.92 | 1924.23 | 1628.50 | 10.96 | 2632.00 | 2217.01 |
282282

283283
**CPU, without high-performance inference:**
284284

285285
| Config | Avg Time/Image (s) | Avg Chars/sec | Avg CPU Usage (%) | Peak RAM (MB) | Avg RAM (MB) |
286286
| -------------- | ------------------ | ------------- | ----------------- | ------------- | ------------ |
287287
| base | 1.43 | 455 | 798.93 | 11695.40 | 6829.09 |
288-
| with_textline | 1.43 | 454 | 801.90 | 11994.30 | 6947.94 |
289-
| with_all | 1.90 | 320 | 642.48 | 11710.80 | 6944.01 |
288+
| with_textline | 1.50 | 434 | 799.47 | 12007.20 | 6882.22 |
289+
| with_all | 1.93 | 316 | 646.49 | 11759.60 | 6940.54 |
290290

291291
> Note: Auxiliary features such as image unwarping can impact inference accuracy. More features do not necessarily yield better results and may increase resource usage.
292292

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,16 @@
279279
| 配置 | 平均每图耗时(s) | 平均每秒预测字符数量 | 平均 CPU 利用率(%) | 峰值 RAM 用量(MB) | 平均 RAM 用量(MB) | 峰值 VRAM 用量(MB) | 平均 VRAM 用量(MB) |
280280
| --- | --- | --- | --- | --- | --- | --- | --- |
281281
| base | 0.56 | 1162 | 106.02 | 1576.43 | 1420.83 | 18.95 | 4342.00 | 3258.95 |
282-
| with_textline | 0.60 | 1083 | 105.59 | 1715.65 | 1510.83 | 18.48 | 4342.00 | 3266.05 |
283-
| with_all | 1.01 | 605 | 104.89 | 1949.11 | 1612.00 | 10.85 | 2624.00 | 2210.15 |
282+
| with_textline | 0.59 | 1104 | 105.58 | 1765.64 | 1478.53 | 19.48 | 4350.00 | 3267.77 |
283+
| with_all | 1.02 | 600 | 104.92 | 1924.23 | 1628.50 | 10.96 | 2632.00 | 2217.01 |
284284

285285
**CPU,不使用高性能推理:**
286286

287287
| 配置 | 平均每图耗时(s) | 平均每秒预测字符数量 | 平均 CPU 利用率(%) | 峰值 RAM 用量(MB) | 平均 RAM 用量(MB) |
288288
| --- | --- | --- | --- | --- | --- |
289289
| base | 1.43 | 455 | 798.93 | 11695.40 | 6829.09 |
290-
| with_textline | 1.43 | 454 | 801.90 | 11994.30 | 6947.94 |
291-
| with_all | 1.90 | 320 | 642.48 | 11710.80 | 6944.01 |
290+
| with_textline | 1.50 | 434 | 799.47 | 12007.20 | 6882.22 |
291+
| with_all | 1.93 | 316 | 646.49 | 11759.60 | 6940.54 |
292292

293293
> 说明:文本图像矫正等辅助功能会对端到端推理精度造成影响,因此并不一定使用的辅助功能越多、资源用量越大。
294294

docs/version3.x/pipeline_usage/OCR.en.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -879,10 +879,10 @@ Any floating-point number greater than <code>0</code>. If not set, the pipeline'
879879
</tr>
880880
<tr>
881881
<td><code>enable_mkldnn</code></td>
882-
<td>Whether to enable the MKL-DNN acceleration library. If not set, it will be enabled by default.
882+
<td>Whether to enable the MKL-DNN acceleration library.
883883
</td>
884884
<td><code>bool</code></td>
885-
<td></td>
885+
<td><code>True</code></td>
886886
</tr>
887887
<tr>
888888
<td><code>cpu_threads</code></td>
@@ -1209,9 +1209,9 @@ In the above Python script, the following steps are performed:
12091209
</tr>
12101210
<tr>
12111211
<td><code>enable_mkldnn</code></td>
1212-
<td>Whether to enable the MKL-DNN acceleration library. If set to <code>None</code>, it will be enabled by default.</td>
1212+
<td>Whether to enable the MKL-DNN acceleration library.</td>
12131213
<td><code>bool</code></td>
1214-
<td><code>None</code></td>
1214+
<td><code>True</code></td>
12151215
</tr>
12161216
<tr>
12171217
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/OCR.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -878,10 +878,10 @@ paddleocr ocr -i ./general_ocr_002.png --ocr_version PP-OCRv4
878878
</tr>
879879
<tr>
880880
<td><code>enable_mkldnn</code></td>
881-
<td>是否启用 MKL-DNN 加速库。如果不设置,将默认启用。
881+
<td>是否启用 MKL-DNN 加速库。
882882
</td>
883883
<td><code>bool</code></td>
884-
<td></td>
884+
<td><code>True</code></td>
885885
</tr>
886886
<tr>
887887
<td><code>cpu_threads</code></td>
@@ -1210,9 +1210,9 @@ for res in result:
12101210
</tr>
12111211
<tr>
12121212
<td><code>enable_mkldnn</code></td>
1213-
<td>是否启用 MKL-DNN 加速库。如果设置为<code>None</code>,将默认启用。</td>
1213+
<td>是否启用 MKL-DNN 加速库。
12141214
<td><code>bool</code></td>
1215-
<td><code>None</code></td>
1215+
<td><code>True</code></td>
12161216
</tr>
12171217
<tr>
12181218
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/PP-ChatOCRv4.en.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -870,10 +870,10 @@ Any float > <code>0</code></li>
870870
</tr>
871871
<tr>
872872
<td><code>enable_mkldnn</code></td>
873-
<td>Whether to enable the MKL-DNN acceleration library. If not set, it will be enabled by default.
873+
<td>Whether to enable the MKL-DNN acceleration library.
874874
</td>
875875
<td><code>bool</code></td>
876-
<td></td>
876+
<td><code>True</code></td>
877877
</tr>
878878
<tr>
879879
<td><code>cpu_threads</code></td>
@@ -1378,10 +1378,10 @@ The relevant parameter descriptions are as follows:
13781378
</tr>
13791379
<tr>
13801380
<td><code>enable_mkldnn</code></td>
1381-
<td>Whether to enable MKL-DNN acceleration library. If set to<code>None</code>, it will be enabled by default.
1381+
<td>Whether to enable MKL-DNN acceleration library.
13821382
</td>
13831383
<td><code>bool</code></td>
1384-
<td><code>None</code></td>
1384+
<td><code>True</code></td>
13851385
</tr>
13861386
<tr>
13871387
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/PP-ChatOCRv4.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,10 +1103,10 @@ paddleocr pp_chatocrv4_doc -i vehicle_certificate-1.png -k 驾驶室准乘人数
11031103
</tr>
11041104
<tr>
11051105
<td><code>enable_mkldnn</code></td>
1106-
<td>是否启用 MKL-DNN 加速库。如果不设置, 将默认启用。
1106+
<td>是否启用 MKL-DNN 加速库。
11071107
</td>
11081108
<td><code>bool</code></td>
1109-
<td></td>
1109+
<td><code>True</code></td>
11101110
</tr>
11111111
<tr>
11121112
<td><code>cpu_threads</code></td>
@@ -1610,10 +1610,10 @@ PP-ChatOCRv4 预测的流程、API说明、产出说明如下:
16101610
</tr>
16111611
<tr>
16121612
<td><code>enable_mkldnn</code></td>
1613-
<td>是否启用 MKL-DNN 加速库。如果设置为<code>None</code>,将默认启用。
1613+
<td>是否启用 MKL-DNN 加速库。
16141614
</td>
16151615
<td><code>bool</code></td>
1616-
<td><code>None</code></td>
1616+
<td><code>True</code></td>
16171617
</tr>
16181618
<tr>
16191619
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/PP-StructureV3.en.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,9 +1409,9 @@ any float > <code>0</code>. If not set, default is <code>0.6</code>.
14091409
</tr>
14101410
<tr>
14111411
<td><code>enable_mkldnn</code></td>
1412-
<td>Whether to enable MKL-DNN. If not set, disabled by default.</td>
1412+
<td>Whether to enable MKL-DNN.
14131413
<td><code>bool</code></td>
1414-
<td></td>
1414+
<td><code>True</code></td>
14151415
</tr>
14161416
<tr>
14171417
<td><code>cpu_threads</code></td>
@@ -2024,9 +2024,9 @@ The above Python script performs the following steps:
20242024
</tr>
20252025
<tr>
20262026
<td><code>enable_mkldnn</code></td>
2027-
<td>Whether to enable MKL-DNN acceleration. If set to <code>None</code>, MKL-DNN is disabled by default.</td>
2027+
<td>Whether to enable MKL-DNN acceleration.</td>
20282028
<td><code>bool</code></td>
2029-
<td><code>None</code></td>
2029+
<td><code>True</code></td>
20302030
</tr>
20312031
<tr>
20322032
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/PP-StructureV3.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,10 +1457,10 @@ paddleocr pp_structurev3 -i ./pp_structure_v3_demo.png --device gpu
14571457
</tr>
14581458
<tr>
14591459
<td><code>enable_mkldnn</code></td>
1460-
<td>是否启用 MKL-DNN 加速库。如果不设置, 将默认关闭。
1460+
<td>是否启用 MKL-DNN 加速库。
14611461
</td>
14621462
<td><code>bool</code></td>
1463-
<td></td>
1463+
<td><code>True</code></td>
14641464
</tr>
14651465
<tr>
14661466
<td><code>cpu_threads</code></td>
@@ -2063,10 +2063,10 @@ for item in markdown_images:
20632063
</tr>
20642064
<tr>
20652065
<td><code>enable_mkldnn</code></td>
2066-
<td>是否启用 MKL-DNN 加速库。如果设置为<code>None</code>, 将默认关闭。
2066+
<td>是否启用 MKL-DNN 加速库。
20672067
</td>
20682068
<td><code>bool</code></td>
2069-
<td><code>None</code></td>
2069+
<td><code>True</code></td>
20702070
</tr>
20712071
<tr>
20722072
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/doc_preprocessor.en.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ If not set, the pipeline initialized value for this parameter will be used. Duri
240240
</tr>
241241
<tr>
242242
<td><code>enable_mkldnn</code></td>
243-
<td>Whether to enable the MKL-DNN acceleration library. If not set, it will be enabled by default.</td>
243+
<td>Whether to enable the MKL-DNN acceleration library.</td>
244244
<td><code>bool</code></td>
245-
<td></td>
245+
<td><code>True</code></td>
246246
</tr>
247247
<tr>
248248
<td><code>cpu_threads</code></td>
@@ -381,9 +381,9 @@ In the above Python script, the following steps are executed:
381381
</tr>
382382
<tr>
383383
<td><code>enable_mkldnn</code></td>
384-
<td>Whether to enable the MKL-DNN acceleration library. If set to <code>None</code>, it will be enabled by default.</td>
384+
<td>Whether to enable the MKL-DNN acceleration library.</td>
385385
<td><code>bool</code></td>
386-
<td><code>None</code></td>
386+
<td><code>True</code></td>
387387
</tr>
388388
<tr>
389389
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/doc_preprocessor.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ paddleocr doc_preprocessor -i ./doc_test_rotated.jpg --device gpu
243243
</tr>
244244
<tr>
245245
<td><code>enable_mkldnn</code></td>
246-
<td>是否启用 MKL-DNN 加速库。如果不设置,将默认启用。
246+
<td>是否启用 MKL-DNN 加速库。
247247
</td>
248248
<td><code>bool</code></td>
249-
<td></td>
249+
<td><code>True</code></td>
250250
</tr>
251251
<tr>
252252
<td><code>cpu_threads</code></td>
@@ -388,10 +388,10 @@ for res in output:
388388
</tr>
389389
<tr>
390390
<td><code>enable_mkldnn</code></td>
391-
<td>是否启用 MKL-DNN 加速库。如果设置为<code>None</code>,将默认启用。
391+
<td>是否启用 MKL-DNN 加速库。
392392
</td>
393393
<td><code>bool</code></td>
394-
<td><code>None</code></td>
394+
<td><code>True</code></td>
395395
</tr>
396396
<tr>
397397
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/doc_understanding.en.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ paddleocr doc_understanding -i "{'image': 'https://paddle-model-ecology.bj.bcebo
149149
</tr>
150150
<tr>
151151
<td><code>enable_mkldnn</code></td>
152-
<td>Whether to enable the MKL-DNN acceleration library. If not set, it will be enabled by default.</td>
152+
<td>Whether to enable the MKL-DNN acceleration library.</td>
153153
<td><code>bool</code></td>
154-
<td></td>
154+
<td><code>True</code></td>
155155
</tr>
156156
<tr>
157157
<td><code>cpu_threads</code></td>
@@ -269,9 +269,9 @@ In the above Python script, the following steps are performed:
269269
</tr>
270270
<tr>
271271
<td><code>enable_mkldnn</code></td>
272-
<td>Whether to enable the MKL-DNN acceleration library. If set to <code>None</code>, it will be enabled by default.</td>
272+
<td>Whether to enable the MKL-DNN acceleration library.</td>
273273
<td><code>bool</code></td>
274-
<td><code>None</code></td>
274+
<td><code>True</code></td>
275275
</tr>
276276
<tr>
277277
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/doc_understanding.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ paddleocr doc_understanding -i "{'image': 'https://paddle-model-ecology.bj.bcebo
146146
</tr>
147147
<tr>
148148
<td><code>enable_mkldnn</code></td>
149-
<td>是否启用 MKL-DNN 加速库。如果不设置,将默认关闭。
149+
<td>是否启用 MKL-DNN 加速库。
150150
</td>
151151
<td><code>bool</code></td>
152-
<td></td>
152+
<td><code>True</code></td>
153153
</tr>
154154
<tr>
155155
<td><code>cpu_threads</code></td>
@@ -267,10 +267,10 @@ for res in output:
267267
</tr>
268268
<tr>
269269
<td><code>enable_mkldnn</code></td>
270-
<td>是否启用 MKL-DNN 加速库。如果设置为<code>None</code>,将默认关闭。
270+
<td>是否启用 MKL-DNN 加速库。
271271
</td>
272272
<td><code>bool</code></td>
273-
<td><code>None</code></td>
273+
<td><code>True</code></td>
274274
</tr>
275275
<tr>
276276
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/formula_recognition.en.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,10 +607,10 @@ The name of the formula recognition model. If not set, the default model from th
607607
</tr>
608608
<tr>
609609
<td><code>enable_mkldnn</code></td>
610-
<td>Whether to enable the MKL-DNN acceleration library. If not set, it will be disabled by default.
610+
<td>Whether to enable the MKL-DNN acceleration library.
611611
</td>
612612
<td><code>bool</code></td>
613-
<td></td>
613+
<td><code>True</code></td>
614614
</tr>
615615
<tr>
616616
<td><code>cpu_threads</code></td>
@@ -859,10 +859,10 @@ In the above Python script, the following steps are executed:
859859
</tr>
860860
<tr>
861861
<td><code>enable_mkldnn</code></td>
862-
<td>Whether to enable the MKL-DNN acceleration library. If set to <code>None</code>, it will be disabled by default.
862+
<td>Whether to enable the MKL-DNN acceleration library.
863863
</td>
864864
<td><code>bool</code></td>
865-
<td><code>None</code></td>
865+
<td><code>True</code></td>
866866
</tr>
867867
<tr>
868868
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/formula_recognition.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -594,10 +594,10 @@ paddleocr formula_recognition_pipeline -i ./general_formula_recognition_001.png
594594
</tr>
595595
<tr>
596596
<td><code>enable_mkldnn</code></td>
597-
<td>是否启用 MKL-DNN 加速库。如果不设置,将默认启用。
597+
<td>是否启用 MKL-DNN 加速库。
598598
</td>
599599
<td><code>bool</code></td>
600-
<td></td>
600+
<td><code>True</code></td>
601601
</tr>
602602
<tr>
603603
<td><code>cpu_threads</code></td>
@@ -843,10 +843,10 @@ for res in output:
843843
</tr>
844844
<tr>
845845
<td><code>enable_mkldnn</code></td>
846-
<td>是否启用 MKL-DNN 加速库。如果设置为<code>None</code>,将默认启用。
846+
<td>是否启用 MKL-DNN 加速库。
847847
</td>
848848
<td><code>bool</code></td>
849-
<td><code>None</code></td>
849+
<td><code>True</code></td>
850850
</tr>
851851
<tr>
852852
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/seal_recognition.en.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,9 @@ Any float > <code>0</code>. If not set, default is <code>0.0</code> (no threshol
343343
</tr>
344344
<tr>
345345
<td><code>enable_mkldnn</code></td>
346-
<td>Whether to enable the MKL-DNN acceleration library. If not set, it will be enabled by default.</td>
346+
<td>Whether to enable the MKL-DNN acceleration library.</td>
347347
<td><code>bool</code></td>
348-
<td></td>
348+
<td><code>True</code></td>
349349
</tr>
350350
<tr>
351351
<td><code>cpu_threads</code></td>
@@ -649,9 +649,9 @@ Descriptions of related methods and parameters are as follows:
649649
</tr>
650650
<tr>
651651
<td><code>enable_mkldnn</code></td>
652-
<td>Whether to enable MKL-DNN acceleration. If set to <code>None</code>, MKL-DNN is enabled by default.</td>
652+
<td>Whether to enable MKL-DNN acceleration.</td>
653653
<td><code>bool</code></td>
654-
<td><code>None</code></td>
654+
<td><code>True</code></td>
655655
</tr>
656656
<tr>
657657
<td><code>cpu_threads</code></td>

docs/version3.x/pipeline_usage/seal_recognition.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -902,10 +902,10 @@ paddleocr seal_recognition -i ./seal_text_det.png --device gpu
902902
</tr>
903903
<tr>
904904
<td><code>enable_mkldnn</code></td>
905-
<td>是否启用 MKL-DNN 加速库。如果不设置,将默认启用。
905+
<td>是否启用 MKL-DNN 加速库。
906906
</td>
907907
<td><code>bool</code></td>
908-
<td></td>
908+
<td><code>True</code></td>
909909
</tr>
910910
<tr>
911911
<td><code>cpu_threads</code></td>
@@ -1213,10 +1213,10 @@ for res in output:
12131213
</tr>
12141214
<tr>
12151215
<td><code>enable_mkldnn</code></td>
1216-
<td>是否启用 MKL-DNN 加速库。如果设置为<code>None</code>,将默认启用。
1216+
<td>是否启用 MKL-DNN 加速库。
12171217
</td>
12181218
<td><code>bool</code></td>
1219-
<td><code>None</code></td>
1219+
<td><code>True</code></td>
12201220
</tr>
12211221
<tr>
12221222
<td><code>cpu_threads</code></td>

0 commit comments

Comments
 (0)