Get Started

How to Export to PaddlePaddle Format from YOLO26 Models

Bridging the gap between developing and deploying computer vision models in real-world scenarios with varying conditions can be difficult. PaddlePaddle makes this process easier with its focus on flexibility, performance, and its capability for parallel processing in distributed environments. This means you can use your YOLO26 computer vision models on a wide variety of devices and platforms, from smartphones to cloud-based servers.



Watch: How to Export Ultralytics YOLO Models to PaddlePaddle Format | Key Features of PaddlePaddle Format

The ability to export to PaddlePaddle model format allows you to optimize your Ultralytics YOLO26 models for use within the PaddlePaddle framework. PaddlePaddle is known for facilitating industrial deployments and is a good choice for deploying computer vision applications in real-world settings across various domains.

Why should you export to PaddlePaddle?#

PaddlePaddle deep learning framework logo

Developed by Baidu, PaddlePaddle (PArallel Distributed Deep LEarning) is China's first open-source deep learning platform. Unlike some frameworks built mainly for research, PaddlePaddle prioritizes ease of use and smooth integration across industries.

It offers tools and resources similar to popular frameworks like TensorFlow and PyTorch, making it accessible for developers of all experience levels. From farming and factories to service businesses, PaddlePaddle's large developer community of over 4.77 million is helping create and deploy AI applications.

By exporting your Ultralytics YOLO26 models to PaddlePaddle format, you can tap into PaddlePaddle's strengths in performance optimization. PaddlePaddle prioritizes efficient model execution and reduced memory usage, so your YOLO26 models can run efficiently in practical scenarios.

Key Features of PaddlePaddle Models#

PaddlePaddle models offer a range of key features that contribute to their flexibility, performance, and scalability across diverse deployment scenarios:

  • Dynamic-to-Static Graph: PaddlePaddle supports dynamic-to-static compilation, where models can be translated into a static computational graph. This enables optimizations that reduce runtime overhead and boost inference performance.

  • Operator Fusion: PaddlePaddle, like TensorRT, uses operator fusion to streamline computation and reduce overhead. The framework minimizes memory transfers and computational steps by merging compatible operations, resulting in faster inference.

  • Quantization: PaddlePaddle supports quantization techniques, including post-training quantization and quantization-aware training. These techniques use lower-precision data representations to boost performance and reduce model size.

Deployment Options in PaddlePaddle#

PaddlePaddle models can be deployed in several ways.

PaddlePaddle provides a range of options, each offering a distinct balance of ease of use, flexibility, and performance:

  • Paddle Serving: This framework simplifies the deployment of PaddlePaddle models as high-performance RESTful APIs. Paddle Serving suits production environments, providing features like model versioning, online A/B testing, and scalability for handling large volumes of requests.

  • Paddle Inference API: The Paddle Inference API gives you low-level control over model execution. This option is well-suited for scenarios where you need to integrate the model tightly within a custom application or optimize performance for specific hardware.

  • Paddle Lite: Paddle Lite is designed for deployment on mobile and embedded devices where resources are limited. It optimizes models for smaller sizes and faster inference on ARM CPUs, GPUs, and other specialized hardware.

  • Paddle.js: Paddle.js enables you to deploy PaddlePaddle models directly within web browsers. Paddle.js can either load a pretrained model or transform a model from paddle-hub with model transforming tools provided by Paddle.js. It can run in browsers that support WebGL/WebGPU/WebAssembly.

Supported Tasks#

PaddlePaddle export supports all seven Ultralytics tasks. Semantic segmentation and depth estimation are available only with YOLO26, the only family that ships those heads.

TaskYOLOv8YOLO11YOLO26
Detect✅✅✅
Segment✅✅✅
Semantic❌❌✅
Depth❌❌✅
Classify✅✅✅
Pose✅✅✅
OBB✅✅✅

Export to PaddlePaddle: Converting Your YOLO26 Model#

Converting YOLO26 models to the PaddlePaddle format can improve execution flexibility and optimize performance for various deployment scenarios.

Installation#

To install the required package, run:

Installation
# Install the required package for YOLO26
pip install ultralytics

For detailed instructions and best practices related to the installation process, check our Ultralytics Installation guide. While installing the required packages for YOLO26, if you encounter any difficulties, consult our Common Issues guide for solutions and tips.

Usage#

All Ultralytics YOLO26 models support export, and you can browse the full list of export formats and options to find the best fit for your deployment needs.

The PaddlePaddle format supports the Export, Predict, and Validate modes. Export your model, then load the exported model to run inference or validate its accuracy.

Export
from ultralytics import YOLO

# Load a YOLO26 model
model = YOLO("yolo26n.pt")

# Export the model to PaddlePaddle format
model.export(format="paddle")  # creates 'yolo26n_paddle_model'
Predict
from ultralytics import YOLO

# Load the exported PaddlePaddle model
model = YOLO("./yolo26n_paddle_model")

# Run inference
results = model("https://ultralytics.com/images/bus.jpg")
Validate
from ultralytics import YOLO

# Load the exported PaddlePaddle model
model = YOLO("./yolo26n_paddle_model")

# Validate accuracy on the COCO8 dataset
metrics = model.val(data="coco8.yaml")

Export Arguments#

ArgumentTypeDefaultDescription
formatstr'paddle'Target format for the exported model, defining compatibility with various deployment environments.
imgszint or tuple640Desired image size for the model input. Can be an integer for square images or a tuple (height, width) for specific dimensions.
quantizeint or strNoneFixed FP32 export. PaddlePaddle export does not support export-time FP16, INT8, or W8A16 precision conversion.
batchint1Specifies export model batch inference size or the max number of images the exported model will process concurrently in predict mode.
devicestrNoneSpecifies the device for exporting: CPU (device=cpu), MPS for Apple silicon (device=mps).

