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

Problems on converting onyx model to IR and xml files

Wang__Ting
Beginner
501 Views

Hi,

I met some problems on converting yolo_v3.onnx, which is a model to detect object, to IR file and xml files, under the model optimizer of OpenVINO. The error message is shown below.

robot@hero:/opt/intel/openvino/deployment_tools/model_optimizer$ python3 mo_onnx.py --input_model /home/robot/Downloads/yolov3.onnx 
Model Optimizer arguments:
Common parameters:
	- Path to the Input Model: 	/home/robot/Downloads/yolov3.onnx
	- Path for generated IR: 	/opt/intel/openvino_2020.1.023/deployment_tools/model_optimizer/.
	- IR output name: 	yolov3
	- Log level: 	ERROR
	- Batch: 	Not specified, inherited from the model
	- Input layers: 	Not specified, inherited from the model
	- Output layers: 	Not specified, inherited from the model
	- Input shapes: 	Not specified, inherited from the model
	- Mean values: 	Not specified
	- Scale values: 	Not specified
	- Scale factor: 	Not specified
	- Precision of IR: 	FP32
	- Enable fusing: 	True
	- Enable grouped convolutions fusing: 	True
	- Move mean values to preprocess section: 	False
	- Reverse input channels: 	False
ONNX specific parameters:
Model Optimizer version: 	2020.1.0-61-gd349c3ba4a
[ ERROR ]  Cannot infer shapes or values for node "TFNodes/yolo_evaluation_layer_1/Squeeze".
[ ERROR ]  Trying to squeeze dimension not equal to 1 for node "TFNodes/yolo_evaluation_layer_1/Squeeze"
[ ERROR ]  
[ ERROR ]  It can happen due to bug in custom shape infer function <function Squeeze.infer at 0x7fc4621e4d90>.
[ 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).
[ ERROR ]  Run Model Optimizer with --log_level=DEBUG for more information.
[ ERROR ]  Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "TFNodes/yolo_evaluation_layer_1/Squeeze" node. 
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #38.

It seems that the model I downloaded from yolo cannot fit the model optimizer of OpenVINO toolkit smoothly. Can I ask what happened from the error message above?

 

Best regards,

Ting Wang

0 Kudos
1 Reply
SIRIGIRI_V_Intel
Employee
501 Views

Hi Ting,

This issue is usually observed when the model optimizer is unable infer values or shapes for the node.

Please try to use –input_shape parameter along with the command you have used to optimize the model.

Regards,

Ram prasad

0 Kudos
Reply