SamSamhuns / yolov5_export_cpu

Exporting YOLOv5 for CPU inference with ONNX and OpenVINO
MIT License
35 stars 9 forks source link

Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "Unsqueeze_254" node. #4

Open munkeops opened 2 years ago

munkeops commented 2 years ago

Hey so i did the exact thing as what you mentioned but , faced the above issue, attaching logs -

Model Optimizer arguments: Common parameters:

the link mentioned here dosent really explain the issue. Trying this on a window machine, tried it with direct installation as well as docker image.

the link here - https://github.com/openvinotoolkit/openvino/issues/1287 mentions that yolov5 is not supported and hence the issue.

I did try to export the pt file to pb instead and then did the conversion, the results were absolutely bad.

Let me know what you think about this issue

SamSamhuns commented 2 years ago

Hey, thanks for bringing this up. Looks like, as of the latest commits on the yolov5 repo, the openvino exports do not work and report the same error as you state above. I was able to recreate the issue as it looks like openvino does not support some updated operations on the yolov5 repo.

For now, the openvino exports with the commits as of Aug 16, 2021, as I have tested it on the google colab which is present there. The simple temporary fix before openvino supports yolov5 fully would be to use the old commits. i.e.

$ git clone https://github.com/ultralytics/yolov5                    # clone repo
$ cd yolov5
$ git reset --hard f3e3f7603fca56e52f3f055d8bbb5847a73e3e78          # commit id for commit as of Aug 16, 2021