🔍 简介
PaddleX 3.0 是基于飞桨框架构建的低代码开发工具,它集成了众多开箱即用的预训练模型,可以实现模型从训练到推理的全流程开发,支持国内外多款主流硬件,助力AI 开发者进行产业实践。
🌟 特性
🎨 模型丰富一键调用:将覆盖文本图像智能分析、OCR、目标检测、时序预测等多个关键领域的 200+ 飞桨模型整合为 20 条模型产线,通过极简的 Python API 一键调用,快速体验模型效果。同时支持 20+ 单功能模块,方便开发者进行模型组合使用。
🚀 提高效率降低门槛:实现基于统一命令和图形界面的模型全流程开发,打造大小模型结合、大模型半监督学习和多模型融合的8 条特色模型产线,大幅度降低迭代模型的成本。
🌐 多种场景灵活部署:支持高性能推理、服务化部署和端侧部署等多种部署方式,确保不同应用场景下模型的高效运行和快速响应。
🔧 主流硬件高效支持:支持英伟达 GPU、昆仑芯、昇腾和寒武纪等多种主流硬件的无缝切换,确保高效运行。
📣 近期更新
🔥🔥 2025.2.14,PaddleX v3.0.0rc0 重磅升级。 本次版本全面适配 PaddlePaddle 3.0rc0及以上版本,核心升级如下:
新增 12 条高价值产线,重磅推出自研 通用版面解析v3产线、PP-ChatOCRv4-doc产线、表格识别v2产线。此外新增了文档处理、旋转框检测、开放词汇检测/分割、视频分析、多语种语音识别、3D 等场景的产线。
扩充 48 个前沿模型,包括重磅推出的 OCR 领域的版面区域检测模型 PP-DocLayout、公式识别模型 PP-FormulaNet,表格结构识别模型 SLANeXt,文本识别模型 PP-OCRv4_server_rec_doc。CV 领域的 3D 检测、人体关键点、开放词汇检测/分割模型,以及语音识别领域的 Whisper 系列等模型。
优化和升级模型和产线的推理 API: 支持更多参数的配置,提升模型和产线推理的灵活性,详情。
多硬件支持扩展: 新增燧原 GCU 支持(90+模型),昇腾 NPU/昆仑芯 XPU/寒武纪 MLU/海光 DCU 模型数量显著提升。
全场景部署能力升级:
- 高性能推理支持一键安装、Windows 系统及 220+ 模型,核心库 ultra-infer 开源;
- 服务化部署新增高稳定性方案,支持动态配置优化。
系统兼容性增强: 适配 Windows 训练/推理,全面支持 Python 3.11/3.12。
🔥 2024.11.15,PaddleX 3.0 Beta2 开源版正式发布,全面适配 PaddlePaddle 3.0b2 版本。新增通用图像识别、人脸识别、车辆属性识别和行人属性识别产线,同时新增 42 个模型开发全流程适配昇腾 910B,并全面支持GitHub 站点文档。
🔥 2024.9.30,PaddleX 3.0 Beta1 开源版正式发布,提供 200+ 模型 通过极简的 Python API 一键调用;实现基于统一命令的模型全流程开发,并开源 PP-ChatOCRv3 特色模型产线基础能力;支持 100+ 模型高性能推理和服务化部署(持续迭代中),4条模型产线8个重点视觉模型端侧部署;100+ 模型开发全流程适配昇腾 910B,39+ 模型开发全流程适配昆仑芯和寒武纪。
🔥 2024.6.27,PaddleX 3.0 Beta 开源版正式发布,支持以低代码的方式在本地端使用多种主流硬件进行产线和模型开发。
🔥 2024.3.25,PaddleX 3.0 云端发布,支持在 AI Studio 星河社区 以零代码的方式【创建产线】使用。
## 🔠 模型产线说明
PaddleX 致力于实现产线级别的模型训练、推理与部署。模型产线是指一系列预定义好的、针对特定AI任务的开发流程,其中包含能够独立完成某类任务的单模型(单功能模块)组合。
## 📊 能力支持
PaddleX的各个产线均支持本地快速推理,部分模型支持在AI Studio星河社区上进行在线体验,您可以快速体验各个产线的预训练模型效果,如果您对产线的预训练模型效果满意,可以直接对产线进行高性能推理/服务化部署/端侧部署,如果不满意,您也可以使用产线的二次开发能力,提升效果。完整的产线开发流程请参考PaddleX产线使用概览或各产线使用教程。
此外,PaddleX在AI Studio星河社区为开发者提供了基于云端图形化开发界面的全流程开发工具, 点击【创建产线】,选择对应的任务场景和模型产线,就可以开启全流程开发。详细请参考教程《零门槛开发产业级AI模型》
❗注:以上功能均基于 GPU/CPU 实现。PaddleX 还可在昆仑芯、昇腾、寒武纪和海光等主流硬件上进行快速推理和二次开发。下表详细列出了模型产线的支持情况,具体支持的模型列表请参阅模型列表(昆仑芯XPU)/模型列表(昇腾NPU)/模型列表(寒武纪MLU)/模型列表(海光DCU)。我们正在适配更多的模型,并在主流硬件上推动高性能和服务化部署的实施。
🔥🔥 国产化硬件能力支持
| 模型产线 |
昇腾 910B |
昆仑芯 R200/R300 |
寒武纪 MLU370X8 |
海光 Z100/K100AI |
| 通用OCR |
✅ |
✅ |
✅ |
✅ |
| 通用表格识别 |
✅ |
🚧 |
🚧 |
🚧 |
| 通用目标检测 |
✅ |
✅ |
✅ |
✅ |
| 通用实例分割 |
✅ |
🚧 |
✅ |
🚧 |
| 通用图像分类 |
✅ |
✅ |
✅ |
✅ |
| 通用语义分割 |
✅ |
✅ |
✅ |
✅ |
| 时序预测 |
✅ |
✅ |
✅ |
✅ |
| 时序异常检测 |
✅ |
🚧 |
🚧 |
🚧 |
| 时序分类 |
✅ |
🚧 |
🚧 |
🚧 |
| 图像多标签分类 |
✅ |
🚧 |
🚧 |
✅ |
| 行人属性识别 |
✅ |
🚧 |
🚧 |
🚧 |
| 车辆属性识别 |
✅ |
🚧 |
🚧 |
🚧 |
| 通用图像识别 |
✅ |
🚧 |
✅ |
✅ |
| 印章文本识别 |
✅ |
🚧 |
🚧 |
🚧 |
| 图像异常检测 |
✅ |
✅ |
✅ |
✅ |
| 人脸识别 |
✅ |
✅ |
✅ |
✅ |
⏭️ 快速开始
🛠️ 安装
❗在安装 PaddleX 之前,请确保您已具备基本的 Python 运行环境(注:目前支持 Python 3.8 至 Python 3.12)。PaddleX 3.0-rc0 版本依赖的 PaddlePaddle 版本为 3.0.0rc0及以上版本,请在使用前务必保证版本的对应关系。
❗无需关注物理机上的 CUDA 版本,只需关注显卡驱动程序版本。更多飞桨 Wheel 版本信息,请参考飞桨官网。
❗ 更多安装方式参考 PaddleX 安装教程
💻 命令行使用
一行命令即可快速体验产线效果,统一的命令行格式为:
paddlex --pipeline [产线名称] --input [输入图片] --device [运行设备]
PaddleX的每一条产线对应特定的参数,您可以在各自的产线文档中查看具体的参数说明。每条产线需指定必要的三个参数:
pipeline:产线名称或产线配置文件
input:待处理的输入文件(如图片)的本地路径、目录或 URL
device:使用的硬件设备及序号(例如gpu:0表示使用第 0 块 GPU),也可选择使用 NPU(npu:0)、 XPU(xpu:0)、CPU(cpu)等。
以通用 OCR 产线为例:
paddlex --pipeline OCR \
--input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png \
--use_doc_orientation_classify False \
--use_doc_unwarping False \
--use_textline_orientation False \
--save_path ./output \
--device gpu:0
👉 点击查看运行结果
```bash
{'res': {'input_path': 'general_ocr_002.png', 'page_index': None, 'model_settings': {'use_doc_preprocessor': False, 'use_textline_orientation': False}, 'doc_preprocessor_res': {'input_path': None, 'model_settings': {'use_doc_orientation_classify': True, 'use_doc_unwarping': False}, 'angle': 0},'dt_polys': [array([[ 3, 10],
[82, 10],
[82, 33],
[ 3, 33]], dtype=int16), ...], 'text_det_params': {'limit_side_len': 960, 'limit_type': 'max', 'thresh': 0.3, 'box_thresh': 0.6, 'unclip_ratio': 2.0}, 'text_type': 'general', 'textline_orientation_angles': [-1, ...], 'text_rec_score_thresh': 0.0, 'rec_texts': ['www.99*', ...], 'rec_scores': [0.8980069160461426, ...], 'rec_polys': [array([[ 3, 10],
[82, 10],
[82, 33],
[ 3, 33]], dtype=int16), ...], 'rec_boxes': array([[ 3, 10, 82, 33], ...], dtype=int16)}}
```
可视化结果如下:

