Skip to content

docs: explain the input format for running ONNX detection models dire… - #18426

Open
ngo-binh0108 wants to merge 1 commit into
PaddlePaddle:mainfrom
ngo-binh0108:docs/onnx-direct-inference
Open

ngo-binh0108 wants to merge 1 commit into
PaddlePaddle:mainfrom
ngo-binh0108:docs/onnx-direct-inference

Conversation

@ngo-binh0108

Copy link
Copy Markdown

The "Obtaining ONNX Models" page explains how to convert a model but not how to feed the
exported model when calling it directly (e.g. with onnxruntime). This came up in
discussion #18425, where an HWC image was passed without transposing to NCHW and the
detections came out shifted and stretched.

This adds a short section (English and Chinese) that:

  • points to engine="onnxruntime" as the recommended path,
  • describes the detection input format (BGR, NormalizeImage, HWC -> NCHW, sides multiple of 32)
    and the inference.yml PreProcess/PostProcess sections,
  • gives a minimal onnxruntime example, tested with PP-OCRv6_tiny_det_onnx,
  • explains the symptom of the missing transpose.

@CLAassistant

CLAassistant commented Oct 29, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants