Community
cancel
Showing results for 
Search instead for 
Did you mean: 
nikogamulin
Beginner
1,369 Views

Unable to convert retrained ssd_mobilenet_v2_coco TensorFlow model to IR

Hi,

I downloaded ssd_mobilenet_v2_coco from Tensorflow detection model zoo and retrained the model to detect 6 classes of objects.

For retraining, I ran the following command (using TensorFlow Object Detection API):

/tensorflow/models/research# python object_detection/model_main.py \
--pipeline_config_path=learn_vehicle/ckpt/pipeline.config \
--model_dir=learn_vehicle/train \
--num_train_steps=500 \
--num_eval_steps=100

After training, I have tried to convert the graph using the following command (using Model Optimizer on Ubuntu VM):

python3 mo_tf.py \
--input_meta_graph ~/vehicle_model/checkpoint/model.ckpt-500.meta \
--output_dir ~/vehicle_model/output \
--tensorflow_use_custom_operations_config extensions/front/tf/ssd_v2_support.json \
--tensorflow_object_detection_api_pipeline_config ~/vehicle_model/checkpoint/pipeline.config \
--data_type FP16 \
--input_shape [1,300, 300, 3]

The command above returned the following output:

Model Optimizer arguments:

Common parameters:

- Path to the Input Model: None

- Path for generated IR: /home/niko/vehicle_model/checkpoint/output

- IR output name: model.ckpt-500

- 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: False

TensorFlow specific parameters:

- Input model in text protobuf format: False

- Offload unsupported operations: 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/niko/vehicle_model/checkpoint/pipeline.config

- Operations to offload: None

- Patterns to offload: None

- Use the config file: /home/niko/intel/computer_vision_sdk_2018.5.455/deployment_tools/model_optimizer/extensions/front/tf/ssd_v2_support.json

Model Optimizer version: 1.5.12.49d067a0

[ ERROR ] Graph contains 0 node after executing add_output_ops and add_input_ops. It may happen due to absence of 'Placeholder' layer in the model. It considered as error because resulting IR will be empty which is not usual

As I was not able to fix the issue, I would appreciate if anyone helped to solve this issue. Also, it would be helpful if any walkthrough tutorial, describing the steps from modifying the TensorFlow file, retraining the model and conversion to IR was available as at this point I don't know where else to look for potential causes of error.

 

Thank you,

 

Niko

0 Kudos
3 Replies
Shubha_R_Intel
Employee
1,369 Views

Dear Niko, did you make sure to pass in a frozen.pb into Model Optimizer --input_meta_graph ?

There is more than one way to go about freezing a tensorflow model, one way is to use the "freeze_graph.py" script which comes with the tensorflow installation:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze_graph.py

A typical freeze_graph.py command looks like this :

python freeze_graph.py --input_meta_graph model.ckpt.meta --output_node_names "Model/Activation_8/softmax_output" --output_graph model_frozen.pb --input_checkpoint model.ckpt --input_binary=true

Another way is to use the code snippet described here:

https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_T...

Hope it helps, and thanks for using OpenVino !

Shubha

nikogamulin
Beginner
1,369 Views

Hi Shubha,

 

Thank you for your reply. Another way I tried was to convert the trained model using TensorFlow Object Detection API to freeze the graph and then convert the frozen graph to IR.

Using TensorFlow Object Detection API I ran the following command:

python object_detection/export_inference_graph.py \
--input_type=image_tensor \
--pipeline_config_path=/home/niko/edgetpu/detection_movidius_v2/ckpt/pipeline.config \
--trained_checkpoint_prefix=/home/niko/edgetpu/detection_movidius_v2/train/model.ckpt-9702 \ 
--output_directory=/home/niko/edgetpu/detection_movidius_v2/frozen \
--model_name=ssd_mobilenet_v2_coco

The graph has been frozen and the output result was the following:


