yolov5_onnx2caffe
yolov5_onnx2caffe copied to clipboard
from mask_net import MASK_CLASSIFY
hello,thx for your code,but i wanna know where is the mask_net? besides,i use onnx versio is 1.8.0,the Opset version 13,why i got this error? TypeError: ONNX node of type Shape is not supported. thx again!
Opset version 设置为10试试
Opset version 设置为10试试 您的caffe预测正常吗?有使用过https://github.com/daquexian/onnx-simplifier,去掉shape吗?
有使用onnx-simplifier简化过; 部署流程请参考如下文章: https://zhuanlan.zhihu.com/p/350860351
有使用onnx-simplifier简化过; 部署流程请参考如下文章: https://zhuanlan.zhihu.com/p/35086035
能否加您微信请教一些onnx->caffe的问题?谢谢
您好,非常感谢你的code.最近在使用yolov5转onnx 转caffe 现在我从yolov5 官方下了v5s的pt文件然后用export.py 得到onnx 和简化后的sample.onnx 然后用您的converCaffe 运行发现报File "convertCaffe.py", line 159, in
您好,非常感谢你的code.最近在使用yolov5转onnx 转caffe 现在我从yolov5 官方下了v5s的pt文件然后用export.py 得到onnx 和简化后的sample.onnx 然后用您的converCaffe 运行发现报File "convertCaffe.py", line 159, in convertToCaffe(graph, prototxt_path, caffemodel_path, exis_focus=True, focus_concat_name="Concat_40", focus_conv_name="Conv_41") File "convertCaffe.py", line 83, in convertToCaffe layer = converter_fn(node, graph, err) File "/kk/LongG/onnx2caffe/onnx2caffe/_operators.py", line 505, in _convert_resize height_scale = scales[2] IndexError: index 2 is out of bounds for axis 0 with size 0 这个应该是upsample里面对W H 进行resize 出问题了对吗 不知道怎么修改;caffe 的upsample是用的message UpsampleParameter { optional int32 height = 1 [default = 32]; optional int32 width = 2 [default = 32]; optional int32 height_scale = 3 [default = 2]; optional int32 width_scale = 4 [default = 2]; enum UpsampleOp { NEAREST = 0; BILINEAR = 1; } optional UpsampleOp mode = 5 [default = BILINEAR]; }
onnx版本1.8.0 op设置为10
您好,非常感谢你的code.最近在使用yolov5转onnx 转caffe 现在我从yolov5 官方下了v5s的pt文件然后用export.py 得到onnx 和简化后的sample.onnx 然后用您的converCaffe 运行发现报File "convertCaffe.py", line 159, in convertToCaffe(graph, prototxt_path, caffemodel_path, exis_focus=True, focus_concat_name="Concat_40", focus_conv_name="Conv_41") File "convertCaffe.py", line 83, in convertToCaffe layer = converter_fn(node, graph, err) File "/kk/LongG/onnx2caffe/onnx2caffe/_operators.py", line 505, in _convert_resize height_scale = scales[2] IndexError: index 2 is out of bounds for axis 0 with size 0 这个应该是upsample里面对W H 进行resize 出问题了对吗 不知道怎么修改;caffe 的upsample是用的message UpsampleParameter { optional int32 height = 1 [default = 32]; optional int32 width = 2 [default = 32]; optional int32 height_scale = 3 [default = 2]; optional int32 width_scale = 4 [default = 2]; enum UpsampleOp { NEAREST = 0; BILINEAR = 1; } optional UpsampleOp mode = 5 [default = BILINEAR]; }
您好,非常感谢你的code.最近在使用yolov5转onnx 转caffe 现在我从yolov5 官方下了v5s的pt文件然后用export.py 得到onnx 和简化后的sample.onnx 然后用您的converCaffe 运行发现报File "convertCaffe.py", line 159, in convertToCaffe(graph, prototxt_path, caffemodel_path, exis_focus=True, focus_concat_name="Concat_40", focus_conv_name="Conv_41") File "convertCaffe.py", line 83, in convertToCaffe layer = converter_fn(node, graph, err) File "/kk/LongG/onnx2caffe/onnx2caffe/_operators.py", line 505, in _convert_resize height_scale = scales[2] IndexError: index 2 is out of bounds for axis 0 with size 0 这个应该是upsample里面对W H 进行resize 出问题了对吗 不知道怎么修改;caffe 的upsample是用的message UpsampleParameter { optional int32 height = 1 [default = 32]; optional int32 width = 2 [default = 32]; optional int32 height_scale = 3 [default = 2]; optional int32 width_scale = 4 [default = 2]; enum UpsampleOp { NEAREST = 0; BILINEAR = 1; } optional UpsampleOp mode = 5 [default = BILINEAR]; }
你好,我也遇到了同样的问题,请问你的问题解决了吗?