Skip to content

Commit c42cd63

Browse files
fix en doc (#3378)
* fix en doc * fix table in formula doc
1 parent 1fafb34 commit c42cd63

File tree

11 files changed

+342
-251
lines changed

11 files changed

+342
-251
lines changed

docs/module_usage/tutorials/ocr_modules/formula_recognition.en.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,35 @@ The formula recognition module is a crucial component of OCR (Optical Character
1414
<tr>
1515
<th>Model</th><th>Model Download Link</th>
1616
<th>Avg-BLEU(%)</th>
17-
<th>GPU Inference Time (ms)</th>
17+
<th>GPU Inference Time (ms)<br/>[Normal Mode / High-Performance Mode]</th>
18+
<th>CPU Inference Time (ms)<br/>[Normal Mode / High-Performance Mode]</th>
1819
<th>Model Storage Size (M)</th>
1920
<th>Introduction</th>
2021
</tr>
2122
<td>UniMERNet</td><td><a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0rc0/UniMERNet_infer.tar">Inference Model</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/UniMERNet_pretrained.pdparams">Training Model</a></td>
2223
<td>86.13</td>
23-
<td>2266.96</td>
24+
<td>2266.96/-</td>
25+
<td>-/-</td>
2426
<td>1.4 G</td>
2527
<td>UniMERNet is a formula recognition model developed by Shanghai AI Lab. It uses Donut Swin as the encoder and MBartDecoder as the decoder. The model is trained on a dataset of one million samples, including simple formulas, complex formulas, scanned formulas, and handwritten formulas, significantly improving the recognition accuracy of real-world formulas.</td>
2628
<tr>
2729
<td>PP-FormulaNet-S</td><td><a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0rc0/PP-FormulaNet-S_infer.tar">Inference Model</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-FormulaNet-S_pretrained.pdparams">Training Model</a></td>
2830
<td>87.12</td>
29-
<td>202.25</td>
31+
<td>202.25/-</td>
32+
<td>-/-</td>
3033
<td>167.9 M</td>
3134
<td rowspan="2">PP-FormulaNet is an advanced formula recognition model developed by the Baidu PaddlePaddle Vision Team. The PP-FormulaNet-S version uses PP-HGNetV2-B4 as its backbone network. Through parallel masking and model distillation techniques, it significantly improves inference speed while maintaining high recognition accuracy, making it suitable for applications requiring fast inference. The PP-FormulaNet-L version, on the other hand, uses Vary_VIT_B as its backbone network and is trained on a large-scale formula dataset, showing significant improvements in recognizing complex formulas compared to PP-FormulaNet-S.</td>
3235
</tr>
3336
<td>PP-FormulaNet-L</td><td><a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0rc0/PP-FormulaNet-L_infer.tar">Inference Model</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-FormulaNet-L_pretrained.pdparams">Training Model</a></td>
3437
<td>92.13</td>
35-
<td>1976.52</td>
38+
<td>1976.52/-</td>
39+
<td>-/-</td>
3640
<td>535.2 M</td>
3741
<tr>
3842
<td>LaTeX_OCR_rec</td><td><a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0rc0/LaTeX_OCR_rec_infer.tar">Inference Model</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/LaTeX_OCR_rec_pretrained.pdparams">Training Model</a></td>
3943
<td>71.63</td>
40-
<td>-</td>
44+
<td>-/-</td>
45+
<td>-/-</td>
4146
<td>89.7 M</td>
4247
<td>LaTeX-OCR is a formula recognition algorithm based on an autoregressive large model. It uses Hybrid ViT as the backbone network and a transformer as the decoder, significantly improving the accuracy of formula recognition.</td>
4348
</tr>
@@ -126,6 +131,13 @@ The explanations for the methods, parameters, etc., are as follows:
126131
<td>None</td>
127132
<td>None</td>
128133
</tr>
134+
<tr>
135+
<td><code>use_hpip</code></td>
136+
<td>Whether to enable high-performance inference. </td>
137+
<td><code>bool</code></td>
138+
<td>None</td>
139+
<td><code>False</code></td>
140+
</tr>
129141
</table>
130142

131143
* The `model_name` must be specified. After specifying `model_name`, the default model parameters built into PaddleX are used. If `model_dir` is specified, the user-defined model is used.
@@ -455,7 +467,7 @@ Other related parameters can be set by modifying the `Global` and `Evaluate` fie
455467
<details><summary>👉 <b>More Details (Click to Expand)</b></summary>
456468
457469
<p>When evaluating the model, you need to specify the model weights file path. Each configuration file has a default weight save path built-in. If you need to change it, simply set it by appending a command line parameter, such as <code>-o Evaluate.weight_path=./output/best_accuracy/best_accuracy.pdparams</code>.</p>
458-
<p>After completing the model evaluation, an <code>evaluate_result.json</code> file will be produced, which records the evaluation results, specifically, whether the evaluation task was completed successfully and the model's evaluation metrics, including recall1、recall5、mAP</p></details>
470+
<p>After completing the model evaluation, an <code>evaluate_result.json</code> file will be produced, which records the evaluation results, specifically, whether the evaluation task was completed successfully and the model's evaluation metrics, including exp_rate</p></details>
459471
460472
461473
### <b>4.4 Model Inference and Integration</b>
@@ -483,4 +495,4 @@ Other related parameters can be set by modifying the `Global` and `Predict` fiel
483495
484496
The weights you produce can be directly integrated into the formula recognition module. Refer to the Python example code in [Quick Integration](#iii-quick-integration), and simply replace the model with the path to your trained model.
485497
486-
You can also use the PaddleX high-performance inference plugin to optimize the inference process of your model and further improve efficiency. For detailed procedures, please refer to the [PaddleX High-Performance Inference Guide](../../../pipeline_deploy/high_performance_inference.en.md).
498+
You can also use the PaddleX high-performance inference plugin to optimize the inference process of your model and further improve efficiency. For detailed procedures, please refer to the [PaddleX High-Performance Inference Guide](../../../pipeline_deploy/high_performance_inference.en.md).

docs/module_usage/tutorials/ocr_modules/formula_recognition.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,36 @@ comments: true
1313
<tr>
1414
<th>模型</th><th>模型下载链接</th>
1515
<th>Avg-BLEU(%)</th>
16-
<th>GPU推理耗时 (ms)</th>
16+
<th>GPU推理耗时(ms)<br/>[常规模式 / 高性能模式]</th>
17+
<th>CPU推理耗时(ms)<br/>[常规模式 / 高性能模式]</th>
1718
<th>模型存储大小 (M)</th>
1819
<th>介绍</th>
1920
</tr>
2021
<td>UniMERNet</td><td><a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0rc0/UniMERNet_infer.tar">推理模型</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/UniMERNet_pretrained.pdparams">训练模型</a></td>
2122
<td>86.13</td>
22-
<td>2266.96</td>
23+
<td>2266.96/-</td>
24+
<td>-/-</td>
2325
<td>1.4 G</td>
2426
<td>UniMERNet是由上海AI Lab研发的一款公式识别模型。该模型采用Donut Swin作为编码器,MBartDecoder作为解码器,并通过在包含简单公式、复杂公式、扫描捕捉公式和手写公式在内的一百万数据集上进行训练,大幅提升了模型对真实场景公式的识别准确率</td>
2527
<tr>
2628
<td>PP-FormulaNet-S</td><td><a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0rc0/PP-FormulaNet-S_infer.tar">推理模型</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-FormulaNet-S_pretrained.pdparams">训练模型</a></td>
2729
<td>87.12</td>
28-
<td>202.25</td>
30+
<td>202.25/-</td>
31+
<td>-/-</td>
2932
<td>167.9 M</td>
3033
<td rowspan="2">PP-FormulaNet 是由百度飞桨视觉团队开发的一款先进的公式识别模型,支持5万个常见LateX源码词汇的识别。PP-FormulaNet-S 版本采用了 PP-HGNetV2-B4 作为其骨干网络,通过并行掩码和模型蒸馏等技术,大幅提升了模型的推理速度,同时保持了较高的识别精度,适用于简单印刷公式、跨行简单印刷公式等场景。而 PP-FormulaNet-L 版本则基于 Vary_VIT_B 作为骨干网络,并在大规模公式数据集上进行了深入训练,在复杂公式的识别方面,相较于PP-FormulaNet-S表现出显著的提升,适用于简单印刷公式、复杂印刷公式、手写公式等场景。 </td>
3134

3235
</tr>
3336
<td>PP-FormulaNet-L</td><td><a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0rc0/PP-FormulaNet-L_infer.tar">推理模型</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-FormulaNet-L_pretrained.pdparams">训练模型</a></td>
3437
<td>92.13</td>
35-
<td>1976.52</td>
38+
<td>1976.52/-</td>
39+
<td>-/-</td>
3640
<td>535.2 M</td>
3741
<tr>
3842
<td>LaTeX_OCR_rec</td><td><a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0rc0/LaTeX_OCR_rec_infer.tar">推理模型</a>/<a href="https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/LaTeX_OCR_rec_pretrained.pdparams">训练模型</a></td>
3943
<td>71.63</td>
40-
<td>-</td>
44+
<td>-/-</td>
45+
<td>-/-</td>
4146
<td>89.7 M</td>
4247
<td>LaTeX-OCR是一种基于自回归大模型的公式识别算法,通过采用 Hybrid ViT 作为骨干网络,transformer作为解码器,显著提升了公式识别的准确性。</td>
4348
</tr>

0 commit comments

Comments
 (0)