Skip to content

Commit ca0c887

Browse files
authored
Merge pull request #1774 from cuicheng01/develop
update docs
2 parents 6b89243 + 7e7d425 commit ca0c887

File tree

3 files changed

+70
-47
lines changed

3 files changed

+70
-47
lines changed

README.md

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22
<img src="https://github.com/PaddlePaddle/PaddleX/assets/45199522/63c6d059-234f-4a27-955e-ac89d81409ee" width="360" height ="55" alt="PaddleX" align="middle" />
33
</p>
44

5-
<p align= "center"> PaddleX -- 飞桨低代码开发工具,以低代码的形式支持开发者快速实现产业实际项目落地 </p>
6-
7-
<p align="left">
5+
<p align="center">
86
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-Apache%202-red.svg"></a>
97
<a href=""><img src="https://img.shields.io/badge/python-3.8%2C%203.9%2C%203.10-blue.svg"></a>
108
<a href=""><img src="https://img.shields.io/badge/os-linux%2C%20windows-orange.svg"></a>
119
<a href=""><img src="https://img.shields.io/badge/hardware-intel cpu%2C%20gpu%2C%20xpu%2C%20npu%2C%20mlu-yellow.svg"></a>
1210
</p>
1311

1412
## 简介
15-
PaddleX3.0beta 是飞桨精选模型的低代码开发工具,支持国内外多款主流硬件的模型训练和推理,覆盖工业、能源、金融、交通、教育等全行业,助力开发者产业实践落地。
13+
PaddleX 3.0 是飞桨精选模型的低代码开发工具,支持国内外多款主流硬件的模型训练和推理,覆盖工业、能源、金融、交通、教育等全行业,助力开发者产业实践落地。
1614

1715
| **通用图像分类** | **通用目标检测** | **通用语义分割** | **通用实例分割** |
1816
| :-------------------------------------------: | :-------------------------------------------: | :-------------------------------------------: | :-------------------------------------------: |
19-
|<img src="https://github.com/PaddlePaddle/PaddleX/assets/142379845/b302cd7e-e027-4ea6-86d0-8a4dd6d61f39" height="126px" width="180px">|<img src="https://github.com/PaddlePaddle/PaddleX/assets/142379845/a8b5df77-72e0-4bdb-afed-4594fe57bfdc" height="126px" width="180px">|<img src="https://github.com/PaddlePaddle/PaddleX/assets/142379845/02637f8c-f248-415b-89ab-1276505f198c" height="126px" width="180px">|<img src="https://github.com/PaddlePaddle/PaddleX/assets/142379845/0565d3c8-cdab-4735-809d-29ab9d3bf684" height="126px" width="180px">|
17+
|<img src="https://github.com/PaddlePaddle/PaddleX/assets/142379845/b302cd7e-e027-4ea6-86d0-8a4dd6d61f39" height="126px" width="180px">|<img src="https://github.com/PaddlePaddle/PaddleX/assets/142379845/099e2b00-0bbe-4b20-9c5a-96b69e473bd2" height="126px" width="180px">|<img src="https://github.com/PaddlePaddle/PaddleX/assets/142379845/02637f8c-f248-415b-89ab-1276505f198c" height="126px" width="180px">|<img src="https://github.com/PaddlePaddle/PaddleX/assets/142379845/09f683b4-27df-4c24-b8a7-84da20fdd182" height="126px" width="180px">|
2018
| **通用OCR** | **通用表格识别** | **通用场景信息抽取** | **文档场景信息抽取** |
2119
|<img src="https://github.com/PaddlePaddle/PaddleX/assets/142379845/1ef48536-48d4-484b-a6fb-0d6631ba2386" height="126px" width="180px">|<img src="https://github.com/PaddlePaddle/PaddleX/assets/142379845/1e798e05-dee7-4b41-9cc4-6708b6014efa" height="126px" width="180px">|<img src="https://github.com/PaddlePaddle/PaddleX/assets/142379845/04218629-4a7b-48ea-b815-977a05fbbb13" height="126px" width="180px">|<img src="https://github.com/PaddlePaddle/PaddleX/assets/142379845/e3d97f4e-ab46-411c-8155-494c61492b0a" height="126px" width="180px">|
2220
| **时序预测** | **时序异常检测** | **时序分类** | **多模型融合时序预测** |
@@ -27,19 +25,19 @@ PaddleX3.0beta 是飞桨精选模型的低代码开发工具,支持国内外
2725

