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.

Running mo_tf RCNN error

Stankov__Stanko
Beginner
594 Views

Hello,

I have trained an inference graph using RCNN faster_rcnn_resnet50_coco_2018_01_28 downloaded from https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow.html

and when i try using the model optimizer with the following command " python mo_tf.py --input_model=D:/Software_development_tools/tensorflow/models-master/research/object_detection/inference_graph/frozen_inference_graph.pb --tensorflow_use_custom_operations_config C:/IntelSWTools/openvino_2019.1.133/deployment_tools/model_optimizer/extensions/front/tf/faster_rcnn_support.json  --tensorflow_object_detection_api_pipeline_config D:/Software_development_tools/tensorflow/models-master/research/object_detection/inference_graph/pipeline.config --reverse_input_channels --data_type=FP16
 "  i get the error

I have spend days trying to solve this issue with no luck and i would be very thankful if someone can help me out please. I have attached my config file.

 

Thank you for your time!


Model Optimizer arguments:
Common parameters:
        - Path to the Input Model:      D:/Software_development_tools/tensorflow/models-master/research/object_detection/inference_graph/frozen_inference_graph.pb
        - Path for generated IR:        C:\IntelSWTools\openvino_2019.1.133\deployment_tools\model_optimizer\.
        - IR output name:       frozen_inference_graph
        - 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:      FP16
        - Enable fusing:        True
        - Enable grouped convolutions fusing:   True
        - Move mean values to preprocess section:       False
        - Reverse input channels:       True
TensorFlow specific parameters:
        - Input model in text protobuf format:  False
        - Path to model dump for TensorBoard:   None
        - List of shared libraries with TensorFlow custom layers implementation:        None
        - Update the configuration file with input/output node names:   None
        - Use configuration file used to generate the model with Object Detection API:  D:/Software_development_tools/tensorflow/models-master/research/object_detection/inference_graph/pipeline.config
        - Operations to offload:        None
        - Patterns to offload:  None
        - Use the config file:  C:/IntelSWTools/openvino_2019.1.133/deployment_tools/model_optimizer/extensions/front/tf/faster_rcnn_support.json
Model Optimizer version:        2019.1.0-341-gc9b66a2
[ WARNING ]
Detected not satisfied dependencies:
        test-generator: installed: 0.1.2, required: 0.1.1

Please install required versions of components or use install_prerequisites script
C:\IntelSWTools\openvino_2019.1.133\deployment_tools\model_optimizer\install_prerequisites\install_prerequisites_tf.bat
Note that install_prerequisites scripts may install additional components.
[ WARNING ] Model Optimizer removes pre-processing block of the model which resizes image keeping aspect ratio. The Inference Engine does not support dynamic image size so the Intermediate Representation file is generated with the input image size of a fixed size.
Specify the "--input_shape" command line parameter to override the default shape which is equal to (600, 600).
The Preprocessor block has been removed. Only nodes performing mean value subtraction and scaling (if applicable) are kept.
[ ERROR ]  Exception occurred during running replacer "ObjectDetectionAPIDetectionOutputReplacement" (<class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIDetectionOutputReplacement'>): Found the following nodes '[]' with name 'crop_proposals' but there should be exactly 1. Looks like ObjectDetectionAPIProposalReplacement replacement didn't work.

0 Kudos
8 Replies
Shubha_R_Intel
Employee
594 Views

Dear Stankov, Stanko,

This is a known bug which several customers have experienced (it has to do with custom trained Tensorflow Object Detection API models). Sorry for the inconvenience ! Stay tuned on this forum for the progress.

Sincerely,

Shubha

0 Kudos
Stankov__Stanko
Beginner
594 Views

Hello Shubha,

Thank you for your reply !

Good to know, hope a solution will be available soon.

Best regards,

Stanko Stankov

 

0 Kudos
Shubha_R_Intel
Employee
594 Views

Dear Stankov, Stanko,

I have a fix for you. Unzip the attached and drop the *.json files into C:\Program Files (x86)\IntelSWTools\openvino_2019.1.133\deployment_tools\model_optimizer\extensions\front\tf (or the Linux variant). Try it again. This time it will work !

Thanks,

Shubha

0 Kudos
Stankov__Stanko
Beginner
594 Views

Hello Shubha,

Thank you very much for the fast fix, i can confirm that it is working now !

 

Best regards

Stanko Stankov

0 Kudos
Shubha_R_Intel
Employee
594 Views

Dear Stankov, Stanko,

I'm extremely happy to hear this. Thanks for reporting back !

Thanks for using OpenVino !

Shubha

0 Kudos
Stangier__Lorenz
Beginner
594 Views

Hello,

I am experiencing the same error but using the newer, 1.13 .json files didn't solve my problem (see log output below).

python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py --input_model export/frozen_inference_graph.pb --tensorflow_use_custom_operations_config /opt/intel/openvino/deployment_tools/model_optimizer/extensions/front/tf/faster_rcnn_support_api_v1.13.json --tensorflow_object_detection_api_pipeline_config export/pipeline.config --reverse_input_channels
Model Optimizer arguments:
Common parameters:
	- Path to the Input Model: 	/home/mbz/Oxford3/export/frozen_inference_graph.pb
	- Path for generated IR: 	/home/mbz/Oxford3/.
	- IR output name: 	frozen_inference_graph
	- 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: 	True
TensorFlow specific parameters:
	- Input model in text protobuf format: 	False
	- Path to model dump for TensorBoard: 	None
	- List of shared libraries with TensorFlow custom layers implementation: 	None
	- Update the configuration file with input/output node names: 	None
	- Use configuration file used to generate the model with Object Detection API: 	/home/mbz/Oxford3/export/pipeline.config
	- Operations to offload: 	None
	- Patterns to offload: 	None
	- Use the config file: 	/opt/intel/openvino/deployment_tools/model_optimizer/extensions/front/tf/faster_rcnn_support_api_v1.13.json
Model Optimizer version: 	2019.1.1-83-g28dfbfd
[ WARNING ] Model Optimizer removes pre-processing block of the model which resizes image keeping aspect ratio. The Inference Engine does not support dynamic image size so the Intermediate Representation file is generated with the input image size of a fixed size.
Specify the "--input_shape" command line parameter to override the default shape which is equal to (600, 600).
The Preprocessor block has been removed. Only nodes performing mean value subtraction and scaling (if applicable) are kept.
[ ERROR ]  Exception occurred during running replacer "ObjectDetectionAPIDetectionOutputReplacement" (<class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIDetectionOutputReplacement'>): Found the following nodes '[]' with name 'crop_proposals' but there should be exactly 1. Looks like ObjectDetectionAPIProposalReplacement replacement didn't work.

 

I am also training the a faster RCNN network on the OxfordIII pets dataset. Is there anythin that I can do?

 

0 Kudos
Stangier__Lorenz
Beginner
594 Views

Hello, I am also having the same error when trying to optimize a trained faster RCNN model. I trained the faster RCNN model on the OxfordIII Pets Dataset using the Tensorflow Object Detection API and with the pre-trained faster RCNN 101 Coco model from your downloads site. I've also tried to use the newer .json file that was kindly provided but still no success. Maybe you have an Idea? I attached my log (temp.txt).

0 Kudos
Shubha_R_Intel
Employee
594 Views

Dear Stangier, Lorenz,

Can you try upgrading to Tensorflow 1.13 and try again ?

Please report back here with your results.

Thanks,

Shubha

 

0 Kudos
Reply