PaddleDetection
PaddleDetection copied to clipboard
RT-DETR转ONNX后进行推理报错?
问题确认 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
我也遇到了同样的问题
我也遇到了同样的问题
我遇到了,有咩有解决方案呀
按照 https://zhuanlan.zhihu.com/p/623794029 这篇文章的方法可以导出推理成功的onnx模型
可以用官方模型走一下流程对比看有没有问题
建议模型导出去除后处理部分,推理输出后再进行后处理。
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
去除模型后处理部分后输出共两部分:
- 300个框的类别预测分数,维度为:[300, num_class]。
- 300个框的位置,维度为:[300, 4],其中4分别为预测框中心点坐标和预测框宽高。 后处理需执行操作:
- 预测类别分数,需进行SoftMax操作计算概率,筛选有效预测。
- 预测框的中心点坐标和宽高均为相对于输入图像的相对值,需乘原始尺寸反算。
我也遇到了同样的问题