WARNING:tensorflow:From /home/niko/workspace/advanced-computer-vision-course/models/research/object_detection/exporter.py:309: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
WARNING:tensorflow:From /home/niko/workspace/advanced-computer-vision-course/venv_python3/lib/python3.5/site-packages/tensorflow/python/ops/tensor_array_ops.py:162: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /home/niko/workspace/advanced-computer-vision-course/models/research/object_detection/exporter.py:338: get_or_create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Please switch to tf.train.get_or_create_global_step
WARNING:tensorflow:From /home/niko/workspace/advanced-computer-vision-course/models/research/object_detection/exporter.py:494: print_model_analysis (from tensorflow.contrib.tfprof.model_analyzer) is deprecated and will be removed after 2018-01-01.
Instructions for updating:
Use `tf.profiler.profile(graph, run_meta, op_log, cmd, options)`. Build `options` with `tf.profiler.ProfileOptionBuilder`. See README.md for details
WARNING:tensorflow:From /home/niko/workspace/advanced-computer-vision-course/venv_python3/lib/python3.5/site-packages/tensorflow/python/profiler/internal/flops_registry.py:142: tensor_shape_from_node_def_name (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.compat.v1.graph_util.remove_training_nodes
165 ops no flops stats due to incomplete shapes.
Parsing Inputs...
Incomplete shape.

=========================Options=============================
-max_depth                  10000
-min_bytes                  0
-min_peak_bytes             0
-min_residual_bytes         0
-min_output_bytes           0
-min_micros                 0
-min_accelerator_micros     0
-min_cpu_micros             0
-min_params                 0
-min_float_ops              0
-min_occurrence             0
-step                       -1
-order_by                   name
-account_type_regexes       _trainable_variables
-start_name_regexes         .*
-trim_name_regexes          .*BatchNorm.*
-show_name_regexes          .*
-hide_name_regexes          
-account_displayed_op_only  true
-select                     params
-output                     stdout:

==================Model Analysis Report======================
Incomplete shape.

Doc:
scope: The nodes in the model graph are organized by their names, which is hierarchical like filesystem.
param: Number of parameters (in the Variable).

Profile:
node name | # parameters
_TFProfRoot (--/4.46m params)
  BoxPredictor_0 (--/171.10k params)
    BoxPredictor_0/BoxEncodingPredictor (--/62.22k params)
      BoxPredictor_0/BoxEncodingPredictor/biases (12, 12/12 params)
      BoxPredictor_0/BoxEncodingPredictor/weights (3x3x576x12, 62.21k/62.21k params)
    BoxPredictor_0/ClassPredictor (--/108.89k params)
      BoxPredictor_0/ClassPredictor/biases (21, 21/21 params)
      BoxPredictor_0/ClassPredictor/weights (3x3x576x21, 108.86k/108.86k params)
  BoxPredictor_1 (--/760.39k params)
    BoxPredictor_1/BoxEncodingPredictor (--/276.50k params)
      BoxPredictor_1/BoxEncodingPredictor/biases (24, 24/24 params)
      BoxPredictor_1/BoxEncodingPredictor/weights (3x3x1280x24, 276.48k/276.48k params)
    BoxPredictor_1/ClassPredictor (--/483.88k params)
      BoxPredictor_1/ClassPredictor/biases (42, 42/42 params)
      BoxPredictor_1/ClassPredictor/weights (3x3x1280x42, 483.84k/483.84k params)
  BoxPredictor_2 (--/304.19k params)
    BoxPredictor_2/BoxEncodingPredictor (--/110.62k params)
      BoxPredictor_2/BoxEncodingPredictor/biases (24, 24/24 params)
      BoxPredictor_2/BoxEncodingPredictor/weights (3x3x512x24, 110.59k/110.59k params)
    BoxPredictor_2/ClassPredictor (--/193.58k params)
      BoxPredictor_2/ClassPredictor/biases (42, 42/42 params)
      BoxPredictor_2/ClassPredictor/weights (3x3x512x42, 193.54k/193.54k params)
  BoxPredictor_3 (--/152.13k params)
    BoxPredictor_3/BoxEncodingPredictor (--/55.32k params)
      BoxPredictor_3/BoxEncodingPredictor/biases (24, 24/24 params)
      BoxPredictor_3/BoxEncodingPredictor/weights (3x3x256x24, 55.30k/55.30k params)
    BoxPredictor_3/ClassPredictor (--/96.81k params)
      BoxPredictor_3/ClassPredictor/biases (42, 42/42 params)
      BoxPredictor_3/ClassPredictor/weights (3x3x256x42, 96.77k/96.77k params)
  BoxPredictor_4 (--/152.13k params)
    BoxPredictor_4/BoxEncodingPredictor (--/55.32k params)
      BoxPredictor_4/BoxEncodingPredictor/biases (24, 24/24 params)
      BoxPredictor_4/BoxEncodingPredictor/weights (3x3x256x24, 55.30k/55.30k params)
    BoxPredictor_4/ClassPredictor (--/96.81k params)
      BoxPredictor_4/ClassPredictor/biases (42, 42/42 params)
      BoxPredictor_4/ClassPredictor/weights (3x3x256x42, 96.77k/96.77k params)
  BoxPredictor_5 (--/76.10k params)
    BoxPredictor_5/BoxEncodingPredictor (--/27.67k params)
      BoxPredictor_5/BoxEncodingPredictor/biases (24, 24/24 params)
      BoxPredictor_5/BoxEncodingPredictor/weights (3x3x128x24, 27.65k/27.65k params)
    BoxPredictor_5/ClassPredictor (--/48.43k params)
      BoxPredictor_5/ClassPredictor/biases (42, 42/42 params)
      BoxPredictor_5/ClassPredictor/weights (3x3x128x42, 48.38k/48.38k params)
  FeatureExtractor (--/2.84m params)
    FeatureExtractor/MobilenetV2 (--/2.84m params)
      FeatureExtractor/MobilenetV2/Conv (--/864 params)
        FeatureExtractor/MobilenetV2/Conv/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/Conv/weights (3x3x3x32, 864/864 params)
      FeatureExtractor/MobilenetV2/Conv_1 (--/409.60k params)
        FeatureExtractor/MobilenetV2/Conv_1/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/Conv_1/weights (1x1x320x1280, 409.60k/409.60k params)
      FeatureExtractor/MobilenetV2/expanded_conv (--/800 params)
        FeatureExtractor/MobilenetV2/expanded_conv/depthwise (--/288 params)
          FeatureExtractor/MobilenetV2/expanded_conv/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv/depthwise/depthwise_weights (3x3x32x1, 288/288 params)
        FeatureExtractor/MobilenetV2/expanded_conv/project (--/512 params)
          FeatureExtractor/MobilenetV2/expanded_conv/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv/project/weights (1x1x32x16, 512/512 params)
      FeatureExtractor/MobilenetV2/expanded_conv_1 (--/4.70k params)
        FeatureExtractor/MobilenetV2/expanded_conv_1/depthwise (--/864 params)
          FeatureExtractor/MobilenetV2/expanded_conv_1/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_1/depthwise/depthwise_weights (3x3x96x1, 864/864 params)
        FeatureExtractor/MobilenetV2/expanded_conv_1/expand (--/1.54k params)
          FeatureExtractor/MobilenetV2/expanded_conv_1/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_1/expand/weights (1x1x16x96, 1.54k/1.54k params)
        FeatureExtractor/MobilenetV2/expanded_conv_1/project (--/2.30k params)
          FeatureExtractor/MobilenetV2/expanded_conv_1/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_1/project/weights (1x1x96x24, 2.30k/2.30k params)
      FeatureExtractor/MobilenetV2/expanded_conv_10 (--/64.90k params)
        FeatureExtractor/MobilenetV2/expanded_conv_10/depthwise (--/3.46k params)
          FeatureExtractor/MobilenetV2/expanded_conv_10/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_10/depthwise/depthwise_weights (3x3x384x1, 3.46k/3.46k params)
        FeatureExtractor/MobilenetV2/expanded_conv_10/expand (--/24.58k params)
          FeatureExtractor/MobilenetV2/expanded_conv_10/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_10/expand/weights (1x1x64x384, 24.58k/24.58k params)
        FeatureExtractor/MobilenetV2/expanded_conv_10/project (--/36.86k params)
          FeatureExtractor/MobilenetV2/expanded_conv_10/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_10/project/weights (1x1x384x96, 36.86k/36.86k params)
      FeatureExtractor/MobilenetV2/expanded_conv_11 (--/115.78k params)
        FeatureExtractor/MobilenetV2/expanded_conv_11/depthwise (--/5.18k params)
          FeatureExtractor/MobilenetV2/expanded_conv_11/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_11/depthwise/depthwise_weights (3x3x576x1, 5.18k/5.18k params)
        FeatureExtractor/MobilenetV2/expanded_conv_11/expand (--/55.30k params)
          FeatureExtractor/MobilenetV2/expanded_conv_11/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_11/expand/weights (1x1x96x576, 55.30k/55.30k params)
        FeatureExtractor/MobilenetV2/expanded_conv_11/project (--/55.30k params)
          FeatureExtractor/MobilenetV2/expanded_conv_11/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_11/project/weights (1x1x576x96, 55.30k/55.30k params)
      FeatureExtractor/MobilenetV2/expanded_conv_12 (--/115.78k params)
        FeatureExtractor/MobilenetV2/expanded_conv_12/depthwise (--/5.18k params)
          FeatureExtractor/MobilenetV2/expanded_conv_12/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_12/depthwise/depthwise_weights (3x3x576x1, 5.18k/5.18k params)
        FeatureExtractor/MobilenetV2/expanded_conv_12/expand (--/55.30k params)
          FeatureExtractor/MobilenetV2/expanded_conv_12/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_12/expand/weights (1x1x96x576, 55.30k/55.30k params)
        FeatureExtractor/MobilenetV2/expanded_conv_12/project (--/55.30k params)
          FeatureExtractor/MobilenetV2/expanded_conv_12/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_12/project/weights (1x1x576x96, 55.30k/55.30k params)
      FeatureExtractor/MobilenetV2/expanded_conv_13 (--/152.64k params)
        FeatureExtractor/MobilenetV2/expanded_conv_13/depthwise (--/5.18k params)
          FeatureExtractor/MobilenetV2/expanded_conv_13/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_13/depthwise/depthwise_weights (3x3x576x1, 5.18k/5.18k params)
        FeatureExtractor/MobilenetV2/expanded_conv_13/expand (--/55.30k params)
          FeatureExtractor/MobilenetV2/expanded_conv_13/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_13/expand/weights (1x1x96x576, 55.30k/55.30k params)
        FeatureExtractor/MobilenetV2/expanded_conv_13/project (--/92.16k params)
          FeatureExtractor/MobilenetV2/expanded_conv_13/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_13/project/weights (1x1x576x160, 92.16k/92.16k params)
      FeatureExtractor/MobilenetV2/expanded_conv_14 (--/315.84k params)
        FeatureExtractor/MobilenetV2/expanded_conv_14/depthwise (--/8.64k params)
          FeatureExtractor/MobilenetV2/expanded_conv_14/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_14/depthwise/depthwise_weights (3x3x960x1, 8.64k/8.64k params)
        FeatureExtractor/MobilenetV2/expanded_conv_14/expand (--/153.60k params)
          FeatureExtractor/MobilenetV2/expanded_conv_14/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_14/expand/weights (1x1x160x960, 153.60k/153.60k params)
        FeatureExtractor/MobilenetV2/expanded_conv_14/project (--/153.60k params)
          FeatureExtractor/MobilenetV2/expanded_conv_14/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_14/project/weights (1x1x960x160, 153.60k/153.60k params)
      FeatureExtractor/MobilenetV2/expanded_conv_15 (--/315.84k params)
        FeatureExtractor/MobilenetV2/expanded_conv_15/depthwise (--/8.64k params)
          FeatureExtractor/MobilenetV2/expanded_conv_15/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_15/depthwise/depthwise_weights (3x3x960x1, 8.64k/8.64k params)
        FeatureExtractor/MobilenetV2/expanded_conv_15/expand (--/153.60k params)
          FeatureExtractor/MobilenetV2/expanded_conv_15/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_15/expand/weights (1x1x160x960, 153.60k/153.60k params)
        FeatureExtractor/MobilenetV2/expanded_conv_15/project (--/153.60k params)
          FeatureExtractor/MobilenetV2/expanded_conv_15/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_15/project/weights (1x1x960x160, 153.60k/153.60k params)
      FeatureExtractor/MobilenetV2/expanded_conv_16 (--/469.44k params)
        FeatureExtractor/MobilenetV2/expanded_conv_16/depthwise (--/8.64k params)
          FeatureExtractor/MobilenetV2/expanded_conv_16/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_16/depthwise/depthwise_weights (3x3x960x1, 8.64k/8.64k params)
        FeatureExtractor/MobilenetV2/expanded_conv_16/expand (--/153.60k params)
          FeatureExtractor/MobilenetV2/expanded_conv_16/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_16/expand/weights (1x1x160x960, 153.60k/153.60k params)
        FeatureExtractor/MobilenetV2/expanded_conv_16/project (--/307.20k params)
          FeatureExtractor/MobilenetV2/expanded_conv_16/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_16/project/weights (1x1x960x320, 307.20k/307.20k params)
      FeatureExtractor/MobilenetV2/expanded_conv_2 (--/8.21k params)
        FeatureExtractor/MobilenetV2/expanded_conv_2/depthwise (--/1.30k params)
          FeatureExtractor/MobilenetV2/expanded_conv_2/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_2/depthwise/depthwise_weights (3x3x144x1, 1.30k/1.30k params)
        FeatureExtractor/MobilenetV2/expanded_conv_2/expand (--/3.46k params)
          FeatureExtractor/MobilenetV2/expanded_conv_2/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_2/expand/weights (1x1x24x144, 3.46k/3.46k params)
        FeatureExtractor/MobilenetV2/expanded_conv_2/project (--/3.46k params)
          FeatureExtractor/MobilenetV2/expanded_conv_2/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_2/project/weights (1x1x144x24, 3.46k/3.46k params)
      FeatureExtractor/MobilenetV2/expanded_conv_3 (--/9.36k params)
        FeatureExtractor/MobilenetV2/expanded_conv_3/depthwise (--/1.30k params)
          FeatureExtractor/MobilenetV2/expanded_conv_3/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_3/depthwise/depthwise_weights (3x3x144x1, 1.30k/1.30k params)
        FeatureExtractor/MobilenetV2/expanded_conv_3/expand (--/3.46k params)
          FeatureExtractor/MobilenetV2/expanded_conv_3/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_3/expand/weights (1x1x24x144, 3.46k/3.46k params)
        FeatureExtractor/MobilenetV2/expanded_conv_3/project (--/4.61k params)
          FeatureExtractor/MobilenetV2/expanded_conv_3/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_3/project/weights (1x1x144x32, 4.61k/4.61k params)
      FeatureExtractor/MobilenetV2/expanded_conv_4 (--/14.02k params)
        FeatureExtractor/MobilenetV2/expanded_conv_4/depthwise (--/1.73k params)
          FeatureExtractor/MobilenetV2/expanded_conv_4/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_4/depthwise/depthwise_weights (3x3x192x1, 1.73k/1.73k params)
        FeatureExtractor/MobilenetV2/expanded_conv_4/expand (--/6.14k params)
          FeatureExtractor/MobilenetV2/expanded_conv_4/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_4/expand/weights (1x1x32x192, 6.14k/6.14k params)
        FeatureExtractor/MobilenetV2/expanded_conv_4/project (--/6.14k params)
          FeatureExtractor/MobilenetV2/expanded_conv_4/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_4/project/weights (1x1x192x32, 6.14k/6.14k params)
      FeatureExtractor/MobilenetV2/expanded_conv_5 (--/14.02k params)
        FeatureExtractor/MobilenetV2/expanded_conv_5/depthwise (--/1.73k params)
          FeatureExtractor/MobilenetV2/expanded_conv_5/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_5/depthwise/depthwise_weights (3x3x192x1, 1.73k/1.73k params)
        FeatureExtractor/MobilenetV2/expanded_conv_5/expand (--/6.14k params)
          FeatureExtractor/MobilenetV2/expanded_conv_5/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_5/expand/weights (1x1x32x192, 6.14k/6.14k params)
        FeatureExtractor/MobilenetV2/expanded_conv_5/project (--/6.14k params)
          FeatureExtractor/MobilenetV2/expanded_conv_5/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_5/project/weights (1x1x192x32, 6.14k/6.14k params)
      FeatureExtractor/MobilenetV2/expanded_conv_6 (--/20.16k params)
        FeatureExtractor/MobilenetV2/expanded_conv_6/depthwise (--/1.73k params)
          FeatureExtractor/MobilenetV2/expanded_conv_6/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_6/depthwise/depthwise_weights (3x3x192x1, 1.73k/1.73k params)
        FeatureExtractor/MobilenetV2/expanded_conv_6/expand (--/6.14k params)
          FeatureExtractor/MobilenetV2/expanded_conv_6/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_6/expand/weights (1x1x32x192, 6.14k/6.14k params)
        FeatureExtractor/MobilenetV2/expanded_conv_6/project (--/12.29k params)
          FeatureExtractor/MobilenetV2/expanded_conv_6/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_6/project/weights (1x1x192x64, 12.29k/12.29k params)
      FeatureExtractor/MobilenetV2/expanded_conv_7 (--/52.61k params)
        FeatureExtractor/MobilenetV2/expanded_conv_7/depthwise (--/3.46k params)
          FeatureExtractor/MobilenetV2/expanded_conv_7/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_7/depthwise/depthwise_weights (3x3x384x1, 3.46k/3.46k params)
        FeatureExtractor/MobilenetV2/expanded_conv_7/expand (--/24.58k params)
          FeatureExtractor/MobilenetV2/expanded_conv_7/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_7/expand/weights (1x1x64x384, 24.58k/24.58k params)
        FeatureExtractor/MobilenetV2/expanded_conv_7/project (--/24.58k params)
          FeatureExtractor/MobilenetV2/expanded_conv_7/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_7/project/weights (1x1x384x64, 24.58k/24.58k params)
      FeatureExtractor/MobilenetV2/expanded_conv_8 (--/52.61k params)
        FeatureExtractor/MobilenetV2/expanded_conv_8/depthwise (--/3.46k params)
          FeatureExtractor/MobilenetV2/expanded_conv_8/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_8/depthwise/depthwise_weights (3x3x384x1, 3.46k/3.46k params)
        FeatureExtractor/MobilenetV2/expanded_conv_8/expand (--/24.58k params)
          FeatureExtractor/MobilenetV2/expanded_conv_8/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_8/expand/weights (1x1x64x384, 24.58k/24.58k params)
        FeatureExtractor/MobilenetV2/expanded_conv_8/project (--/24.58k params)
          FeatureExtractor/MobilenetV2/expanded_conv_8/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_8/project/weights (1x1x384x64, 24.58k/24.58k params)
      FeatureExtractor/MobilenetV2/expanded_conv_9 (--/52.61k params)
        FeatureExtractor/MobilenetV2/expanded_conv_9/depthwise (--/3.46k params)
          FeatureExtractor/MobilenetV2/expanded_conv_9/depthwise/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_9/depthwise/depthwise_weights (3x3x384x1, 3.46k/3.46k params)
        FeatureExtractor/MobilenetV2/expanded_conv_9/expand (--/24.58k params)
          FeatureExtractor/MobilenetV2/expanded_conv_9/expand/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_9/expand/weights (1x1x64x384, 24.58k/24.58k params)
        FeatureExtractor/MobilenetV2/expanded_conv_9/project (--/24.58k params)
          FeatureExtractor/MobilenetV2/expanded_conv_9/project/BatchNorm (--/0 params)
          FeatureExtractor/MobilenetV2/expanded_conv_9/project/weights (1x1x384x64, 24.58k/24.58k params)
      FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_2_1x1_256 (--/327.68k params)
        FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_2_1x1_256/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_2_1x1_256/weights (1x1x1280x256, 327.68k/327.68k params)
      FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_3_1x1_128 (--/65.54k params)
        FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_3_1x1_128/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_3_1x1_128/weights (1x1x512x128, 65.54k/65.54k params)
      FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_4_1x1_128 (--/32.77k params)
        FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_4_1x1_128/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_4_1x1_128/weights (1x1x256x128, 32.77k/32.77k params)
      FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_5_1x1_64 (--/16.38k params)
        FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_5_1x1_64/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_5_1x1_64/weights (1x1x256x64, 16.38k/16.38k params)
      FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_2_3x3_s2_512 (--/131.07k params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_2_3x3_s2_512/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_2_3x3_s2_512/weights (1x1x256x512, 131.07k/131.07k params)
      FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_2_3x3_s2_512_depthwise (--/2.30k params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_2_3x3_s2_512_depthwise/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_2_3x3_s2_512_depthwise/depthwise_weights (3x3x256x1, 2.30k/2.30k params)
      FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_3_3x3_s2_256 (--/32.77k params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_3_3x3_s2_256/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_3_3x3_s2_256/weights (1x1x128x256, 32.77k/32.77k params)
      FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_3_3x3_s2_256_depthwise (--/1.15k params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_3_3x3_s2_256_depthwise/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_3_3x3_s2_256_depthwise/depthwise_weights (3x3x128x1, 1.15k/1.15k params)
      FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_4_3x3_s2_256 (--/32.77k params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_4_3x3_s2_256/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_4_3x3_s2_256/weights (1x1x128x256, 32.77k/32.77k params)
      FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_4_3x3_s2_256_depthwise (--/1.15k params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_4_3x3_s2_256_depthwise/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_4_3x3_s2_256_depthwise/depthwise_weights (3x3x128x1, 1.15k/1.15k params)
      FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128 (--/8.19k params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128/weights (1x1x64x128, 8.19k/8.19k params)
      FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128_depthwise (--/576 params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128_depthwise/BatchNorm (--/0 params)
        FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128_depthwise/depthwise_weights (3x3x64x1, 576/576 params)

======================End of Report==========================
165 ops no flops stats due to incomplete shapes.
Parsing Inputs...
Incomplete shape.

=========================Options=============================
-max_depth                  10000
-min_bytes                  0
-min_peak_bytes             0
-min_residual_bytes         0
-min_output_bytes           0
-min_micros                 0
-min_accelerator_micros     0
-min_cpu_micros             0
-min_params                 0
-min_float_ops              1
-min_occurrence             0
-step                       -1
-order_by                   float_ops
-account_type_regexes       .*
-start_name_regexes         .*
-trim_name_regexes          .*BatchNorm.*,.*Initializer.*,.*Regularizer.*,.*BiasAdd.*
-show_name_regexes          .*
-hide_name_regexes          
-account_displayed_op_only  true
-select                     float_ops
-output                     stdout:

==================Model Analysis Report======================
Incomplete shape.

Doc:
scope: The nodes in the model graph are organized by their names, which is hierarchical like filesystem.
flops: Number of float operations. Note: Please read the implementation for the math behind it.

Profile:
node name | # float_ops
_TFProfRoot (--/17.63k flops)
  MultipleGridAnchorGenerator/mul_19 (2.17k/2.17k flops)
  MultipleGridAnchorGenerator/mul_20 (2.17k/2.17k flops)
  MultipleGridAnchorGenerator/add_2 (2.17k/2.17k flops)
  MultipleGridAnchorGenerator/sub (2.17k/2.17k flops)
  MultipleGridAnchorGenerator/mul_27 (1.20k/1.20k flops)
  MultipleGridAnchorGenerator/mul_28 (1.20k/1.20k flops)
  MultipleGridAnchorGenerator/add_5 (1.20k/1.20k flops)
  MultipleGridAnchorGenerator/sub_1 (1.20k/1.20k flops)
  MultipleGridAnchorGenerator/mul_21 (1.08k/1.08k flops)
  MultipleGridAnchorGenerator/mul_29 (600/600 flops)
  MultipleGridAnchorGenerator/sub_2 (300/300 flops)
  MultipleGridAnchorGenerator/add_8 (300/300 flops)
  MultipleGridAnchorGenerator/mul_35 (300/300 flops)
  MultipleGridAnchorGenerator/mul_36 (300/300 flops)
  MultipleGridAnchorGenerator/mul_37 (150/150 flops)
  MultipleGridAnchorGenerator/sub_3 (108/108 flops)
  MultipleGridAnchorGenerator/mul_44 (108/108 flops)
  MultipleGridAnchorGenerator/mul_43 (108/108 flops)
  MultipleGridAnchorGenerator/add_11 (108/108 flops)
  MultipleGridAnchorGenerator/mul_45 (54/54 flops)
  MultipleGridAnchorGenerator/add_14 (48/48 flops)
  MultipleGridAnchorGenerator/mul_51 (48/48 flops)
  MultipleGridAnchorGenerator/mul_52 (48/48 flops)
  MultipleGridAnchorGenerator/sub_4 (48/48 flops)
  MultipleGridAnchorGenerator/mul_53 (24/24 flops)
  MultipleGridAnchorGenerator/mul_18 (19/19 flops)
  MultipleGridAnchorGenerator/mul_17 (19/19 flops)
  MultipleGridAnchorGenerator/add_1 (19/19 flops)
  MultipleGridAnchorGenerator/add (19/19 flops)
  MultipleGridAnchorGenerator/mul_59 (12/12 flops)
  MultipleGridAnchorGenerator/sub_5 (12/12 flops)
  MultipleGridAnchorGenerator/mul_60 (12/12 flops)
  MultipleGridAnchorGenerator/add_17 (12/12 flops)
  MultipleGridAnchorGenerator/add_3 (10/10 flops)
  MultipleGridAnchorGenerator/add_4 (10/10 flops)
  MultipleGridAnchorGenerator/mul_25 (10/10 flops)
  MultipleGridAnchorGenerator/mul_26 (10/10 flops)
  MultipleGridAnchorGenerator/mul_55 (6/6 flops)
  MultipleGridAnchorGenerator/mul_46 (6/6 flops)
  MultipleGridAnchorGenerator/mul_47 (6/6 flops)
  MultipleGridAnchorGenerator/mul_40 (6/6 flops)
  MultipleGridAnchorGenerator/mul_48 (6/6 flops)
  MultipleGridAnchorGenerator/mul_39 (6/6 flops)
  MultipleGridAnchorGenerator/mul_38 (6/6 flops)
  MultipleGridAnchorGenerator/mul_32 (6/6 flops)
  MultipleGridAnchorGenerator/mul_31 (6/6 flops)
  MultipleGridAnchorGenerator/mul_30 (6/6 flops)
  MultipleGridAnchorGenerator/mul_54 (6/6 flops)
  MultipleGridAnchorGenerator/mul_56 (6/6 flops)
  MultipleGridAnchorGenerator/truediv_19 (6/6 flops)
  MultipleGridAnchorGenerator/truediv_18 (6/6 flops)
  MultipleGridAnchorGenerator/truediv_17 (6/6 flops)
  MultipleGridAnchorGenerator/truediv_16 (6/6 flops)
  MultipleGridAnchorGenerator/truediv_15 (6/6 flops)
  MultipleGridAnchorGenerator/mul_22 (6/6 flops)
  MultipleGridAnchorGenerator/mul_23 (6/6 flops)
  MultipleGridAnchorGenerator/mul_24 (6/6 flops)
  MultipleGridAnchorGenerator/mul_61 (6/6 flops)
  MultipleGridAnchorGenerator/add_7 (5/5 flops)
  MultipleGridAnchorGenerator/add_6 (5/5 flops)
  MultipleGridAnchorGenerator/mul_34 (5/5 flops)
  MultipleGridAnchorGenerator/mul_33 (5/5 flops)
  MultipleGridAnchorGenerator/add_10 (3/3 flops)
  MultipleGridAnchorGenerator/truediv_14 (3/3 flops)
  MultipleGridAnchorGenerator/mul_15 (3/3 flops)
  MultipleGridAnchorGenerator/mul_42 (3/3 flops)
  MultipleGridAnchorGenerator/mul_41 (3/3 flops)
  MultipleGridAnchorGenerator/mul_16 (3/3 flops)
  MultipleGridAnchorGenerator/mul_14 (3/3 flops)
  MultipleGridAnchorGenerator/add_9 (3/3 flops)
  MultipleGridAnchorGenerator/mul_49 (2/2 flops)
  MultipleGridAnchorGenerator/mul_50 (2/2 flops)
  MultipleGridAnchorGenerator/add_12 (2/2 flops)
  MultipleGridAnchorGenerator/add_13 (2/2 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_1 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/add_4 (1/1 flops)
  Preprocessor/map/while/add_1 (1/1 flops)
  Preprocessor/map/while/add (1/1 flops)
  Preprocessor/map/while/Less_1 (1/1 flops)
  Preprocessor/map/while/Less (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_2 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_3 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_4 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/add_8 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/add_6 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_3 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/add_2 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/add_10 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/add (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/SortByField_1/Equal (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/SortByField/Equal (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_6 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_5 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_4 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_6 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_1 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_5 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_7 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_4 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_3 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_2 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_13 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_8 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_9 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_12 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_11 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_10 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_5 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/add (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_6 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_5 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_4 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/add_1 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_3 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_2 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/ones/Less (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_1 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater (1/1 flops)
  MultipleGridAnchorGenerator/add_23 (1/1 flops)
  MultipleGridAnchorGenerator/mul_7 (1/1 flops)
  MultipleGridAnchorGenerator/Minimum (1/1 flops)
  MultipleGridAnchorGenerator/mul_6 (1/1 flops)
  MultipleGridAnchorGenerator/add_18 (1/1 flops)
  MultipleGridAnchorGenerator/mul_58 (1/1 flops)
  MultipleGridAnchorGenerator/mul_57 (1/1 flops)
  MultipleGridAnchorGenerator/add_19 (1/1 flops)
  MultipleGridAnchorGenerator/add_20 (1/1 flops)
  MultipleGridAnchorGenerator/add_21 (1/1 flops)
  MultipleGridAnchorGenerator/mul_5 (1/1 flops)
  MultipleGridAnchorGenerator/add_22 (1/1 flops)
  MultipleGridAnchorGenerator/mul_8 (1/1 flops)
  MultipleGridAnchorGenerator/mul_4 (1/1 flops)
  MultipleGridAnchorGenerator/mul_3 (1/1 flops)
  MultipleGridAnchorGenerator/assert_equal/Equal (1/1 flops)
  MultipleGridAnchorGenerator/mul (1/1 flops)
  MultipleGridAnchorGenerator/mul_1 (1/1 flops)
  MultipleGridAnchorGenerator/mul_10 (1/1 flops)
  MultipleGridAnchorGenerator/mul_2 (1/1 flops)
  MultipleGridAnchorGenerator/mul_11 (1/1 flops)
  MultipleGridAnchorGenerator/mul_12 (1/1 flops)
  MultipleGridAnchorGenerator/mul_13 (1/1 flops)
  MultipleGridAnchorGenerator/truediv_3 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_1 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Greater (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/Less_1 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/Less (1/1 flops)
  MultipleGridAnchorGenerator/truediv_9 (1/1 flops)
  MultipleGridAnchorGenerator/truediv_8 (1/1 flops)
  MultipleGridAnchorGenerator/truediv_7 (1/1 flops)
  MultipleGridAnchorGenerator/truediv_6 (1/1 flops)
  MultipleGridAnchorGenerator/truediv_5 (1/1 flops)
  MultipleGridAnchorGenerator/truediv_4 (1/1 flops)
  Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_2 (1/1 flops)
  MultipleGridAnchorGenerator/truediv_2 (1/1 flops)
  MultipleGridAnchorGenerator/truediv_13 (1/1 flops)
  MultipleGridAnchorGenerator/truediv_12 (1/1 flops)
  MultipleGridAnchorGenerator/truediv_11 (1/1 flops)
  MultipleGridAnchorGenerator/truediv_10 (1/1 flops)
  MultipleGridAnchorGenerator/truediv_1 (1/1 flops)
  MultipleGridAnchorGenerator/truediv (1/1 flops)
  MultipleGridAnchorGenerator/add_15 (1/1 flops)
  MultipleGridAnchorGenerator/add_16 (1/1 flops)
  MultipleGridAnchorGenerator/mul_9 (1/1 flops)

======================End of Report==========================
2019-03-22 17:34:08.054892: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-03-22 17:34:08.161373: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:998] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-03-22 17:34:08.172543: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x7afbf90 executing computations on platform CUDA. Devices:
2019-03-22 17:34:08.172556: I tensorflow/compiler/xla/service/service.cc:158]   StreamExecutor device (0): GeForce GTX 980, Compute Capability 5.2
2019-03-22 17:34:08.280596: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 4000320000 Hz
2019-03-22 17:34:08.280816: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x7832ca0 executing computations on platform Host. Devices:
2019-03-22 17:34:08.280833: I tensorflow/compiler/xla/service/service.cc:158]   StreamExecutor device (0): <undefined>, <undefined>
2019-03-22 17:34:08.281293: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0 with properties: 
name: GeForce GTX 980 major: 5 minor: 2 memoryClockRate(GHz): 1.2785
pciBusID: 0000:01:00.0
totalMemory: 3.94GiB freeMemory: 3.18GiB
2019-03-22 17:34:08.281317: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2019-03-22 17:34:08.283800: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-03-22 17:34:08.283810: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990]      0 
2019-03-22 17:34:08.283824: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0:   N 
2019-03-22 17:34:08.284014: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 2953 MB memory) -> physical GPU (device: 0, name: GeForce GTX 980, pci bus id: 0000:01:00.0, compute capability: 5.2)
WARNING:tensorflow:From /home/niko/workspace/advanced-computer-vision-course/venv_python3/lib/python3.5/site-packages/tensorflow/python/training/saver.py:1266: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
2019-03-22 17:34:17.233851: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2019-03-22 17:34:17.233882: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-03-22 17:34:17.233888: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990]      0 
2019-03-22 17:34:17.233903: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0:   N 
2019-03-22 17:34:17.234007: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 2953 MB memory) -> physical GPU (device: 0, name: GeForce GTX 980, pci bus id: 0000:01:00.0, compute capability: 5.2)
WARNING:tensorflow:From /home/niko/workspace/advanced-computer-vision-course/venv_python3/lib/python3.5/site-packages/tensorflow/python/tools/freeze_graph.py:232: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.compat.v1.graph_util.convert_variables_to_constants
WARNING:tensorflow:From /home/niko/workspace/advanced-computer-vision-course/venv_python3/lib/python3.5/site-packages/tensorflow/python/framework/graph_util_impl.py:245: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.compat.v1.graph_util.extract_sub_graph
2019-03-22 17:34:18.141527: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
2019-03-22 17:34:18.141561: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-03-22 17:34:18.141567: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990]      0 
2019-03-22 17:34:18.141582: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0:   N 
2019-03-22 17:34:18.141715: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 2953 MB memory) -> physical GPU (device: 0, name: GeForce GTX 980, pci bus id: 0000:01:00.0, compute capability: 5.2)
WARNING:tensorflow:From /home/niko/workspace/advanced-computer-vision-course/models/research/object_detection/exporter.py:267: build_tensor_info (from tensorflow.python.saved_model.utils_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.utils.build_tensor_info or tf.compat.v1.saved_model.build_tensor_info.

Then, using OpenVINO, I ran summarize_graph.py to check the frozen graph:

python3 mo/utils/summarize_graph.py --input_model ~/vehicle_model/frozen_inference_graph.pb

Output:

1 input(s) detected:
Name: image_tensor, type: uint8, shape: (-1,-1,-1,3)
6 output(s) detected:
detection_boxes
detection_scores
detection_classes
num_detections
raw_detection_boxes
raw_detection_scores

Them I ran model optimizer to convert the graph to IR the following way:

python3 mo_tf.py --input_model ~/vehicle_model/frozen_inferen
ce_graph.pb --tensorflow_use_custom_operations_config extensions/front/tf/ssd_v2_support.json --data_type FP16 --tensorflow_object_detection_api_pipeline_config ~/vehicle_model/pipeline.config --output_dir ~/vehicle_model/output --reverse_input_channels --input_shape [1,300,300,3]


Model Optimizer arguments:
Common parameters:
    - Path to the Input Model:     /home/niko/vehicle_model/frozen_inference_graph.pb
    - Path for generated IR:     /home/niko/vehicle_model/output
    - 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:     [1,300,300,3]
    - 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
    - Offload unsupported operations:     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/niko/vehicle_model/pipeline.config
    - Operations to offload:     None
    - Patterns to offload:     None
    - Use the config file:     /home/niko/intel/computer_vision_sdk_2018.5.455/deployment_tools/model_optimizer/extensions/front/tf/ssd_v2_support.json
Model Optimizer version:     1.5.12.49d067a0
The Preprocessor block has been removed. Only nodes performing mean value subtraction and scaling (if applicable) are kept.

[ SUCCESS ] Generated IR model.
[ SUCCESS ] XML file: /home/niko/vehicle_model/output/frozen_inference_graph.xml
[ SUCCESS ] BIN file: /home/niko/vehicle_model/output/frozen_inference_graph.bin
[ SUCCESS ] Total execution time: 11.58 seconds.

This way, the TensorFlow graph has been converted to IR, but the problem is that this graph doesn't etect anything at all when I use in the code.

The code for detection, written in python is the following:

 

# model initialization
logger.info("Reading IR...")
net = IENetwork.from_ir(model='models/mobilenet-ssd/FP16/frozen_inference_graph.xml',
                        weights='models/mobilenet-ssd/FP16/frozen_inference_graph.bin')

input_blob = next(iter(net.inputs))
out_blob = next(iter(net.outputs))
logger.info("Loading IR to the plugin...")
exec_net = plugin.load(network=net, num_requests=2)
# Read and pre-process input image
net_n, net_c, net_h, net_w = net.inputs[input_blob].shape
logger.info(
    "net.inpute.shape(n, c, h, w):{}".format(net.inputs[input_blob].shape))
del net

def preprocess_image(color_image, w, h):
    prepimg = cv2.resize(color_image, (w, h))
    prepimg = prepimg - 127.5
    prepimg = prepimg * 0.007843
    prepimg = prepimg[np.newaxis, :, :, :]  # Batch size axis add
    prepimg = prepimg.transpose((0, 3, 1, 2))  # NHWC to NCHW
    return prepimg


def predict(frame, exec_net, w, h, input_blob, out_blob, cur_request_id, next_request_id, log=None):
    predictions = []
    try:
        inf_start = timer()
        # Prepare input blob and perform an inference
        blob = preprocess_image(frame, w, h)
        exec_net.start_async(
            request_id=next_request_id, inputs={input_blob: blob})
        if exec_net.requests[cur_request_id].wait(-1) == 0:
            inf_end = timer()
            det_time = inf_end - inf_start

            # Parse detection results of the current request
            out = exec_net.requests[cur_request_id].outputs[out_blob]
            out = out.flatten()

            for box_index in range(100):
                if out[box_index + 1] == 0.0:
                    break
                base_index = box_index * 7
                if (not np.isfinite(out[base_index]) or
                        not np.isfinite(out[base_index + 1]) or
                        not np.isfinite(out[base_index + 2]) or
                        not np.isfinite(out[base_index + 3]) or
                        not np.isfinite(out[base_index + 4]) or
                        not np.isfinite(out[base_index + 5]) or
                        not np.isfinite(out[base_index + 6])):
                    continue

                object_info_overlay = out[base_index:base_index + 7]

                base_index = 0
                class_id = int(object_info_overlay[base_index + 1])
                if class_id == 0:
                    continue
                conf = object_info_overlay[base_index + 2]

                box_left = object_info_overlay[base_index + 3]
                box_top = object_info_overlay[base_index + 4]
                box_right = object_info_overlay[base_index + 5]
                box_bottom = object_info_overlay[base_index + 6]

                prediction_to_append = [class_id, conf, ((box_left, box_top), (box_right, box_bottom))]
                predictions.append(prediction_to_append)
    except:
        log.error('An arror occurred while trying to make predictions:', sys.exc_info()[0])

    return predictions

The same code works as expected with other provided SSD MobileNet V models.

At this point, I don't know what is the issue - is the graph frozen incorrectly (using TensorFlow Object Detection API) or is the problem caused by OpenVINO Model Optimizer.

I would really appreciate if anyone helped to solve this issue.

Shubha_R_Intel
Employee
1,369 Views

Dear Gamulin, Niko:

Looks like you've resolved this issue already on dldt github here:

https://github.com/opencv/dldt/issues/105

Thanks for using OpenVino !

Shubha

Reply