其他产线的命令行使用,只需将 pipeline 参数调整为相应产线的名称,参数调整为对应的产线的参数即可。下面列出了每个产线对应的命令:
👉 更多产线的命令行使用
| 产线名称 | 使用命令 |
|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 通用图像分类 | `paddlex --pipeline image_classification --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg --device gpu:0 --save_path ./output/` |
| 通用目标检测 | `paddlex --pipeline object_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_object_detection_002.png --threshold 0.5 --save_path ./output/ --device gpu:0` |
| 通用实例分割 | `paddlex --pipeline instance_segmentation --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_instance_segmentation_004.png --threshold 0.5 --save_path ./output --device gpu:0` |
| 通用语义分割 | `paddlex --pipeline semantic_segmentation --input https://paddle-model-ecology.bj.bcebos.com/paddlex/PaddleX3.0/application/semantic_segmentation/makassaridn-road_demo.png --target_size -1 --save_path ./output --device gpu:0` |
| 图像多标签分类 | `paddlex --pipeline image_multilabel_classification --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg --save_path ./output --device gpu:0` |
| 小目标检测 | `paddlex --pipeline small_object_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/small_object_detection.jpg --threshold 0.5 --save_path ./output --device gpu:0` |
| 图像异常检测 | `paddlex --pipeline anomaly_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/uad_grid.png --save_path ./output --device gpu:0` |
| 行人属性识别 | `paddlex --pipeline pedestrian_attribute_recognition --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pedestrian_attribute_002.jpg --save_path ./output/ --device gpu:0` |
| 车辆属性识别 | `paddlex --pipeline vehicle_attribute_recognition --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/vehicle_attribute_002.jpg --save_path ./output/ --device gpu:0` |
| 3D多模态融合检测 | `paddlex --pipeline 3d_bev_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/det_3d/demo_det_3d/nuscenes_demo_infer.tar --device gpu:0 --save_path ./output/` |
| 人体关键点检测 | `paddlex --pipeline human_keypoint_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/keypoint_detection_001.jpg --det_threshold 0.5 --save_path ./output/ --device gpu:0` |
| 开放词汇检测 | `paddlex --pipeline open_vocabulary_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/open_vocabulary_detection.jpg --prompt "bus . walking man . rearview mirror ." --thresholds "{'text_threshold': 0.25, 'box_threshold': 0.3}" --save_path ./output --device gpu:0` |
| 开放词汇分割 | `paddlex --pipeline open_vocabulary_segmentation --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/open_vocabulary_segmentation.jpg --prompt_type box --prompt "[[112.9,118.4,513.8,382.1],[4.6,263.6,92.2,336.6],[592.4,260.9,607.2,294.2]]" --save_path ./output --device gpu:0` |
| 旋转目标检测 | `paddlex --pipeline rotated_object_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/rotated_object_detection_001.png --threshold 0.5 --save_path ./output --device gpu:0` |
| 通用OCR | `paddlex --pipeline OCR --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png --use_doc_orientation_classify False --use_doc_unwarping False --use_textline_orientation False --save_path ./output --device gpu:0` |
| 文档图像预处理 | `paddlex --pipeline doc_preprocessor --input https://paddle-model-ecology.bj.bcebos.com/paddlex/demo_image/doc_test_rotated.jpg --use_doc_orientation_classify True --use_doc_unwarping True --save_path ./output --device gpu:0` |
| 通用表格识别 | `paddlex --pipeline table_recognition --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/table_recognition.jpg --save_path ./output --device gpu:0` |
| 通用表格识别v2 | `paddlex --pipeline table_recognition_v2 --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/table_recognition.jpg --save_path ./output --device gpu:0` |
| 通用版面解析 | `paddlex --pipeline layout_parsing --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/demo_paper.png --use_doc_orientation_classify False --use_doc_unwarping False --use_textline_orientation False --save_path ./output --device gpu:0` |
| 通用版面解析v3 | `paddlex --pipeline PP-StructureV3 --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pp_structure_v3_demo.png --use_doc_orientation_classify False --use_doc_unwarping False --use_textline_orientation False --save_path ./output --device gpu:0` |
| 公式识别 | `paddlex --pipeline formula_recognition --input https://paddle-model-ecology.bj.bcebos.com/paddlex/demo_image/general_formula_recognition.png --use_layout_detection True --use_doc_orientation_classify False --use_doc_unwarping False --layout_threshold 0.5 --layout_nms True --layout_unclip_ratio 1.0 --layout_merge_bboxes_mode large --save_path ./output --device gpu:0` |
| 印章文本识别 | `paddlex --pipeline seal_recognition --input https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/seal_text_det.png --use_doc_orientation_classify False --use_doc_unwarping False --device gpu:0 --save_path ./output` |
| 时序预测 | `paddlex --pipeline ts_forecast --input https://paddle-model-ecology.bj.bcebos.com/paddlex/ts/demo_ts/ts_fc.csv --device gpu:0 --save_path ./output` |
| 时序异常检测 | `paddlex --pipeline ts_anomaly_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/ts/demo_ts/ts_ad.csv --device gpu:0 --save_path ./output` |
| 时序分类 | `paddlex --pipeline ts_classification --input https://paddle-model-ecology.bj.bcebos.com/paddlex/ts/demo_ts/ts_cls.csv --device gpu:0 --save_path ./output` |
| 多语种语音识别 | `paddlex --pipeline multilingual_speech_recognition --input https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav --save_path ./output --device gpu:0` |
| 通用视频分类 | `paddlex --pipeline video_classification --input https://paddle-model-ecology.bj.bcebos.com/paddlex/videos/demo_video/general_video_classification_001.mp4 --topk 5 --save_path ./output --device gpu:0` |
| 通用视频检测 | `paddlex --pipeline video_detection --input https://paddle-model-ecology.bj.bcebos.com/paddlex/videos/demo_video/HorseRiding.avi --device gpu:0 --save_path ./output` |
📝 Python 脚本使用
几行代码即可完成产线的快速推理,统一的 Python 脚本格式如下:
from paddlex import create_pipeline
pipeline = create_pipeline(pipeline=[产线名称])
output = pipeline.predict([输入图片名称])
for res in output:
res.print()
res.save_to_img("./output/")
res.save_to_json("./output/")
执行了如下几个步骤:
create_pipeline() 实例化产线对象
- 传入图片并调用产线对象的
predict() 方法进行推理预测
- 对预测结果进行处理
其他产线的 Python 脚本使用,只需将 create_pipeline() 方法的 pipeline 参数调整为相应产线的名称,参数调整为对应的产线的参数即可。下面列出了每个产线对应的参数名称及详细的使用解释:
👉 更多产线的Python脚本使用
📖 文档
⬇️ 安装
* [📦 PaddlePaddle 安装教程](https://paddlepaddle.github.io/PaddleX/latest/installation/paddlepaddle_install.html)
* [📦 PaddleX 安装教程](https://paddlepaddle.github.io/PaddleX/latest/installation/installation.html)
🔥 产线使用
* [📑 PaddleX 产线使用概览](https://paddlepaddle.github.io/PaddleX/latest/pipeline_usage/pipeline_develop_guide.html)
*
📝 文本图像智能分析
* [📄 文档场景信息抽取v3产线使用教程](https://paddlepaddle.github.io/PaddleX/latest/pipeline_usage/tutorials/information_extraction_pipelines/document_scene_information_extraction.html)
🔍 OCR
🎥 计算机视觉
⏱️ 时序分析
🎤 语音识别
🎥 视频识别
🔧 相关说明文件
⚙️ 单功能模块使用
*
🔍 OCR
* [📝 文本检测模块使用教程](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/text_detection.html)
* [🔖 印章文本检测模块使用教程](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/seal_text_detection.html)
* [🔠 文本识别模块使用教程](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/text_recognition.html)
* [🗺️ 版面区域检测模块使用教程](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/layout_detection.html)
* [📊 表格结构识别模块使用教程](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/table_structure_recognition.html)
* [📄 文档图像方向分类使用教程](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/doc_img_orientation_classification.html)
* [🔧 文本图像矫正模块使用教程](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/text_image_unwarping.html)
* [📐 公式识别模块使用教程](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/formula_recognition.html)
* [📊 表格单元格检测模块使用教程](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/table_cells_detection.html)
* [📈 表格分类模块使用教程](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/table_classification.html)
* [📝 文本行方向分类模块使用教程](https://paddlepaddle.github.io/PaddleX/latest/module_usage/tutorials/ocr_modules/textline_orientation_classification.html)
🏞️ 图像特征
🎯 目标检测
🌐 开放词汇目标检测
🎯 关键点检测
🖼️ 图像分割
🌐 开放词汇分割
⏱️ 时序分析
📦 3D
🎤 语音识别
🎥 视频识别
📄 相关说明文件
🏗️ 模型产线部署
* [🚀 PaddleX 高性能推理指南](https://paddlepaddle.github.io/PaddleX/latest/pipeline_deploy/high_performance_inference.html)
* [🖥️ PaddleX 服务化部署指南](https://paddlepaddle.github.io/PaddleX/latest/pipeline_deploy/serving.html)
* [📱 PaddleX 端侧部署指南](https://paddlepaddle.github.io/PaddleX/latest/pipeline_deploy/edge_deploy.html)
🖥️ 多硬件使用
* [🔧 多硬件使用指南](https://paddlepaddle.github.io/PaddleX/latest/other_devices_support/multi_devices_use_guide.html)
* [🖲️ 海光 DCU 飞桨安装教程](https://paddlepaddle.github.io/PaddleX/latest/other_devices_support/paddlepaddle_install_DCU.html)
* [🔲 寒武纪 MLU 飞桨安装教程](https://paddlepaddle.github.io/PaddleX/latest/other_devices_support/paddlepaddle_install_MLU.html)
* [💻 昇腾 NPU 飞桨安装教程](https://paddlepaddle.github.io/PaddleX/latest/other_devices_support/paddlepaddle_install_NPU.html)
* [🔌 昆仑 XPU 飞桨安装教程](https://paddlepaddle.github.io/PaddleX/latest/other_devices_support/paddlepaddle_install_XPU.html)
📝 产业实践教程&范例
* [📑 文档场景信息抽取v3模型产线———论文文献信息抽取应用教程](./docs/practical_tutorials/document_scene_information_extraction(layout_detection)_tutorial.md)
* [📑 文档场景信息抽取v3模型产线———印章信息抽取应用教程](./docs/practical_tutorials/document_scene_information_extraction(seal_recognition)_tutorial.md)
* [🖼️ 通用图像分类模型产线———垃圾分类教程](https://paddlepaddle.github.io/PaddleX/latest/practical_tutorials/image_classification_garbage_tutorial.html)
* [🧩 通用实例分割模型产线———遥感图像实例分割教程](https://paddlepaddle.github.io/PaddleX/latest/practical_tutorials/instance_segmentation_remote_sensing_tutorial.html)
* [👥 通用目标检测模型产线———行人跌倒检测教程](https://paddlepaddle.github.io/PaddleX/latest/practical_tutorials/object_detection_fall_tutorial.html)
* [👗 通用目标检测模型产线———服装时尚元素检测教程](https://paddlepaddle.github.io/PaddleX/latest/practical_tutorials/object_detection_fashion_pedia_tutorial.html)
* [🚗 通用 OCR 模型产线———车牌识别教程](https://paddlepaddle.github.io/PaddleX/latest/practical_tutorials/ocr_det_license_tutorial.html)
* [✍️ 通用 OCR 模型产线———手写中文识别教程](https://paddlepaddle.github.io/PaddleX/latest/practical_tutorials/ocr_rec_chinese_tutorial.html)
* [🗣️ 通用语义分割模型产线———车道线分割教程](https://paddlepaddle.github.io/PaddleX/latest/practical_tutorials/semantic_segmentation_road_tutorial.html)
* [🛠️ 时序异常检测模型产线———设备异常检测应用教程](https://paddlepaddle.github.io/PaddleX/latest/practical_tutorials/ts_anomaly_detection.html)
* [🎢 时序分类模型产线———心跳监测时序数据分类应用教程](https://paddlepaddle.github.io/PaddleX/latest/practical_tutorials/ts_classification.html)
* [🔋 时序预测模型产线———用电量长期预测应用教程](https://paddlepaddle.github.io/PaddleX/latest/practical_tutorials/ts_forecast.html)
🤔 FAQ
关于我们项目的一些常见问题解答,请参考FAQ。如果您的问题没有得到解答,请随时在 Issues 中提出
💬 Discussion
我们非常欢迎并鼓励社区成员在 Discussions 板块中提出问题、分享想法和反馈。无论您是想要报告一个 bug、讨论一个功能请求、寻求帮助还是仅仅想要了解项目的最新动态,这里都是一个绝佳的平台。
📄 许可证书
本项目的发布受 Apache 2.0 license 许可认证。