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.

faster-rcnn conversion

andrea1
初学者
914 次查看

Hi all,

I am having some trouble in using faster-rcnn model.

1. Download faster-rnn resenet 101 coco from the zoo model (https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md)

2. Convert inference with the following command:

/opt/intel/computer_vision_sdk_2018.3.343/deployment_tools/model_optimizer/mo_tf.py --input_model ../../frozen_inference_graph.pb --tensorflow_use_custom_operations_config /opt/intel/computer_vision_sdk_2018.3.343/deployment_tools/model_optimizer/extensions/front/tf/faster_rcnn_support.json --tensorflow_object_detection_api_pipeline_config ../../pipeline.config --data_type FP32 --reverse_input_channels

3. Run object_detection_sample and got the following error:

[ ERROR ] Can't find output layer named bbox_pred

3.1 If I run the object_detection_ssd_sample it works but the image is resized to 600x600.

Any idea what I am doing wrong?

0 项奖励
3 回复数
Severine_H_Intel
914 次查看

Dear Andrea,

you are doing everything right. faster-rcnn resnet 101 coco needs to be run with the object_detection_ssd_sample. 

Faster RCNN  has been trained in Tensorflow with images resized automatically in the Pre-processor node to 600*600. Therefore, the pre-processing in the inference engine is doing the same, it resizes the images to that size. In case, you want to change this size, please look at the beginning of the pipeline.config and change the min_dimension (see below) and re-run the MO. We do not support non-square inputs yet, we are working on it. 

image_resizer {
      keep_aspect_ratio_resizer {
        min_dimension: 600
        max_dimension: 600
      }
    }
 
Best, 
Severine
0 项奖励
andrea1
初学者
914 次查看

Hi Severine,

Thanks for your reply. My resizer params are the following:

  faster_rcnn {
    num_classes: 90
    image_resizer {
      keep_aspect_ratio_resizer {
        min_dimension: 600
        max_dimension: 1024
      }

So I guess because you don't support non-square inputs, the image is resized to the min_dimension? In this case as the "keep_aspect_ratio" is used, if a non-square image is resized to a square image is it padded with zeros?

Thanks

0 项奖励
ADua0
初学者
914 次查看

Hello,

I was working on the same model , i got some other related issue to faster Rcnn . I am using object _detection_sample_ssd file to run inference engine,but I am facing some issue. Model is able to detect the object, and give output image but in the output image , no name of the object is coming. But it should come in the output image, like object is car , person etc. I am also attaching the output image I got. I hope anyone can help with this problem.

0 项奖励
回复