Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6403 Discussions

convert mxnet yolo3_darknet53_voc to openvino model error

王__伟
Beginner
679 Views

[ ERROR ] Cannot infer shapes or values for node "yolov30_box_nms0".
[ ERROR ] Operation _contrib_box_nms not not supported. For gluoncv ssd topologies use cmd parameter: '--enable_ssd_gluoncv'
For more information please refer to Model Optimizer FAQ, question #102. (https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html?question=102#
question-102)
[ ERROR ]
[ ERROR ] It can happen due to bug in custom shape infer function <function BoxNms.infer at 0x000002A81D24B438>.
[ ERROR ] Or because the node inputs have incorrect values/shapes.
[ ERROR ] Or because input shapes are incorrect (embedded to the model or passed via --input_shape).
[ 2021-04-22 09:33:28,010 ] [ DEBUG ] [ infer:197 ] Node "yolov30_box_nms0" attributes: {'symbol_dict': {'op': '_contrib_box_nms', 'name': 'yolov30_box_nms0', 'attrs': {'coord_start': '2
', 'force_suppress': 'False', 'id_index': '0', 'overlap_thresh': '0.45', 'score_index': '1', 'topk': '400', 'valid_thresh': '0.01'}, 'inputs': [[721, 0, 0]]}, '_in_ports': {0: {'control_f
low': False}}, '_out_ports': {0: {'control_flow': False}}, 'kind': 'op', 'name': 'yolov30_box_nms0', 'type': None, 'op': '_contrib_box_nms', 'infer': <function BoxNms.infer at 0x000002A81
D24B438>, 'coord_start': 2, 'force_suppress': False, 'id_index': 0, 'overlap_thresh': 0.45, 'score_index': 1, 'topk': 400, 'valid_thresh': 0.01, 'dim_attrs': ['channel_dims', 'axis', 'bat
ch_dims', 'spatial_dims'], 'shape_attrs': ['window', 'output_shape', 'shape', 'stride', 'pad'], 'IE': [('layer', [('id', <function Op.substitute_ie_attrs.<locals>.<lambda> at 0x000002A82D
B0CDC8>), 'name', 'type', 'version'], [('data', ['coord_start', 'force_suppress', 'id_index', 'overlap_thresh', 'score_index', 'topk', 'valid_thresh'], []), '@ports', '@consts'])], 'is_ou
tput_reachable': True, 'is_undead': False, 'is_const_producer': False, 'is_partial_inferred': False}
[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "yolov30_box_nms0" node.

For more information please refer to Model Optimizer FAQ, question #38. (https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html?question=38#qu
estion-38)
[ 2021-04-22 09:33:28,011 ] [ DEBUG ] [ main:361 ] Traceback (most recent call last):
File "C:\Users\965058589\PycharmProjects\model_convert\mo\middle\passes\infer.py", line 135, in partial_infer
node.infer(node)
File "C:\Users\965058589\PycharmProjects\model_convert\extensions\ops\box_nms.py", line 59, in infer
refer_to_faq_msg(102))
mo.utils.error.Error: Operation _contrib_box_nms not not supported. For gluoncv ssd topologies use cmd parameter: '--enable_ssd_gluoncv'
For more information please refer to Model Optimizer FAQ, question #102. (https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html?question=102#
question-102)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\965058589\PycharmProjects\model_convert\mo\utils\class_registration.py", line 288, in apply_transform
replacer.find_and_replace_pattern(graph)
File "C:\Users\965058589\PycharmProjects\model_convert\extensions\middle\PartialInfer.py", line 33, in find_and_replace_pattern
partial_infer(graph)
File "C:\Users\965058589\PycharmProjects\model_convert\mo\middle\passes\infer.py", line 199, in partial_infer
refer_to_faq_msg(38)) from err
mo.utils.error.Error: Stopped shape/value propagation at "yolov30_box_nms0" node.
For more information please refer to Model Optimizer FAQ, question #38. (https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html?question=38#qu
estion-38)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\965058589\PycharmProjects\model_convert\mo\main.py", line 345, in main
ret_code = driver(argv)
File "C:\Users\965058589\PycharmProjects\model_convert\mo\main.py", line 309, in driver
ret_res = emit_ir(prepare_ir(argv), argv)
File "C:\Users\965058589\PycharmProjects\model_convert\mo\main.py", line 252, in prepare_ir
graph = unified_pipeline(argv)
File "C:\Users\965058589\PycharmProjects\model_convert\mo\pipeline\unified.py", line 29, in unified_pipeline
class_registration.ClassType.BACK_REPLACER
File "C:\Users\965058589\PycharmProjects\model_convert\mo\utils\class_registration.py", line 340, in apply_replacements
apply_replacements_list(graph, replacers_order)
File "C:\Users\965058589\PycharmProjects\model_convert\mo\utils\class_registration.py", line 330, in apply_replacements_list
num_transforms=len(replacers_order))
File "C:\Users\965058589\PycharmProjects\model_convert\mo\utils\logger.py", line 124, in wrapper
function(*args, **kwargs)
File "C:\Users\965058589\PycharmProjects\model_convert\mo\utils\class_registration.py", line 310, in apply_transform
)) from err
mo.utils.error.Error: Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "yolov30_box_
nms0" node.
For more information please refer to Model Optimizer FAQ, question #38. (https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html?question=38#qu
estion-38)

0 Kudos
3 Replies
Syamimi_Intel
Moderator
644 Views

Hi ,

Thank you for reaching out. We are currently investigating this issue and will get back to you soon.

 

Regards,

Syamimi Fauzi


0 Kudos
Wan_Intel
Moderator
625 Views

Hi,


I also faced the same error as you when converting the yolo3_darknet53_voc model with the JSON file generated after exporting to the MXNet format using the GluonCV API which is yolo3_darknet53_voc-symbol.json.


In the other hand, I successfully converted this yolo3_darknet53_voc model into IR by using the JSON file in the extension directory of OpenVINO which is yolo_v3_mobilenet1_voc.json. The full command for the conversion:


mo.py --input_model C:\Users\<username>\.mxnet\models\yolo3_darknet53_voc-0000.params --input_shape [1,255,255,3] --transformations_config "<install_dir>\deployment_tools\model_optimizer\extensions\front\mxnet\yolo_v3_mobilenet1_voc.json"



Regards,

Wan


0 Kudos
Wan_Intel
Moderator
606 Views

Hi __伟,


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,

Wan


0 Kudos
Reply