# PaddleX

> PaddlePaddle's model zoo packaged as ready-to-run pipelines, one CLI command each

- Category: Training & Fine-Tuning / AutoML & Low-Code Training
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/PaddlePaddle/PaddleX
- Website: https://paddlepaddle.github.io/PaddleX/
- Canonical page: https://ai-tldr.dev/tools/paddlex/

## In short

PaddleX is the low-code development tool built on the PaddlePaddle framework. It sits in the AutoML & Low-Code Training category of the Training & Fine-Tuning tools and is open-source, written in Python and licensed Apache-2.0. To get started: install PaddlePaddle.

## Overview

PaddleX is the low-code development tool built on the PaddlePaddle framework. Its job is to collapse the distance between a model zoo and a working system: it gathers PaddlePaddle's pre-trained models — 270+ as of the 3.0 release, spanning image and video classification, detection and segmentation, OCR, speech recognition and time series — and packages them into pipelines you can invoke with a single command, rather than leaving you to assemble preprocessing, inference and postprocessing yourself.

The pipeline is the unit of work. Each one composes the models needed for a real task, and the mature ones cover general document parsing, key information extraction, document understanding, table recognition and general image recognition. Individual functional modules are also exposed, so you can combine models yourself when a stock pipeline is not quite right. The 3.0 release standardised the inference interface across model types specifically to cut the API fragmentation that makes moving between model families expensive.

It also carries the whole lifecycle rather than inference alone: training, evaluation and deployment run through unified commands and an optional graphical interface, with high-performance inference, serving deployment and edge deployment as supported targets. Hardware coverage is unusually broad — NVIDIA GPUs plus Kunlunxin, Ascend and Cambricon accelerators — with the stated aim that switching between them does not change your code. Later releases added CUDA 12 support with Paddle Inference and ONNX Runtime backends, multi-GPU inference, multi-instance serving, an open-sourced high-stability serving deployment scheme, and per-pipeline benchmarking that reports end-to-end and per-module timings.

## What it does

- 270+ pre-trained models organised into ready-to-run pipelines across OCR, document parsing, detection, classification, segmentation and time series
- A standardised inference interface across model types, so moving between model families does not mean relearning an API
- Full lifecycle from training through evaluation to deployment behind unified commands, with a graphical interface as an option
- Three deployment targets: high-performance inference, serving deployment (multi-GPU, multi-instance) and edge deployment
- Multi-vendor hardware support — NVIDIA GPU, Kunlunxin, Ascend and Cambricon — intended to be switchable without code changes
- Multi-model composition, so a complex task can be assembled from several models rather than forced into one
- Per-pipeline benchmarking that measures end-to-end inference time plus per-layer and per-module timings for performance analysis

## Getting started

PaddleX needs a Python environment (3.8–3.13) and a matching PaddlePaddle install first; the 3.0.x line depends on PaddlePaddle 3.0.0 or above. Install the framework, install PaddleX, then run a pipeline from the CLI.

1. Install PaddlePaddle

   Pick the wheel index matching your hardware. For GPU, what matters is the driver version, not the CUDA version installed on the machine.

```bash
# CPU
python -m pip install paddlepaddle==3.3.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/

# GPU, requires driver >= 450.80.02 (Linux) or >= 452.39 (Windows)
python -m pip install paddlepaddle-gpu==3.3.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/

# GPU, requires driver >= 550.54.14
python -m pip install paddlepaddle-gpu==3.3.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
```

2. Install PaddleX

   The base extra is enough to run the pipelines; the installation guide covers the other variants.

```bash
pip install "paddlex[base]"
```

3. Learn the CLI shape

   Every pipeline takes the same three required arguments: which pipeline to run, what to run it on, and where to run it. `device` accepts `gpu:0`, `npu:0`, `xpu:0`, `cpu` and so on.

```bash
paddlex --pipeline [Pipeline Name] --input [Input Image] --device [Running Device]
```

4. Run the OCR pipeline

   A complete example from the docs. The input can be a local path, a directory or a URL; results are written to `--save_path`.

```bash
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
```

5. Switch pipelines

   To run any other task, change the `pipeline` argument to that pipeline's name and adjust its parameters. Each pipeline documents its own options, and the model list page enumerates what is available.

## When to use it

- Run production OCR, table recognition or document parsing without assembling the detection and recognition models yourself
- Prototype a vision or time-series task against a large pre-trained model zoo behind one consistent inference API
- Train, evaluate and deploy a model through the same toolchain instead of stitching together separate scripts
- Target Ascend, Kunlunxin or Cambricon accelerators for inference without rewriting the application around each vendor's stack
