convert pytorch to onnx format
Opened this issue · 2 comments
danielzhangau commented
I am trying to rebuild and use my own trained model on this OpenCV
version of yolofastestv2
:
https://github.com/hpc203/yolo-fastestv2-opencv
But I got the following error message:
Traceback (most recent call last):
File "E:\MyWork\Yolo-FastestV2\dnn.py", line 112, in <module>
outputs = model.detect(srcimg)
File "E:\MyWork\Yolo-FastestV2\dnn.py", line 91, in detect
outputs[top:top + length, 0:2] = (outs[row_ind:row_ind + length,
ValueError: operands could not be broadcast together with shapes (1,2,22,95) (484,2)
My understanding is the model output is two different scale of feature maps, but the OpenCV
version implementation only accept one. So does anyone know how to concatenate two features maps when converting the format from PyTorch
to onnx
?
danielzhangau commented
issue fixed! Can check out my new pull request. Hope it helps!
#44 (comment)
Jia-py commented
目前依然存在相同的问题,请问如何解决呢