yolov5_demo
yolov5_demo copied to clipboard
too many values to unpack
[ INFO ] Creating Inference Engine...
[ INFO ] Loading network:
yolov5s_v3.xml
[ INFO ] Preparing inputs
[ INFO ] Loading model to the plugin
[ INFO ] Starting inference...
To close the application, press 'CTRL+C' here or switch to the output window and press ESC key
To switch between sync/async modes, press TAB key in the output window
[ INFO ] Layer 412 parameters:
[ INFO ] classes : 80
[ INFO ] num : 3
[ INFO ] coords : 4
[ INFO ] anchors : [10.0, 13.0, 16.0, 30.0, 33.0, 23.0, 30.0, 61.0, 62.0, 45.0, 59.0, 119.0, 116.0, 90.0, 156.0, 198.0, 373.0, 326.0]
/usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import fnmatch, glob, traceback, errno, sys, atexit, locale, imp, stat
Traceback (most recent call last):
File "yolov5_demo_OV2021.3.py", line 412, in
Hi , Have you ever faced this problem?
In order to reuse your code, I have used the requirements.txt from yolov5 tag v3.0, and changed opset_version to10. Can you give some suggestions for me ?? Thx
Btw I used openvino from https://github.com/openvinotoolkit/openvino.git -b 2021.3.
@kuonumber Hi , sorry for the late reponse. Have solved this problem? Can you print blob.shape?
@kuonumber Hi , sorry for the late reponse. Have solved this problem? Can you print blob.shape?
I also met the problem, and blob.shape = (1, 3, 40, 40, 6). Could you plz help me? Thanks a lot.
@kuonumber Hi , sorry for the late reponse. Have solved this problem? Can you print blob.shape?
I also met the problem, and blob.shape = (1, 3, 40, 40, 6). Could you plz help me? Thanks a lot.
- Edit the export.py inside the yolov5 folder
- You will find inside the export.py the following "opset_version=opset"
- Change to opset_version=10
- Run the export for the yolov5s.pt to ONNX
- Open the created onnx file with netron and search for "transpose" and click in one result
- Above transpose you will find three "Conv" and click on each of them to see the name in the node properties.
- In my case the names were Conv_264,Conv_230,Conv_196
- Use these names in the command for the OpenVino model optimizer(mo.py): "mo --input_model yolov5s.onnx -s 255 --reverse_input_channels --output Conv_264,Conv_230,Conv_196"
- It will create the xml and bin files to use with the code [yolov5_demo_OV2021.3.py]
- Enjoy the demo :)
@kuonumber Hi , sorry for the late reponse. Have solved this problem? Can you print blob.shape?
I also met the problem, and blob.shape = (1, 3, 40, 40, 6). Could you plz help me? Thanks a lot.
- Edit the export.py inside the yolov5 folder
- You will find inside the export.py the following "opset_version=opset"
- Change to opset_version=10
- Run the export for the yolov5s.pt to ONNX
- Open the created onnx file with netron and search for "transpose" and click in one result
- Above transpose you will find three "Conv" and click on each of them to see the name in the node properties.
- In my case the names were Conv_264,Conv_230,Conv_196
- Use these names in the command for the OpenVino model optimizer(mo.py): "mo --input_model yolov5s.onnx -s 255 --reverse_input_channels --output Conv_264,Conv_230,Conv_196"
- It will create the xml and bin files to use with the code [yolov5_demo_OV2021.3.py]
- Enjoy the demo :)
Thank you.