YOLOV5不支持转换
开放中
YOLOV5不支持转换
Created by: RichardYang88
onnx转换paddle时候报错 KeyError: 0
Created by: RichardYang88
从pytorch转onnx,没问题。在转为paddle模型的时候报错 RuntimeError: Inferred shape and existing shape differ in dimension 2: (640) vs (320) 貌似尺寸问题,但我在pytorch上没有错,在测试onnx模型也通过的。
---原始邮件--- 发件人: "Jason"<notifications@github.com> 发送时间: 2020年9月10日(周四) 下午4:41 收件人: "PaddlePaddle/X2Paddle"<X2Paddle@noreply.github.com>; 抄送: "RichardYang88"<1024005573@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [PaddlePaddle/X2Paddle] YOLOV5不支持转换 (#399)
onnx转换paddle时候报错 KeyError: 0
你好,是从什么框架转至Paddle呢?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Created by: jiangjiajun
从pytorch转onnx,没问题。在转为paddle模型的时候报错 RuntimeError: Inferred shape and existing shape differ in dimension 2: (640) vs (320) 貌似尺寸问题,但我在pytorch上没有错,在测试onnx模型也通过的。 … ---原始邮件--- 发件人: "Jason"<notifications@github.com> 发送时间: 2020年9月10日(周四) 下午4:41 收件人: "PaddlePaddle/X2Paddle"<X2Paddle@noreply.github.com>; 抄送: "RichardYang88"<1024005573@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [PaddlePaddle/X2Paddle] YOLOV5不支持转换 (#399) onnx转换paddle时候报错 KeyError: 0 你好,是从什么框架转至Paddle呢? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
方便的话,麻烦将你的ONNX模型分享一下,以便于我们定位分析
Created by: RichardYang88
hi,
这个yolov5s.onnx模型,转换命令是x2paddle --framework=onnx --model=yolov5s.onnx --save_dir=pd_model_yolov5s
弹出以下打印信息: Unknown shape for input tensor[tensor name: 'x2paddle_input'] -> shape: ['batch_size', 3, 640, 640], Please define shape of input here, Note:you can use visualization tools like Netron to check input shape. Shape of Input(e.g2. -1,3,224,224), enter 'N' to skip:
这里无论输入1,3,640,640。或者N, 或者其它任何,都会弹出以下信息:
File "/home/richard/.local/lib/python3.6/site-packages/onnx/shape_inference.py", line 35, in infer_shapes inferred_model_str = C.infer_shapes(model_str) RuntimeError: Inferred shape and existing shape differ in dimension 2: (640) vs (320)
------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/X2Paddle" <notifications@github.com>; 发送时间: 2020年9月10日(星期四) 晚上7:53 收件人: "PaddlePaddle/X2Paddle"<X2Paddle@noreply.github.com>; 抄送: "清辉"<1024005573@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [PaddlePaddle/X2Paddle] YOLOV5不支持转换 (#399)
从pytorch转onnx,没问题。在转为paddle模型的时候报错 RuntimeError: Inferred shape and existing shape differ in dimension 2: (640) vs (320) 貌似尺寸问题,但我在pytorch上没有错,在测试onnx模型也通过的。 … ---原始邮件--- 发件人: "Jason"<notifications@github.com> 发送时间: 2020年9月10日(周四) 下午4:41 收件人: "PaddlePaddle/X2Paddle"<X2Paddle@noreply.github.com>; 抄送: "RichardYang88"<1024005573@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [PaddlePaddle/X2Paddle] YOLOV5不支持转换 (#399) onnx转换paddle时候报错 KeyError: 0 你好,是从什么框架转至Paddle呢? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
方便的话,麻烦将你的ONNX模型分享一下,以便于我们定位分析
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
从QQ邮箱发来的超大附件
yolov5s.onnx (27.20M, 无限期)进入下载页面:http://mail.qq.com/cgi-bin/ftnExs_download?k=713831390dff28c7f52d380445375616000f075a5654060f1d01505c501a500c050b1c0052535314520e545c5354570d535a005b633b64405f545e4f56444a565e5649395e&t=exs_ftn_download&code=0819c7d9
Created by: RichardYang88
可以在github下载yolov5代码和模型,我就是用这个转的
---原始邮件--- 发件人: "channings"<notifications@github.com> 发送时间: 2020年9月14日(周一) 晚上7:40 收件人: "PaddlePaddle/X2Paddle"<X2Paddle@noreply.github.com>; 抄送: "RichardYang88"<1024005573@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [PaddlePaddle/X2Paddle] YOLOV5不支持转换 (#399)
@RichardYang88 你好,能不能提供一下模型的组网代码?这边想导出成ONNX低一点的版本进行测试。
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Created by: RichardYang88
https://github.com/ultralytics/yolov5
调试出来告诉我呀,这个问题也不是我第一次遇到,网上有人采用其它模型也遇见过也没有解决
------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/X2Paddle" <notifications@github.com>; 发送时间: 2020年9月15日(星期二) 下午2:10 收件人: "PaddlePaddle/X2Paddle"<X2Paddle@noreply.github.com>; 抄送: "清辉"<1024005573@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [PaddlePaddle/X2Paddle] YOLOV5不支持转换 (#399)
@RichardYang88 Pytorch的组网代码有吗?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Created by: Channingss
@RichardYang88 好的,这个问题指的是X2Paddle, 报这个错误?
KeyError: 0
还是报这个错误?
File "/home/richard/.local/lib/python3.6/site-packages/onnx/shape_inference.py", line 35, in infer_shapes inferred_model_str = C.infer_shapes(model_str) RuntimeError: Inferred shape and existing shape differ in dimension 2: (640) vs (320)
Created by: RichardYang88
这是同一个问题,只是先后顺序
---原始邮件--- 发件人: "channings"<notifications@github.com> 发送时间: 2020年9月15日(周二) 下午3:24 收件人: "PaddlePaddle/X2Paddle"<X2Paddle@noreply.github.com>; 抄送: "RichardYang88"<1024005573@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [PaddlePaddle/X2Paddle] YOLOV5不支持转换 (#399)
@RichardYang88 好的,这个问题指的是X2Paddle, 报这个错误? KeyError: 0
还是报这个错误? File "/home/richard/.local/lib/python3.6/site-packages/onnx/shape_inference.py", line 35, in infer_shapes inferred_model_str = C.infer_shapes(model_str) RuntimeError: Inferred shape and existing shape differ in dimension 2: (640) vs (320)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.Created by: RichardYang88
Paddle-Lite-Demo运行demo跑在安卓设备可行,但是其它paddle模型编译成.nb运行,执行到paddlePredictor.run() 崩溃,A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 28359 (Predictor Worke), pid 28247 (bject_detection)。。可以定位下吗?
搜到其他人遇到同样问题但没解决: https://github.com/PaddlePaddle/Paddle-Lite/issues/2138
------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/X2Paddle" <notifications@github.com>; 发送时间: 2020年9月15日(星期二) 下午3:24 收件人: "PaddlePaddle/X2Paddle"<X2Paddle@noreply.github.com>; 抄送: "清辉"<1024005573@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [PaddlePaddle/X2Paddle] YOLOV5不支持转换 (#399)
@RichardYang88 好的,这个问题指的是X2Paddle, 报这个错误? KeyError: 0
还是报这个错误? File "/home/richard/.local/lib/python3.6/site-packages/onnx/shape_inference.py", line 35, in infer_shapes inferred_model_str = C.infer_shapes(model_str) RuntimeError: Inferred shape and existing shape differ in dimension 2: (640) vs (320)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.Created by: Channingss
@RichardYang88 这个PR解决了你的问题,提示输入shape的时候,输入N跳过即可: https://github.com/PaddlePaddle/X2Paddle/pull/403
Created by: RichardYang88
谢谢,这个果然可以转换了。 但是转为paddle-lite上的.nb文件报OP不支持,应该只有修改模型的层去适配paddle-lite吧? Error: This model is not supported, because 5 ops are not supported on 'arm'. These unsupported ops are: 'elementwise_pow, fill_any_like, fill_zeros_like, scatter_nd_add, strided_slice'.
------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/X2Paddle" <notifications@github.com>; 发送时间: 2020年9月16日(星期三) 晚上7:37 收件人: "PaddlePaddle/X2Paddle"<X2Paddle@noreply.github.com>; 抄送: "清辉"<1024005573@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [PaddlePaddle/X2Paddle] YOLOV5不支持转换 (#399)
@RichardYang88 https://github.com/PaddlePaddle/X2Paddle/pull/403,这个PR解决了你的问题。
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Created by: Channingss
@RichardYang88 这个问题可以到Paddle-Lite的github下面提Issue进行咨询。
谢谢,这个果然可以转换了。 但是转为paddle-lite上的.nb文件报OP不支持,应该只有修改模型的层去适配paddle-lite吧? Error: This model is not supported, because 5 ops are not supported on 'arm'. These unsupported ops are: 'elementwise_pow, fill_any_like, fill_zeros_like, scatter_nd_add, strided_slice'. … ------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/X2Paddle" <notifications@github.com>; 发送时间: 2020年9月16日(星期三) 晚上7:37 收件人: "PaddlePaddle/X2Paddle"<X2Paddle@noreply.github.com>; 抄送: "清辉"<1024005573@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [PaddlePaddle/X2Paddle] YOLOV5不支持转换 (#399) @RichardYang88 #403,这个PR解决了你的问题。 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.