For more details about the export process, visit the Ultralytics documentation page on exporting.

Deploying Exported YOLO26 PaddlePaddle Models#

After successfully exporting your Ultralytics YOLO26 models to PaddlePaddle format, you can now deploy them. The primary and recommended first step for running a PaddlePaddle model is to use the YOLO("yolo26n_paddle_model/") method, as outlined in the previous usage code snippet.

However, for in-depth instructions on deploying your PaddlePaddle models in various other settings, take a look at the following resources:

  • Paddle Serving: Learn how to deploy your PaddlePaddle models as performant services using Paddle Serving.

  • Paddle Lite: Explore how to optimize and deploy models on mobile and embedded devices using Paddle Lite.

  • Paddle.js: Discover how to run PaddlePaddle models in web browsers for client-side AI using Paddle.js.

Summary#

In this guide, we explored the process of exporting Ultralytics YOLO26 models to the PaddlePaddle format. By following these steps, you can use PaddlePaddle's strengths in diverse deployment scenarios and optimize your models for different hardware and software environments.

For further details on usage, visit the PaddlePaddle official documentation.

FAQ#

  • Exporting Ultralytics YOLO26 models to PaddlePaddle format is straightforward. You can use the export method of the YOLO class to perform the conversion. Here is an example using Python:

    Usage
    from ultralytics import YOLO
    
    # Load a YOLO26 model
    model = YOLO("yolo26n.pt")
    
    # Export the model to PaddlePaddle format
    model.export(format="paddle")  # creates 'yolo26n_paddle_model'
    
    # Load the exported PaddlePaddle model
    paddle_model = YOLO("./yolo26n_paddle_model")
    
    # Run inference
    results = paddle_model("https://ultralytics.com/images/bus.jpg")

    For more detailed setup and troubleshooting, check the Ultralytics Installation Guide and Common Issues Guide.

  • PaddlePaddle offers several key advantages for model deployment:

    • Performance Optimization: PaddlePaddle focuses on efficient model execution and reduced memory usage.
    • Dynamic-to-Static Graph Compilation: It supports dynamic-to-static compilation, allowing for runtime optimizations.
    • Operator Fusion: By merging compatible operations, it reduces computational overhead.
    • Quantization Techniques: Supports both post-training and quantization-aware training, enabling lower-precision data representations for improved performance.

    Exporting your Ultralytics YOLO26 models to PaddlePaddle gives you flexibility and performance across various applications and hardware platforms.

  • PaddlePaddle, developed by Baidu, is optimized for industrial and commercial AI deployments. Its large developer community and mature framework provide tools similar to TensorFlow and PyTorch. By exporting your YOLO26 models to PaddlePaddle, you gain:

    • Enhanced Performance: Fast execution and reduced memory footprint.
    • Flexibility: Wide compatibility with various devices from smartphones to cloud servers.
    • Scalability: Efficient parallel processing capabilities for distributed environments.

    These features make PaddlePaddle a strong option for deploying YOLO26 models in production settings.

  • PaddlePaddle uses several techniques to optimize model performance:

    • Dynamic-to-Static Graph: Converts models into a static computational graph for runtime optimizations.
    • Operator Fusion: Combines compatible operations to minimize memory transfer and increase inference speed.
    • Quantization: Reduces model size and increases efficiency using lower-precision data while maintaining accuracy.

    These techniques prioritize efficient model execution, making PaddlePaddle a good option for deploying high-performance YOLO26 models.

  • PaddlePaddle provides flexible deployment options:

    • Paddle Serving: Deploys models as RESTful APIs, suited to production with features like model versioning and online A/B testing.
    • Paddle Inference API: Gives low-level control over model execution for custom applications.
    • Paddle Lite: Optimizes models for mobile and embedded devices' limited resources.
    • Paddle.js: Enables deploying models directly within web browsers.

    These options cover a broad range of deployment scenarios, from on-device inference to scalable cloud services. Explore more deployment strategies on the Ultralytics Model Deployment Options page.

Comments4

Ask a question, share your results, or help someone else.

  1. cadpmGitHub

    Dear team, your converter does not work with PaddleX as it does not generate the YAML file in the inference folder, making it impossible to deploy the converted model. PaddlePaddle cannot teach how to work with this file due to licensing conflicts.

    n fact, nowhere in the PaddlePaddle or PaddleX repositories do they teach how to work with external or converted models.

    1. Glenn JocherUltralytics

      @cadpm thank you for bringing this to our attention. While the Ultralytics export tool facilitates converting YOLO11 models to PaddlePaddle format, it currently doesn't generate a YAML file for PaddleX inference. For specific guidance on handling PaddlePaddle models in PaddleX, consulting their official documentation or community forums might provide additional insights. If you encounter issues with the export process itself, please refer to our Ultralytics documentation for troubleshooting tips.

    2. cadpmGitHub

      Unfortunately, I haven't been able to find a solution on either side. For this reason, I have written to you to report this issue. If I ask in the Paddle forum, no one has worked on this issue, and the same happens on the YOLOv11 side—they don't work with Paddle.

    3. Glenn JocherUltralytics

      @cadpm thank you for reporting this issue. While our export tool supports conversion to PaddlePaddle, integration with PaddleX requires additional steps beyond our current documentation. I recommend reaching out to the PaddlePaddle community for specific guidance on importing and using converted models with PaddleX, as they might have insights on handling this integration. If you need further assistance with the export process itself, feel free to check our PaddlePaddle export guide.