Skip to content

Commit 96e9ce7

Browse files
committed
Merge branch 'main' into feat/iluvatar-docker
2 parents fe87210 + 437943f commit 96e9ce7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+7000
-3685
lines changed

deploy/hubserving/ocr_system/params.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ def read_params():
6161
cfg.cls_batch_num = 30
6262
cfg.cls_thresh = 0.9
6363

64+
# Model download URLs using HTTPS for secure transmission
65+
cfg.det_model_url = "https://paddle-ocr-models.bj.bcebos.com/dygraph_v2.0/ch/ch_pp-ocrv2_det_infer.tar"
66+
cfg.rec_model_url = "https://paddle-ocr-models.bj.bcebos.com/dygraph_v2.0/ch/ch_pp-ocrv2_rec_infer.tar"
67+
cfg.cls_model_url = "https://paddle-ocr-models.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar"
68+
6469
cfg.use_pdserving = False
6570
cfg.use_tensorrt = False
6671
cfg.drop_score = 0.5

docs/community/community_contribution.md

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,55 +17,28 @@ PaddleOCR希望可以通过AI的力量助力任何一位有梦想的开发者实
1717

1818
## 1. 社区贡献
1919

20-
### 1.1 基于PaddleOCR的社区项目
21-
22-
| 类别 | 项目 | 描述 | 开发者 |
23-
| -------- | ------ | ------ | --------- |
24-
| 通用工具 | [FastOCRLabel](https://gitee.com/BaoJianQiang/FastOCRLabel) | 完整的C#版本标注GUI | [包建强](https://gitee.com/BaoJianQiang) |
25-
| 通用工具 | [DangoOCR离线版](https://github.com/PantsuDango/DangoOCR) | 通用型桌面级即时翻译GUI | [PantsuDango](https://github.com/PantsuDango) |
26-
| 通用工具 | [scr2txt](https://github.com/lstwzd/scr2txt) | 截屏转文字GUI | [lstwzd](https://github.com/lstwzd) |
27-
| 通用工具 | [ocr_sdk](https://github.com/mymagicpower/AIAS/tree/d4b328f85c21df6c47b06da797490ecae830b49a/1_sdks/1_image_sdks/ocr_sdks) | OCR java SDK工具箱 | [Calvin](https://github.com/mymagicpower) |
28-
| 通用工具 | [Lmdb Dataset Format Conversion Tool](https://github.com/OneYearIsEnough/PaddleOCR-Recog-LmdbDataset-Conversion) | 文本识别任务中lmdb数据格式转换工具 | [OneYearIsEnough](https://github.com/OneYearIsEnough) |
29-
| 通用工具 | [用paddleocr打造一款“盗幕笔记”](https://github.com/kjf4096/paddleocr_dmbj) | 用PaddleOCR记笔记 | [kjf4096](https://github.com/kjf4096) |
30-
| 垂类工具 | [AI Studio项目](https://aistudio.baidu.com/aistudio/projectdetail/1054614?channelType=0&channel=0) | 英文视频自动生成字幕 | [叶月水狐](https://aistudio.baidu.com/aistudio/personalcenter/thirdview/322052) |
31-
| 垂类工具 | [id_card_ocr](https://github.com/baseli/id_card_ocr) | 身份证复印件识别 | [baseli](https://github.com/baseli) |
32-
| 垂类工具 | [Paddle_Table_Image_Reader](https://github.com/thunder95/Paddle_Table_Image_Reader) | 能看懂表格图片的数据助手 | [thunder95](https://github.com/thunder95) |
33-
| 垂类工具 | [AI Studio项目](https://aistudio.baidu.com/aistudio/projectdetail/3382897) | OCR流程中对手写体进行过滤 | [daassh](https://github.com/daassh) |
34-
| 垂类场景调优 | [AI Studio项目](https://aistudio.baidu.com/aistudio/projectdetail/2803693) | 电表读数和编号识别 | [深渊上的坑](https://github.com/edencfc) |
35-
| 垂类场景调优 | [AI Studio项目](https://aistudio.baidu.com/aistudio/projectdetail/3284199) | LCD液晶字符检测 | [Dream拒杰](https://github.com/zhangyingying520) |
36-
| 前后处理 | [paddleOCRCorrectOutputs](https://github.com/yuranusduke/paddleOCRCorrectOutputs) | 获取OCR识别结果的key-value | [yuranusduke](https://github.com/yuranusduke) |
37-
|前处理| [optlab](https://github.com/GreatV/optlab) |OCR前处理工具箱,基于Qt和Leptonica。|[GreatV](https://github.com/GreatV)|
38-
|应用部署| [PaddleOCRSharp](https://github.com/raoyutian/PaddleOCRSharp) |PaddleOCR的.NET封装与应用部署。|[raoyutian](https://github.com/raoyutian/PaddleOCRSharp)|
39-
|应用部署| [PaddleSharp](https://github.com/sdcb/PaddleSharp) |PaddleOCR的.NET封装与应用部署,支持跨平台、GPU|[sdcb](https://github.com/sdcb)|
40-
| 应用部署 | [PaddleOCR-Streamlit-Demo](https://github.com/Lovely-Pig/PaddleOCR-Streamlit-Demo) | 使用Streamlit部署PaddleOCR | [Lovely-Pig](https://github.com/Lovely-Pig) |
41-
| 应用部署 | [PaddleOCR-PyWebIO-Demo](https://github.com/Lovely-Pig/PaddleOCR-PyWebIO-Demo) | 使用PyWebIO部署PaddleOCR | [Lovely-Pig](https://github.com/Lovely-Pig) |
42-
| 应用部署 | [PaddleOCR-Paddlejs-Vue-Demo](https://github.com/Lovely-Pig/PaddleOCR-Paddlejs-Vue-Demo) | 使用Paddle.js和Vue部署PaddleOCR | [Lovely-Pig](https://github.com/Lovely-Pig) |
43-
| 应用部署 | [PaddleOCR-Paddlejs-React-Demo](https://github.com/Lovely-Pig/PaddleOCR-Paddlejs-React-Demo) | 使用Paddle.js和React部署PaddleOCR | [Lovely-Pig](https://github.com/Lovely-Pig) |
44-
| 学术前沿模型训练与推理 | [AI Studio项目](https://aistudio.baidu.com/aistudio/projectdetail/3397137) | StarNet-MobileNetV3算法–中文训练 | [xiaoyangyang2](https://github.com/xiaoyangyang2) |
45-
| 学术前沿模型训练与推理 | [ABINet-paddle](https://github.com/Huntersdeng/abinet-paddle) | ABINet算法前向运算的paddle实现以及模型各部分的实现细节分析 | [Huntersdeng](https://github.com/Huntersdeng) |
46-
47-
### 1.2 为PaddleOCR新增功能
20+
### 1.1 为PaddleOCR新增功能
4821

4922
- 非常感谢 [authorfu](https://github.com/authorfu) 贡献Android([#340](https://github.com/PaddlePaddle/PaddleOCR/pull/340))和[xxlyu-2046](https://github.com/xxlyu-2046) 贡献IOS的demo代码([#325](https://github.com/PaddlePaddle/PaddleOCR/pull/325))
5023
- 非常感谢 [tangmq](https://gitee.com/tangmq) 给PaddleOCR增加Docker化部署服务,支持快速发布可调用的Restful API服务([#507](https://github.com/PaddlePaddle/PaddleOCR/pull/507))。
5124
- 非常感谢 [lijinhan](https://github.com/lijinhan) 给PaddleOCR增加java SpringBoot 调用OCR Hubserving接口完成对OCR服务化部署的使用([#1027](https://github.com/PaddlePaddle/PaddleOCR/pull/1027))。
5225
- 非常感谢 [Evezerest](https://github.com/Evezerest)[ninetailskim](https://github.com/ninetailskim)[edencfc](https://github.com/edencfc)[BeyondYourself](https://github.com/BeyondYourself)[1084667371](https://github.com/1084667371) 贡献了[PPOCRLabel](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.3/PPOCRLabel/README_ch.md) 的完整代码。
5326
- 非常感谢 [bupt906](https://github.com/bupt906) 贡献MicroNet结构代码([#5251](https://github.com/PaddlePaddle/PaddleOCR/pull/5251))和贡献OneCycle学习率策略代码([#5252](https://github.com/PaddlePaddle/PaddleOCR/pull/5252))
5427

55-
### 1.3 代码修复
28+
### 1.2 代码修复
5629

5730
- 非常感谢 [zhangxin](https://github.com/ZhangXinNan)([Blog](https://blog.csdn.net/sdlypyzq)) 贡献新的可视化方式、添加.gitgnore、处理手动设置PYTHONPATH环境变量的问题([#210](https://github.com/PaddlePaddle/PaddleOCR/pull/210))。
5831
- 非常感谢 [lyl120117](https://github.com/lyl120117) 贡献打印网络结构的代码([#304](https://github.com/PaddlePaddle/PaddleOCR/pull/304))。
5932
- 非常感谢 [BeyondYourself](https://github.com/BeyondYourself) 给PaddleOCR提了很多非常棒的建议,并简化了PaddleOCR的部分代码风格([so many commits)](https://github.com/PaddlePaddle/PaddleOCR/commits?author=BeyondYourself)
6033

61-
### 1.4 文档优化与翻译
34+
### 1.3 文档优化与翻译
6235

6336
- 非常感谢 **[RangeKing](https://github.com/RangeKing)[HustBestCat](https://github.com/HustBestCat)[v3fc](https://github.com/v3fc)[1084667371](https://github.com/1084667371)** 贡献翻译《动手学OCR》notebook[电子书英文版](https://github.com/PaddleOCR-Community/Dive-into-OCR/tree/main/notebook_en)
6437
- 非常感谢 [thunderstudying](https://github.com/thunderstudying)[RangeKing](https://github.com/RangeKing)[livingbody](https://github.com/livingbody)[WZMIAOMIAO](https://github.com/WZMIAOMIAO)[haigang1975](https://github.com/haigang1975) 补充多个英文markdown文档。
6538
- 非常感谢 **[fanruinet](https://github.com/fanruinet)** 润色和修复35篇英文文档([#5205](https://github.com/PaddlePaddle/PaddleOCR/pull/5205))。
6639
- 非常感谢 [Khanh Tran](https://github.com/xxxpsyduck)[Karl Horky](https://github.com/karlhorky) 贡献修改英文文档。
6740

68-
### 1.5 多语言语料
41+
### 1.4 多语言语料
6942

7043
- 非常感谢 [xiangyubo](https://github.com/xiangyubo) 贡献手写中文OCR数据集([#321](https://github.com/PaddlePaddle/PaddleOCR/pull/321))。
7144
- 非常感谢 [Mejans](https://github.com/Mejans) 给PaddleOCR增加新语言奥克西坦语Occitan的字典和语料([#954](https://github.com/PaddlePaddle/PaddleOCR/pull/954))。

docs/version3.x/module_usage/chart_parsing.en.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ The output result will be:
6565
```
6666
6767
Explanation of output parameters:
68-
69-
* `image`: The path to the input image
70-
* `result`: The model's prediction output
68+
<ul>
69+
<li><code>image</code>: The path to the input image</li>
70+
<li><code>result</code>: The model's prediction output</li>
71+
</ul>
7172
7273
The visualized result is:
7374
@@ -83,7 +84,7 @@ Year | Avg Revenue per 5-star Hotel (Million CNY) | Avg Profit per 5-star Hotel
8384
8485
Detailed explanation of related methods and parameters:
8586
86-
* Instantiate a vision-language model with `ChartParsing`. Parameters:
87+
* Instantiate a vision-language model with <code>ChartParsing</code>. Parameters:
8788
8889
<table>
8990
<thead>
@@ -97,19 +98,22 @@ Detailed explanation of related methods and parameters:
9798
<tbody>
9899
<tr>
99100
<td><code>model_name</code></td>
100-
<td>Model name. If set to <code>None</code>, defaults to <code>PP-Chart2Table</code>.</td>
101+
<td><b>Meaning:</b> Model name.<br/>
102+
<b>Description:</b>
103+
If set to <code>None</code>, defaults to <code>PP-Chart2Table</code>.</td>
101104
<td><code>str | None</code></td>
102105
<td><code>None</code></td>
103106
</tr>
104107
<tr>
105108
<td><code>model_dir</code></td>
106-
<td>Model storage path.</td>
109+
<td><b>Meaning</b>Model storage path.</td>
107110
<td><code>str | None</code></td>
108111
<td><code>None</code></td>
109112
</tr>
110113
<tr>
111114
<td><code>device</code></td>
112-
<td>Inference device.<br/>
115+
<td><b>Meaning:</b> Inference device.<br/>
116+
<b>Description:</b>
113117
<b>Examples:</b> <code>"cpu"</code>, <code>"gpu"</code>, <code>"npu"</code>, <code>"gpu:0"</code><br/>
114118
Defaults to GPU 0 if available; otherwise falls back to CPU.
115119
</td>
@@ -119,9 +123,9 @@ Defaults to GPU 0 if available; otherwise falls back to CPU.
119123
</tbody>
120124
</table>
121125
122-
* Use the model's `predict()` method for inference. This returns a list of results. The module also offers a `predict_iter()` method, which behaves identically in terms of inputs and outputs but returns a generator—ideal for large datasets or memory-sensitive scenarios. Choose based on your needs.
126+
* Use the model's <code>predict()</code> method for inference. This returns a list of results. The module also offers a <code>predict_iter()</code> method, which behaves identically in terms of inputs and outputs but returns a generator—ideal for large datasets or memory-sensitive scenarios. Choose based on your needs.
123127
124-
`predict()` method parameters:
128+
<code>predict()</code> method parameters:
125129
126130
<table>
127131
<thead>
@@ -134,21 +138,27 @@ Defaults to GPU 0 if available; otherwise falls back to CPU.
134138
</thead>
135139
<tr>
136140
<td><code>input</code></td>
137-
<td>Input data (required). Input formats vary by model.<br/>
138-
For PP-Chart2Table: <code>{'image': image_path}</code>
141+
<td><b>Meaning:</b> Input data (required). <br/>
142+
<b>Description:</b>
143+
Input formats vary by model.<br/>
144+
<ul>
145+
<li>For PP-Chart2Table: <code>{'image': image_path}</code></li>
146+
</ul>
139147
</td>
140148
<td><code>dict</code></td>
141149
<td>N/A</td>
142150
</tr>
143151
<tr>
144152
<td><code>batch_size</code></td>
145-
<td>Batch size. Any positive integer.</td>
153+
<td><b>Meaning:</b> Batch size. <br/>
154+
<b>Description:</b>
155+
Any positive integer.</td>
146156
<td><code>int</code></td>
147157
<td>1</td>
148158
</tr>
149159
</table>
150160
151-
* Prediction results are returned as `Result` objects for each sample, with support for printing and saving to JSON:
161+
* Prediction results are returned as <code>Result</code> objects for each sample, with support for printing and saving to JSON:
152162
153163
<table>
154164
<thead>
@@ -192,13 +202,13 @@ For PP-Chart2Table: <code>{'image': image_path}</code>
192202
<tr>
193203
<td><code>indent</code></td>
194204
<td><code>int</code></td>
195-
<td>Same as in `print()`</td>
205+
<td>Same as in <code>print()</code></td>
196206
<td>4</td>
197207
</tr>
198208
<tr>
199209
<td><code>ensure_ascii</code></td>
200210
<td><code>bool</code></td>
201-
<td>Same as in `print()`</td>
211+
<td>Same as in <code>print()</code></td>
202212
<td><code>False</code></td>
203213
</tr>
204214
</table>

docs/version3.x/module_usage/chart_parsing.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ for res in results:
6565
```
6666

6767
运行结果参数含义如下:
68-
69-
- `image`: 表示输入待预测图像的路径
70-
- `result`: 模型预测的结果信息
71-
68+
<ul>
69+
<li><code>image</code>: 表示输入待预测图像的路径</li>
70+
<li><code>result</code>: 模型预测的结果信息</li>
71+
</ul>
7272
预测结果打印可视化如下:
7373

7474
```bash
@@ -83,7 +83,7 @@ for res in results:
8383

8484
相关方法、参数等说明如下:
8585

86-
* `ChartParsing`实例化文档类视觉语言模型,具体说明如下:
86+
* <code>ChartParsing</code>实例化文档类视觉语言模型,具体说明如下:
8787
<table>
8888
<thead>
8989
<tr>
@@ -96,19 +96,22 @@ for res in results:
9696
<tbody>
9797
<tr>
9898
<td><code>model_name</code></td>
99-
<td>>模型名称。如果设置为<code>None</code>,则使用<code>PP-Chart2Table</code>。</td>
99+
<td><b>含义:</b>模型名称。<br/>
100+
<b>说明:</b>
101+
如果设置为<code>None</code>,则使用<code>PP-Chart2Table</code>。</td>
100102
<td><code>str|None</code></td>
101103
<td><code>None</code></td>
102104
</tr>
103105
<tr>
104106
<td><code>model_dir</code></td>
105-
<td>模型存储路径。</td>
107+
<td><b>含义:</b>模型存储路径。</td>
106108
<td><code>str|None</code></td>
107109
<td><code>None</code></td>
108110
</tr>
109111
<tr>
110112
<td><code>device</code></td>
111-
<td>用于推理的设备。<br/>
113+
<td><b>含义:</b>用于推理的设备。<br/>
114+
<b>说明:</b>
112115
<b>例如:</b><code>"cpu"</code>、<code>"gpu"</code>、<code>"npu"</code>、<code>"gpu:0"</code></code>。
113116
默认情况下,优先使用 GPU 0;若不可用则使用 CPU。
114117
</td>
@@ -118,7 +121,7 @@ for res in results:
118121
</tbody>
119122
</table>
120123

121-
* 调用图表解析模型的 `predict()` 方法进行推理预测,该方法会返回一个结果列表。另外,本模块还提供了 `predict_iter()` 方法。两者在参数接受和结果返回方面是完全一致的,区别在于 `predict_iter()` 返回的是一个 `generator`,能够逐步处理和获取预测结果,适合处理大型数据集或希望节省内存的场景。可以根据实际需求选择使用这两种方法中的任意一种。`predict()` 方法参数有 `input``batch_size`,具体说明如下:
124+
* 调用图表解析模型的 <code>predict()</code> 方法进行推理预测,该方法会返回一个结果列表。另外,本模块还提供了 <code>predict_iter()</code> 方法。两者在参数接受和结果返回方面是完全一致的,区别在于 <code>predict_iter()</code> 返回的是一个 <code>generator</code>,能够逐步处理和获取预测结果,适合处理大型数据集或希望节省内存的场景。可以根据实际需求选择使用这两种方法中的任意一种。<code>predict()</code> 方法参数有 <code>input</code><code>batch_size</code>,具体说明如下:
122125

123126
<table>
124127
<thead>
@@ -131,21 +134,27 @@ for res in results:
131134
</thead>
132135
<tr>
133136
<td><code>input</code></td>
134-
<td>待预测数据,必填。由于多模态模型对输入要求不同,请根据具体模型设定输入格式。<br/>
137+
<td><b>含义:</b>待预测数据,必填。<br/>
138+
<b>说明:</b>
139+
由于多模态模型对输入要求不同,请根据具体模型设定输入格式。<br/>
140+
<ul>
135141
<li>PP-Chart2Table的输入形式为<code>{'image': image_path}</code></li>
142+
</ul>
136143
</td>
137144
<td><code>dict</code></td>
138145
<td>无</td>
139146
</tr>
140147
<tr>
141148
<td><code>batch_size</code></td>
142-
<td>批大小,可设置为任意正整数。</td>
149+
<td><b>含义:</b>批大小<br/>
150+
<b>说明:</b>
151+
可设置为任意正整数。</td>
143152
<td><code>int</code></td>
144153
<td>1</td>
145154
</tr>
146155
</table>
147156

148-
* 对预测结果进行处理,每个样本的预测结果均为对应的Result对象,且支持打印、保存为`json`文件的操作:
157+
* 对预测结果进行处理,每个样本的预测结果均为对应的Result对象,且支持打印、保存为<code>json</code>文件的操作:
149158

150159
<table>
151160
<thead>

0 commit comments

Comments
 (0)