- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yolov7 (https://github.com/WongKinYiu/yolov7) model originally trained in pytorch conversion failed when tried to convert in IR format
First converted torch model (yolov7-e6.pt) to ONNX format, then tried to convert ONNX model to OpenVINO format.
To convert the model i used this command from Yolov6
python deploy/OpenVINO/export_openvino.py --weights ./pretrained/yolov7-e6.pt --img 1280 --batch 1
https://github.com/meituan/YOLOv6/blob/main/deploy/OpenVINO/export_openvino.py
Here is the error i received:
Starting to export OpenVINO...
[ ERROR ] -------------------------------------------------
[ ERROR ] ----------------- INTERNAL ERROR ----------------
[ ERROR ] Unexpected exception happened.
[ ERROR ] Please contact Model Optimizer developers and forward the following information:
[ ERROR ] While validating ONNX node '<Node(Mul): Mul_656>':
Check 'PartialShape::broadcast_merge_into(pshape, node->get_input_partial_shape(i), autob)' failed at core/src/op/util/elementwise_args.cpp:30:
While validating node 'v1::Multiply Multiply_8141 (1666[0]:f32{1,3,160,160,2}, 3028[0]:f32{3,2}) -> (dynamic...)' with friendly_name 'Multiply_8141':
Argument shapes are inconsistent.
[ ERROR ] Traceback (most recent call last):
File "/Users/abhishekmitra/Documents/Abhishek/Projects_2022/v2/YOLOv6-main/env_yolov6/lib/python3.7/site-packages/openvino/tools/mo/main.py", line 533, in main
ret_code = driver(argv)
File "/Users/abhishekmitra/Documents/Abhishek/Projects_2022/v2/YOLOv6-main/env_yolov6/lib/python3.7/site-packages/openvino/tools/mo/main.py", line 489, in driver
graph, ngraph_function = prepare_ir(argv)
File "/Users/abhishekmitra/Documents/Abhishek/Projects_2022/v2/YOLOv6-main/env_yolov6/lib/python3.7/site-packages/openvino/tools/mo/main.py", line 394, in prepare_ir
ngraph_function = moc_pipeline(argv, moc_front_end)
File "/Users/abhishekmitra/Documents/Abhishek/Projects_2022/v2/YOLOv6-main/env_yolov6/lib/python3.7/site-packages/openvino/tools/mo/moc_frontend/pipeline.py", line 147, in moc_pipeline
ngraph_function = moc_front_end.convert(input_model)
RuntimeError: While validating ONNX node '<Node(Mul): Mul_656>':
Check 'PartialShape::broadcast_merge_into(pshape, node->get_input_partial_shape(i), autob)' failed at core/src/op/util/elementwise_args.cpp:30:
While validating node 'v1::Multiply Multiply_8141 (1666[0]:f32{1,3,160,160,2}, 3028[0]:f32{3,2}) -> (dynamic...)' with friendly_name 'Multiply_8141':
Argument shapes are inconsistent.
[ ERROR ] ---------------- END OF BUG REPORT --------------
[ ERROR ] -------------------------------------------------
Please help to overcome above error.
Thanks in advance.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi abhi_jci,
Thanks for reaching out.
The Mul_656 Operation is not supported in OpenVINO. To use the yolov7 model, I would advise you either remove the operation or change the Mul_656 operation to another operation that is supported based on ONNX* Supported Operators.
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi abhi_jci,
This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question.
Regards,
Aznie

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page