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.

Can not deploy Faster RCNN IR file

Yang__Li-Shing
Beginner
784 Views

Hello,

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.

0 Kudos
4 Replies
Sahira_Intel
Moderator
784 Views

Hi Li-Shing,

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.

Best Regards,

Sahira 

 

0 Kudos
Yang__Li-Shing
Beginner
784 Views

Hi Sahira


The attachment are Faster_RCNN_Inception_V2 model and the generated IR files.


Thanks.

0 Kudos
SIRIGIRI_V_Intel
Employee
784 Views

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.

Best Regards,

Ram prasad

0 Kudos
Yang__Li-Shing
Beginner
784 Views

Hi Ram prasad

"object_detection_demo_ssd_async" is working fine.

Thanks.

0 Kudos
Reply