I'm using Ubuntu18.04 on Intel Xeon CPU. Tensorflow version = 1.14.
I would like to generate IR files from default faster_rcnn_inception_v2_coco_2018_01_28 pb model, and incorporate into an live streaming application.
IR files are able to be generated from faster_rcnn_inception_v2_coco_2018_01_28 using the following command.
sudo python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py --input_model /home/lsyang/Documents/Trained-TFmodel/frozen_inference_graph.pb --tensorflow_use_custom_operations_config /opt/intel/openvino/deployment_tools/model_optimizer/extensions/front/tf/faster_rcnn_support_api_v1.14.json --tensorflow_object_detection_api_pipeline_config /home/lsyang/Documents/Trained-TFmodel/pipeline.config --reverse_input_channels --batch 1
However, while I run infer_network.load_model().
# Initialise the class infer_network = Network() # Load the network to IE plugin to get shape of input layer plugin, (n_fd, c_fd, h_fd, w_fd) = infer_network.load_model(arg_model, arg_device, 2, 1, 0, arg_cpu_extension)
Error message shows that:
plugin, (n_fd, c_fd, h_fd, w_fd) = infer_network.load_model(arg_model, arg_device, 2, 1, 0, arg_cpu_extension)
ValueError: not enough values to unpack (expected 4, got 2)
I expected that 4 parameters(n_fd, c_fd, h_fd, w_fd) will return, not sure which step goes wrong?
Thanks a lot.
Just looking at the error message, it looks like your IR only has two of the four required inputs. For reference, n = batch_size, c = num_channels, h= height, w = width.
I can look into the model further.
Hi Yang, Li-Shing,
I have tried to run the object_detection_demo_ssd_async with the attached model and it is working fine. I was also able to print n,c,h,w from the demo. Please refer this code snippet of the demo and confirm that your code supports 2D and 4D input layers.
I hope this helps.