Hi Jaka,
Thanks for the reply. I am trying to change the layout of the model.
I have a saved_model.pb file and I used the omz_converter to make the model IR format. When I use the .xml and .bin files on the blobConverter, I cannot set any flags for the layout because the flags are not recognized.
When I try to convert the file using:
mo --input_model /home/igomez/Documents/igomez/depthai_spot/public/faster_rcnn_resnet50_coco/faster_rcnn_resnet50_coco_2018_01_28/frozen_inference_graph.pb --mean_values=[123.675,116.28,103.53] --scale_values=[58.395,57.12,57.375] --reverse_input_channels --layout NCHW
It will fail with:
[ ERROR ] -------------------------------------------------
[ ERROR ] ----------------- INTERNAL ERROR ----------------
[ ERROR ] Unexpected exception happened.
[ ERROR ] Please contact Model Optimizer developers and forward the following information:
[ ERROR ] Check 'element_type.is_real()' failed at src/core/src/preprocess/preprocess_steps_impl.cpp:118:
Mean preprocessing can be applied to 'float' inputs. Consider using of 'convert_element_type' before scaling. Current type is: u8
[ ERROR ] Traceback (most recent call last):
File "/home/igomez/depthai/lib/python3.8/site-packages/openvino/tools/mo/convert_impl.py", line 892, in _convert
ov_model, legacy_path = driver(argv, {"conversion_parameters": non_default_params})
File "/home/igomez/depthai/lib/python3.8/site-packages/openvino/tools/mo/convert_impl.py", line 558, in driver
res_ngraph_function = moc_emit_ir(ngraph_function, argv)
File "/home/igomez/depthai/lib/python3.8/site-packages/openvino/tools/mo/moc_frontend/moc_emit_ir.py", line 14, in moc_emit_ir
apply_preprocessing(ov_function=ngraph_function, argv=argv)
File "/home/igomez/depthai/lib/python3.8/site-packages/openvino/tools/mo/back/preprocessing.py", line 435, in apply_preprocessing
ov_function = prep.build()
RuntimeError: Check 'element_type.is_real()' failed at src/core/src/preprocess/preprocess_steps_impl.cpp:118:
Mean preprocessing can be applied to 'float' inputs. Consider using of 'convert_element_type' before scaling. Current type is: u8
[ ERROR ] ---------------- END OF BUG REPORT --------------
[ ERROR ] -------------------------------------------------
I cannot find an existing ONNX file that will work with the blobConverter from the onnx github because:
Currently ONNX operator set version: 16 is unsupported. Falling back to: 15
FAILED:
fasterrcnn_resnet50_fpn_v2_Opset16
I am wondering what I can do to get around this? I was hoping there would be a way I can convert my saved_model.pb file to .xml and .bin with the layout I need for the model.
Thanks,
Isabella