2826
## 📣 近期更新
2927

30-
- 🔥 **2024.6.27,PaddleX3.0 beta 本地端正式发布,支持以低代码的方式在本地端使用多种主流硬件进行产线和模型开发。**
31-
- 🔥 **2024.3.25,PaddleX3.0 云端发布,支持在[星河社区](https://aistudio.baidu.com/pipeline/mine )以零代码的方式【创建产线】使用。**
28+
- 🔥 **2024.6.27,PaddleX 3.0 Beta 本地端正式发布,支持以低代码的方式在本地端使用多种主流硬件进行产线和模型开发。**
29+
- 🔥 **2024.3.25,PaddleX 3.0 云端发布,支持在[星河社区](https://aistudio.baidu.com/pipeline/mine )以零代码的方式【创建产线】使用。**
3230

3331
## 🌟 特性
3432

35-
PaddleX 3.0beta 集成了飞桨生态的优势能力,覆盖 7 大场景任务,构建了 16 条模型产线,提供低代码开发模式,助力开发者在多种主流硬件上实现模型全流程开发。
33+
PaddleX 3.0 集成了飞桨生态的优势能力,覆盖 7 大场景任务,构建了 16 条模型产线,提供低代码开发模式,助力开发者在多种主流硬件上实现模型全流程开发。
3634

37-
- **基础模型产线(模型丰富,场景全面):** 精选 68 个优质飞桨模型,涵盖图像分类、目标检测、图像分割、OCR、文本图像版面分析、时序预测等任务场景
35+
- **基础模型产线(模型丰富,场景全面):** 精选 68 个优质飞桨模型,涵盖图像分类、目标检测、图像分割、OCR、文本图像版面分析、文本图像信息抽取、时序分析任务场景
3836
- **特色模型产线(显著提升效率):** 提供大小模型结合、大模型半监督学习和多模型融合的高效解决方案。
39-
- **低代码开发模式(便捷开发与部署):** 提供零代码和低代码两种开发方式。
40-
- 零代码开发:用户通过图形界面(GUI)交互式提交后台训练任务,打通在线和离线部署,并支持以 API 形式调用在线服务。
41-
- 低代码开发:通过统一的 API 接口实现 16 条模型产线的全流程开发,同时支持用户自定义模型流程串联。
42-
- **多硬件本地支持(兼容性强):** 支持英伟达 GPU、昆仑芯、昇腾和寒武纪等多种硬件,纯离线使用。
37+
- **低门槛开发模式(便捷开发与部署):** 提供零代码和低代码两种开发方式。
38+
- **零代码开发:** 用户通过图形界面(GUI)交互式提交后台训练任务,打通在线和离线部署,并支持以 API 形式调用在线服务。
39+
- **低代码开发:** 通过统一的 API 接口实现 16 条模型产线的全流程开发,同时支持用户自定义模型流程串联。
40+
- **多硬件本地支持(兼容性强):** 支持英伟达 GPU、昆仑芯、昇腾芯和寒武纪芯等多种硬件,纯离线使用。
4341

4442
<div align="center">
4543
<img src="https://github.com/PaddlePaddle/PaddleX/assets/45199522/61c4738f-735e-4ceb-aa5f-1038d4506d1c">
@@ -51,7 +49,7 @@ PaddleX 3.0beta 集成了飞桨生态的优势能力,覆盖 7 大场景任务
5149
- [单模型开发工具](./docs/tutorials/models/model_inference_tools.md)
5250
- [模型产线开发工具](./docs/tutorials/pipelines/pipeline_inference_tools.md)
5351

54-
## 🛠️ PaddleX3.0 覆盖的模型和模型产线
52+
## 🛠️ PaddleX 3.0 覆盖的模型和模型产线
5553

5654
<table>
5755
<tr>
@@ -163,29 +161,29 @@ PaddleX 3.0beta 集成了飞桨生态的优势能力,覆盖 7 大场景任务
163161
<td>-</td>
164162
</tr>
165163
<tr>
166-
<td rowspan="2">时序预测</td>
167164
<td>时序预测</td>
168-
<td>DLinear<br/>NLinear<details>
169-
<summary><b>more</b></summary><br/>Nonstationary<br/>PatchTST<br/>RLinear<br/>TiDE<br/>TimesNet</details></td>
165+
<td>时序预测</td>
166+
<td>DLinear<br/>Nonstationary<br/>TiDE<br/>PatchTST<br/>TimesNet</td>
170167
</tr>
171168
<tr>
172-
<td>多模型融合的时序预测v2</td>
173-
<td>多模型融合的时序预测</td>
169+
<td>多模型融合时序预测v2</td>
170+
<td>时序预测</td>
171+
<td>多模型融合时序预测</td>
174172
</tr>
175173
<tr>
176-
<td rowspan="2">时序异常检测</td>
177174
<td>时序异常检测</td>
178-
<td>AutoEncoder_ad<br/>DLinear_ad<details>
179-
<summary><b>more</b></summary><br/>Nonstationary_ad<br/>PatchTST_ad<br/>TimesNet_ad</details></td>
175+
<td>时序异常检测</td>
176+
<td>DLinear_ad<br/>Nonstationary_ad<br/>AutoEncoder_ad<br/>PatchTST_ad<br/>TimesNet_ad</td>
180177
</tr>
181178
<tr>
182-
<td>多模型融合的时序异常检测v2</td>
183-
<td>多模型融合的时序异常检测</td>
179+
<td>多模型融合时序异常检测v2</td>
180+
<td>时序异常检测</td>
181+
<td>多模型融合时序异常检测</td>
184182
</tr>
185183
<tr>
186184
<td>时序分类</td>
187185
<td>时序分类</td>
188-
<td>TimesNet cls</td>
186+
<td>TimesNet_cls</td>
189187
</tr>
190188
</table>
191189

@@ -216,7 +214,7 @@ PaddleX 3.0beta 集成了飞桨生态的优势能力,覆盖 7 大场景任务
216214

217215

218216
### 二、模型产线开发工具 🔥
219-
本节将介绍 PaddleX3.0 模型产线的全流程开发流程,包括数据准备、模型训练/评估、模型推理的使用方法。PaddleX3.0 支持的模型产线可以参考 [PaddleX 模型产线列表](./docs/tutorials/pipelines/support_pipeline_list.md)
217+
本节将介绍 PaddleX 3.0 模型产线的全流程开发流程,包括数据准备、模型训练/评估、模型推理的使用方法。PaddleX 3.0 支持的模型产线可以参考 [PaddleX 模型产线列表](./docs/tutorials/pipelines/support_pipeline_list.md)
220218
- [产线快速体验](./docs/tutorials/pipelines/pipeline_inference_tools.md)
221219
- [产线模型选择](./docs/tutorials/pipelines/model_select.md)
222220
- [产线开发流程](./docs/tutorials/pipelines/pipeline_develop.md)

docs/tutorials/models/model_inference_tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ model_name = "PP-LCNet_x1_0"
1919

2020
# 实例化 PaddleInferenceOption 设置推理配置
2121
kernel_option = PaddleInferenceOption()
22-
kernel_option.set_device("gpu")
22+
kernel_option.set_device("gpu:0")
2323

2424
# 调用 create_model 函数实例化预测模型
2525
model = create_model(model_name=model_name, kernel_option=kernel_option)

docs/tutorials/pipelines/pipeline_inference_tools.md

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,31 @@
1515
您可以使用命令行将图片的类别分出来,命令行使用方式如下:
1616

1717
```bash
18-
paddlex --pipeline image_classification --model PP-LCNet_x1_0 --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg
18+
paddlex --pipeline image_classification --model PP-LCNet_x1_0 --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg --device gpu:0
1919
```
2020
参数解释:
2121
- `pipeline`: 产线名称,当前支持的产线名称有 `image_classification``object_detection``semantic_segmentation``instance_segmentation``OCR`
2222
- `model`: 模型名称,每个产线支持的模型名称不同,请参考 [PaddleX 模型库](../models/support_model_list.md)。对于多模型组合的产线,需要指定多个模型名称,以空格分隔。
2323
- `input`: 输入图片路径或 URL。
24-
24+
- `device`:训练设备,可选`cpu``gpu``xpu``npu``mlu`,除 cpu 外,可指定卡号,如:`gpu:0`
2525

2626
**Python API 使用方式**
2727

2828

2929
```python
30+
from pathlib import Path
3031
from paddlex import ClsPipeline
3132
from paddlex import PaddleInferenceOption
3233

34+
# 实例化 PaddleInferenceOption 设置推理配置
35+
kernel_option = PaddleInferenceOption()
36+
kernel_option.set_device("gpu:0")
37+
3338
model_name = "PP-LCNet_x1_0"
34-
pipeline = ClsPipeline(model_name, kernel_option=PaddleInferenceOption())
39+
output_base = Path("output")
40+
output = output_base / model_name
41+
42+
pipeline = ClsPipeline(model_name, output=output, kernel_option=kernel_option)
3543
result = pipeline.predict(
3644
{'input_path': "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg"}
3745
)
@@ -49,13 +57,14 @@ print(result["cls_result"])
4957
您可以使用命令行将图片中的目标检测出来,命令行使用方式如下:
5058

5159
```bash
52-
paddlex --pipeline object_detection --model RT-DETR-L --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_object_detection_002.png
60+
paddlex --pipeline object_detection --model RT-DETR-L --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_object_detection_002.png --device gpu:0
5361

5462
```
5563
参数解释:
5664
- `pipeline`: 产线名称,当前支持的产线名称有 `image_classification``object_detection``semantic_segmentation``instance_segmentation``OCR`
5765
- `model`: 模型名称,每个产线支持的模型名称不同,请参考 [PaddleX 模型库](../models/support_model_list.md)。对于多模型组合的产线,需要指定多个模型名称,以空格分隔。
5866
- `input`: 输入图片路径或 URL。
67+
- `device`:训练设备,可选`cpu``gpu``xpu``npu``mlu`,除 cpu 外,可指定卡号,如:`gpu:0`
5968

6069
**Python API 使用方式**
6170

@@ -64,15 +73,18 @@ from pathlib import Path
6473
from paddlex import DetPipeline
6574
from paddlex import PaddleInferenceOption
6675

76+
# 实例化 PaddleInferenceOption 设置推理配置
77+
kernel_option = PaddleInferenceOption()
78+
kernel_option.set_device("gpu:0")
79+
6780
model_name = "RT-DETR-L"
6881
output_base = Path("output")
69-
7082
output = output_base / model_name
71-
pipeline = DetPipeline(model_name, output=output, kernel_option=PaddleInferenceOption())
83+
84+
pipeline = DetPipeline(model_name, output=output, kernel_option=kernel_option)
7285
result = pipeline.predict(
7386
{"input_path": "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_object_detection_002.png"})
7487
print(result["boxes"])
75-
7688
```
7789

7890

@@ -86,13 +98,14 @@ print(result["boxes"])
8698
您可以使用命令行将图片的语义信息分割出来,命令行使用方式如下:
8799

88100
```bash
89-
paddlex --pipeline semantic_segmentation --model OCRNet_HRNet-W48 --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_semantic_segmentation_002.png
101+
paddlex --pipeline semantic_segmentation --model OCRNet_HRNet-W48 --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_semantic_segmentation_002.png --device gpu:0
90102

91103
```
92104
参数解释:
93105
- `pipeline`: 产线名称,当前支持的产线名称有 `image_classification``object_detection``semantic_segmentation``instance_segmentation``OCR`
94106
- `model`: 模型名称,每个产线支持的模型名称不同,请参考 [PaddleX 模型库](../models/support_model_list.md)。对于多模型组合的产线,需要指定多个模型名称,以空格分隔。
95107
- `input`: 输入图片路径或 URL。
108+
- `device`:训练设备,可选`cpu``gpu``xpu``npu``mlu`,除 cpu 外,可指定卡号,如:`gpu:0`
96109

97110
**Python API 使用方式**
98111

@@ -101,16 +114,19 @@ from pathlib import Path
101114
from paddlex import SegPipeline
102115
from paddlex import PaddleInferenceOption
103116

117+
# 实例化 PaddleInferenceOption 设置推理配置
118+
kernel_option = PaddleInferenceOption()
119+
kernel_option.set_device("gpu:0")
104120

105-
model_name = "OCRNet_HRNet-W48",
121+
model_name = "OCRNet_HRNet-W48"
106122
output_base = Path("output")
107123
output = output_base / model_name
108-
pipeline = SegPipeline(model_name, output=output, kernel_option=PaddleInferenceOption())
124+
125+
pipeline = SegPipeline(model_name, output=output, kernel_option=kernel_option)
109126
result = pipeline.predict(
110127
{"input_path": "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_semantic_segmentation_002.png"}
111128
)
112129
print(result["seg_map"])
113-
114130
```
115131

116132
### 2.4 通用实例分割产线
@@ -123,13 +139,14 @@ print(result["seg_map"])
123139
您可以使用命令行将图片中的实例分割出来,命令行使用方式如下:
124140

125141
```bash
126-
paddlex --pipeline instance_segmentation --model Mask-RT-DETR-L --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_instance_segmentation_004.png
142+
paddlex --pipeline instance_segmentation --model Mask-RT-DETR-L --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_instance_segmentation_004.png --device gpu:0
127143

128144
```
129145
参数解释:
130146
- `pipeline`: 产线名称,当前支持的产线名称有 `image_classification``object_detection``semantic_segmentation``instance_segmentation``OCR`
131147
- `model`: 模型名称,每个产线支持的模型名称不同,请参考 [PaddleX 模型库](../models/support_model_list.md)。对于多模型组合的产线,需要指定多个模型名称,以空格分隔。
132148
- `input`: 输入图片路径或 URL。
149+
- `device`:训练设备,可选`cpu``gpu``xpu``npu``mlu`,除 cpu 外,可指定卡号,如:`gpu:0`
133150

134151
**Python API 使用方式**
135152

@@ -138,15 +155,18 @@ from pathlib import Path
138155
from paddlex import InstanceSegPipeline
139156
from paddlex import PaddleInferenceOption
140157

158+
# 实例化 PaddleInferenceOption 设置推理配置
159+
kernel_option = PaddleInferenceOption()
160+
kernel_option.set_device("gpu:0")
161+
141162
model_name = "Mask-RT-DETR-L"
142163
output_base = Path("output")
143-
144164
output = output_base / model_name
145-
pipeline = InstanceSegPipeline(model_name, output=output, kernel_option=PaddleInferenceOption())
165+
166+
pipeline = InstanceSegPipeline(model_name, output=output, kernel_option=kernel_option)
146167
result = pipeline.predict(
147168
{"input_path": "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_instance_segmentation_004.png"})
148169
print(result["boxes"])
149-
150170
```
151171

152172
### 2.5 OCR 产线
@@ -158,27 +178,32 @@ OCR 产线内置了 PP-OCRv4 模型,包括文本检测和文本识别两个部
158178
您可以使用命令行将图片的文字识别出来,命令行使用方式如下:
159179

160180
```bash
161-
paddlex --pipeline OCR --model PP-OCRv4_mobile_det PP-OCRv4_mobile_rec --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png
181+
paddlex --pipeline OCR --model PP-OCRv4_mobile_det PP-OCRv4_mobile_rec --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png --device gpu:0
162182
```
163183
参数解释:
164184
- `pipeline`: 产线名称,当前支持的产线名称有 `image_classification``object_detection``semantic_segmentation``instance_segmentation``OCR`
165185
- `model`: 模型名称,每个产线支持的模型名称不同,请参考 [PaddleX 模型库](../models/support_model_list.md)。对于多模型组合的产线,需要指定多个模型名称,以空格分隔。
166186
- `input`: 输入图片路径或 URL。
167-
</details>
187+
- `device`:训练设备,可选`cpu``gpu``xpu``npu``mlu`,除 cpu 外,可指定卡号,如:`gpu:0`
188+
168189

169190
**Python API 使用方式**
170191

171192
```python
172193
import cv2
173194
from paddlex import OCRPipeline
174195
from paddlex import PaddleInferenceOption
175-
from paddlex.pipelines.PPOCR.utils import draw_ocr_box_txt
196+
from paddlex.pipelines.OCR.utils import draw_ocr_box_txt
197+
198+
# 实例化 PaddleInferenceOption 设置推理配置
199+
kernel_option = PaddleInferenceOption()
200+
kernel_option.set_device("gpu:0")
176201

177202
pipeline = OCRPipeline(
178203
'PP-OCRv4_mobile_det',
179204
'PP-OCRv4_mobile_rec',
180-
text_det_kernel_option=PaddleInferenceOption(),
181-
text_rec_kernel_option=PaddleInferenceOption(),)
205+
text_det_kernel_option=kernel_option,
206+
text_rec_kernel_option=kernel_option,)
182207
result = pipeline.predict(
183208
{"input_path": "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png"},
184209
)

0 commit comments

Comments
 (0)