PaddleDetection icon indicating copy to clipboard operation
PaddleDetection copied to clipboard

RT-DETR转ONNX后进行推理报错?

Open expection1985 opened this issue 1 year ago • 7 comments

问题确认 Search before asking

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

请提出你的问题 Please ask your question

下载这个模型rtdetr_r50vd_6x_coco.pdparams,按照说明文档转成ONNX也很顺利,但是推理的时候报错: 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 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

expection1985 avatar Aug 18 '23 09:08 expection1985

我也遇到了同样的问题

He-ningbo avatar Oct 25 '23 01:10 He-ningbo

我也遇到了同样的问题

ml-inory avatar Jan 03 '24 12:01 ml-inory

我遇到了,有咩有解决方案呀

Mrgorlay avatar Feb 03 '24 07:02 Mrgorlay

按照 https://zhuanlan.zhihu.com/p/623794029 这篇文章的方法可以导出推理成功的onnx模型

ml-inory avatar Feb 03 '24 17:02 ml-inory

可以用官方模型走一下流程对比看有没有问题

zhiboniu avatar Mar 04 '24 08:03 zhiboniu

建议模型导出去除后处理部分,推理输出后再进行后处理。 python tools/export_model.py -c configs/rtdetr/rtdetr_r50vd_6x_coco.yml -o weights=https://bj.bcebos.com/v1/paddledet/models/rtdetr_r50vd_6x_coco.pdparams trt=True --output_dir=output_inference exclude_post_process=True 去除模型后处理部分后输出共两部分:

  1. 300个框的类别预测分数,维度为:[300, num_class]。
  2. 300个框的位置,维度为:[300, 4],其中4分别为预测框中心点坐标和预测框宽高。 后处理需执行操作:
  3. 预测类别分数,需进行SoftMax操作计算概率,筛选有效预测。
  4. 预测框的中心点坐标和宽高均为相对于输入图像的相对值,需乘原始尺寸反算。

liang-stu avatar Mar 14 '24 08:03 liang-stu

我也遇到了同样的问题

zhangshengsheng avatar Jun 15 '24 06:06 zhangshengsheng