RT-DETR转ONNX后进行推理报错,麻烦大佬给新手指教,谢谢
收藏
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
org_img = img
im_shape = np.array([[float(img.shape[0]), float(img.shape[1])]]).astype('float32')
img = cv2.resize(img, (640, 640))
scale_factor = np.array([[float(640 / img.shape[0]), float(640 / img.shape[1])]]).astype('float32')
img = img.astype(np.float32) / 255.0
input_img = np.transpose(img, [2, 0, 1])
image = input_img[np.newaxis, :, :, :]
output_dict = ["reshape2_95.tmp_0", "tile_3.tmp_0"]
inputs_dict = {
'im_shape': im_shape,
'image': image,
'scale_factor': scale_factor
}
print(image)
result = sess.run(
# output_names=['labels', 'boxes', 'scores'],
output_names=output_dict,
input_feed=inputs_dict
)
0
收藏
请登录后评论
解决没,我也遇到了
解决没,遇到同样问题