PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.79k stars 2.89k forks source link

Error merging shape info for output. 'tile_3.tmp_0' source:{} target:{-1}. Falling back to lenient merge #8658

Open aistar1 opened 1 year ago

aistar1 commented 1 year ago

问题确认 Search before asking

请提出你的问题 Please ask your question

环境 OS: docker (windows) paddlecloud/paddledetection:2.4-cpu-e9a542

建置环境step:

docker pull paddlecloud/paddledetection:2.4-cpu-e9a542
# using the docker
cd PaddleDection
pip install -r requirements.txt 
pip install onnx==1.13.0
pip install paddle2onnx==1.0.5
pip install onnxruntime

export onnx导出 follow this

Then using the python

import onnxruntime as rt
import cv2
import numpy as np
import onnx

onnx_model = onnx.load("rtdetr_r50vd_6x_coco.onnx")
onnx.checker.check_model(onnx_model)
img = cv2.imread("demo/hrnet_demo.jpg")

img = cv2.resize(img, (640,640))
image = img.astype(np.float32) / 255.0
input_img = np.transpose(image, [2, 0, 1])
image = input_img[np.newaxis, :, :, :]

sess = rt.InferenceSession("rtdetr_r50vd_6x_coco.onnx")

It show the error 错误

2023-10-03 07:37:59.527517908 [W:onnxruntime:, graph.cc:108 MergeShapeInfo] Error merging shape info for output. 'tile_3.tmp_0' source:{} target:{-1}. Falling back to lenient merge.
zhiboniu commented 8 months ago

你好,可以先用官方模型确认下是环境还是导出的问题

jackros1022 commented 2 months ago

你好,问题解决了吗?也在安装这个操作步骤 步骤

报错:

[W:onnxruntime:, graph.cc:109 onnxruntime::MergeShapeInfo] Error merging shape info for output. 'save_infer_model/scale_1.tmp_0' source:{} target:{-1}. Falling back to lenient merge.