Cannot convert model objectDetector_SSD to TensorRT

I follow the instruction in the README file in objectDetector_SSD.

I’ve installed tensorflow-gpu and all the items as per the README. But I cannot convert the graph to UFF as per the instruction

# I change python to python3, /usr/lib/python2.7 to /usr/lib/python3.6
python3 /usr/lib/python3.6/dist-packages/uff/bin/convert_to_uff.py \
         frozen_inference_graph.pb -O NMS \
         -p /usr/src/tensorrt/samples/sampleUffSSD/config.py \
         -o sample_ssd_relu6.uff

The output as follow

> python3 /usr/lib/python3.6/dist-packages/uff/bin/convert_to_uff.py frozen_inference_graph.pb -O NMS -p /usr/src/tensorrt/samples/sampleUffSSD/config.py -o sample_ssd_relu6.uff
Traceback (most recent call last):
  File "/usr/lib/python3.6/dist-packages/uff/bin/../../uff/converters/tensorflow/converter.py", line 19, in <module>
    import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/dist-packages/uff/bin/convert_to_uff.py", line 18, in <module>
    import uff
  File "/usr/lib/python3.6/dist-packages/uff/bin/../../uff/__init__.py", line 2, in <module>
    from uff.converters.tensorflow.conversion_helpers import from_tensorflow  # noqa
  File "/usr/lib/python3.6/dist-packages/uff/bin/../../uff/converters/tensorflow/conversion_helpers.py", line 12, in <module>
    from .converter_functions import *  # noqa
  File "/usr/lib/python3.6/dist-packages/uff/bin/../../uff/converters/tensorflow/converter_functions.py", line 12, in <module>
    from uff.converters.tensorflow.converter import TensorFlowToUFFConverter as tf2uff
  File "/usr/lib/python3.6/dist-packages/uff/bin/../../uff/converters/tensorflow/converter.py", line 24, in <module>
    https://www.tensorflow.org/install/""".format(err))
ImportError: ERROR: Failed to import module (No module named 'tensorflow')
Please make sure you have TensorFlow installed.
For installation instructions, see:
https://www.tensorflow.org/install/

Do I need to install tensorflow seperately?

Please help!

Hi,

tensorflow-gpu should be enough for ‘import tensorflow’.

Would you mind to reinstall the TensorFlow package again?
It looks like the package is somehow not well installed.
https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html

Thanks.

@AastaLLL: Thank you for your reply.

I reinstalled the tensorflow-gpu, it now can load the tensorflow, however, now it said

ImportError: cannot import name 'GraphDef'

Thank you for your help

Hi,

Are you using TensorFlow v2.0?
Please noticed that TFv2.0 support is added from the TRTv7.1, which is not available for Jetson yet.

You will need to use the TF v1.1x package instead.
Thanks.