{"id":4165,"library":"paddlex","title":"PaddleX","description":"PaddleX is a low-code development tool built on the PaddlePaddle deep learning framework. It integrates numerous ready-to-use pre-trained models, facilitating full-process AI development from model training to inference. Supporting various mainstream hardware, PaddleX aims to assist AI developers in industrial practice. The current version is 3.4.3, with an active release cadence.","status":"active","version":"3.4.3","language":"en","source_language":"en","source_url":"https://github.com/PaddlePaddle/PaddleX","tags":["AI","deep learning","computer vision","OCR","low-code","PaddlePaddle","machine learning","image classification","object detection","semantic segmentation","time series"],"install":[{"cmd":"pip install paddlex","lang":"bash","label":"Basic Installation"},{"cmd":"pip install \"paddlex[base]\"","lang":"bash","label":"Installation with Basic Features"},{"cmd":"pip install \"paddlex[ocr]\"","lang":"bash","label":"Installation with OCR Features"}],"dependencies":[{"reason":"Core deep learning framework. PaddleX 3.0.x versions depend on PaddlePaddle 3.0.0 and above for compatibility.","package":"paddlepaddle","optional":false},{"reason":"Required for Python 3.12+ environments, as it's no longer included by default in virtual environments, preventing PaddleX and PaddlePaddle installation issues.","package":"setuptools","optional":true},{"reason":"Required for high-performance inference with specific GPU configurations (e.g., CUDA 11.8 compatible TensorRT 8.x).","package":"TensorRT","optional":true}],"imports":[{"symbol":"create_pipeline","correct":"from paddlex import create_pipeline"}],"quickstart":{"code":"import os\nfrom paddlex import create_pipeline\n\n# Example for OCR pipeline\n# Note: This quickstart assumes PaddlePaddle and necessary OCR dependencies are installed.\n# You can replace 'OCR' with other supported pipeline names (e.g., 'GeneralInstanceSegmentation', 'ImageMultiLabelClassification').\n# The 'input' can be a local path, directory, or URL to an image.\n# For a real-world scenario, you might download an image or use a local file.\nimage_url = \"https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_002.png\"\n\ntry:\n    # Create an OCR pipeline instance\n    pipeline = create_pipeline(pipeline=\"OCR\")\n    print(\"OCR pipeline created successfully.\")\n\n    # Predict using the pipeline\n    # The 'predict' method returns a dictionary of results.\n    output = pipeline.predict(image_url)\n\n    # Print the prediction results\n    print(\"Prediction successful. Output:\")\n    print(output)\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n    print(\"Please ensure PaddlePaddle is installed and compatible, and relevant PaddleX dependencies (e.g., 'paddlex[ocr]') are installed.\")","lang":"python","description":"This quickstart demonstrates how to initialize an OCR pipeline and perform inference on an image URL using the `create_pipeline` function and its `predict` method. The example uses a public image URL, but local file paths are also supported."},"warnings":[{"fix":"Ensure `paddlepaddle` or `paddlepaddle-gpu` is installed with version `3.0.0` or higher before installing PaddleX.","message":"PaddleX 3.0.x requires PaddlePaddle version 3.0.0 or higher. Older PaddlePaddle versions are incompatible and will lead to runtime errors.","severity":"breaking","affected_versions":"<3.0.0"},{"fix":"Explicitly install `setuptools` (e.g., `pip install setuptools`) in your virtual environment before installing PaddlePaddle or PaddleX.","message":"On Python 3.12 and newer, `setuptools` is no longer included by default in virtual environments. This can cause installation failures for PaddlePaddle and subsequently PaddleX.","severity":"gotcha","affected_versions":"Python >=3.12"},{"fix":"Refer to the PaddleX documentation for compatible TensorRT versions corresponding to your PaddlePaddle/CUDA setup and install it manually if necessary.","message":"When using the high-performance inference plugin, ensure the installed TensorRT version is compatible with your PaddlePaddle's CUDA version. For example, PaddlePaddle with CUDA 11.8 requires TensorRT 8.x (specifically recommended 8.6.1.6).","severity":"gotcha","affected_versions":"All versions using high-performance inference on GPU"},{"fix":"Ensure your models are updated to the `.json` format for static graph inference with PaddleX 3.0+. Convert older `.pdmodel` files if you encounter issues.","message":"In PaddleX 3.0, static graph models for inference now use `.json` files instead of the older `.pdmodel` format. Using the old format with newer PaddleX versions for static graph inference may not work as expected.","severity":"deprecated","affected_versions":"PaddleX <3.0.0 (using .pdmodel)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}