Skip to content

有没有RT-DETR onnx模型推理代码 #9457

@ainndejj11

Description

@ainndejj11

问题确认 Search before asking

  • 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.

请提出你的问题 Please ask your question

使用官方命令转onnx,成功:
paddle2onnx --model_dir=/raid/wtj/PaddleDetection-2.8.1/output_inference_model/rtdetr_r50vd_6x_coco
--model_filename=model.pdmodel
--params_filename=model.pdiparams
--opset_version=16
--save_file=rtdetr.onnx

转出的模型如何推理,使用原本的deploy/third_engine/onnx/infer.py 推理会报错:
Transform Order:
--transform op: Resize
--transform op: NormalizeImage
--transform op: Permute

2025-12-05 13:47:03.655578968 [E:onnxruntime:, sequential_executor.cc:572 ExecuteKernel] Non-zero status code returned while running Tile node. Name:'p2o.Tile.3' Status Message: the tensor to be tiled using Tile OP must be atleast 1 dimensional
Traceback (most recent call last):
File "/raid/wtj/PaddleDetection-2.8.1/deploy/third_engine/onnx/infer.py", line 148, in
predict_image(infer_config, predictor, img_list)
File "/raid/wtj/PaddleDetection-2.8.1/deploy/third_engine/onnx/infer.py", line 126, in predict_image
outputs = predictor.run(output_names=None, input_feed=inputs)
File "/home/gemfield/.conda/envs/paddle_det/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 287, in run
return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Non-zero status code returned while running Tile node. Name:'p2o.Tile.3' Status Message: the tensor to be tiled using Tile OP must be atleast 1 dimensional

请问如何解决

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions