Yolo-FastestV2
Yolo-FastestV2 copied to clipboard
convert pytorch to onnx format
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
?
issue fixed! Can check out my new pull request. Hope it helps! https://github.com/dog-qiuqiu/Yolo-FastestV2/pull/44#issue-1064116145
目前依然存在相同的问题,请问如何解决呢