convert uff error -- KeyError: 'image_tensor'

Hi everyone. I want to modify sampleUffSSD to run inference on video and the model I want to use is ssd_mobilenet_v1.

I download ssd_mobilenet_v1_coco_2018_01_28. And run this command.

python3 /usr/lib/python3.6/dist-packages/uff/bin/convert_to_uff.py --input-file frozen_inference_graph.pb -O NMS -p config.py

But there is error

Loading frozen_inference_graph.pb
WARNING:tensorflow:From /usr/lib/python3.6/dist-packages/uff/converters/tensorflow/conversion_helpers.py:185: FastGFile.__init__ (from tensorflow.python.platform.gfile) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.gfile.GFile.
WARNING: To create TensorRT plugin nodes, please use the `create_plugin_node` function instead.
WARNING: To create TensorRT plugin nodes, please use the `create_plugin_node` function instead.
UFF Version 0.5.5
=== Automatically deduced input nodes ===
[name: "Input"
op: "Placeholder"
input: "image_tensor:0"
attr {
  key: "dtype"
  value {
    type: DT_FLOAT
  }
}
attr {
  key: "shape"
  value {
    shape {
      dim {
        size: 1
      }
      dim {
        size: 3
      }
      dim {
        size: 1080
      }
      dim {
        size: 1920
      }
    }
  }
}
]
=========================================

Using output node NMS
Converting to UFF graph
Warning: No conversion function registered for layer: NMS_TRT yet.
Converting NMS as custom op: NMS_TRT
Warning: No conversion function registered for layer: FlattenConcat_TRT yet.
Converting concat_box_conf as custom op: FlattenConcat_TRT
Traceback (most recent call last):
  File "/usr/lib/python3.6/dist-packages/uff/bin/convert_to_uff.py", line 93, in <module>
    main()
  File "/usr/lib/python3.6/dist-packages/uff/bin/convert_to_uff.py", line 89, in main
    debug_mode=args.debug
  File "/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 187, in from_tensorflow_frozen_model
    return from_tensorflow(graphdef, output_nodes, preprocessor, **kwargs)
  File "/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 157, in from_tensorflow
    debug_mode=debug_mode)
  File "/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/converter.py", line 94, in convert_tf2uff_graph
    uff_graph, input_replacements, debug_mode=debug_mode)
  File "/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/converter.py", line 72, in convert_tf2uff_node
    inp_node = tf_nodes[inp_name]
KeyError: 'image_tensor'

I’m using TensorRT 5.0.6, jetpack 4.2.0.

I saw a post https://devtalk.nvidia.com/default/topic/1025246/jetson-tx2/where-is-convert-to-uff/1
But I also don’t know how to download latest model.

Is there any solution?

Thanks in advance.

Hi,

Please refer to the below dev talk link:
https://devtalk.nvidia.com/default/topic/1030508/jetson-tx2-tensorflow-tensorrt-workflow/

Thanks

Hi SunilJB. Thank you for your reply. It turns out I did miss something in the post I sent.

I downloaded 2017 version and use convert-to-uff.py to translate the model.