TensorRT: Model conversion from h5 to UFF in samples/sampleUffMaskRCNN/converted causes an "IndexError: list index out of range" exception
Description
When I ran Mask R-CNN conversion from h5 to uff exactly as described in samples/sampleUffMaskRCNN/README.md, the conversion always ends up with “IndexError: list index out of range” exception
Environment
TensorRT Version: 7.0.0.11 GPU Type: GeForce GT 710 Nvidia Driver Version: 440.33.01 CUDA Version: 10.2.89 CUDNN Version: 7.6.5.32-1+cuda10.2 amd64 Operating System + Version: Ubuntu 18.04-3 LTS, amd64 Python Version (if applicable): 3.6.9 TensorFlow Version (if applicable): Tensorflow-gpu 1.14.0 PyTorch Version (if applicable): N/A Baremetal or Container (if container which image + tag): N/A UFF: 0.6.5 Keras: 2.1.3
Relevant Files
https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/sampleUffMaskRCNN
Steps To Reproduce
-
Follow through the steps 1-7 from Section ‘Prerequisites’ of https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/sampleUffMaskRCNN/README.md
-
Step 7 ‘Convert the h5 model to the UFF model and place it into your
/data
folder’ ends up with an exception, please see the whole output attached. output.txt -
The conversion crashes in attempt to convert frozen graph (temp.pb) to UFF in file uff/converters/tensorflow/converter_function.py, line 40:
38: @tf2uff.register(["Add"])
39: def convert_add(name, tf_node, inputs, uff_graph, **kwargs):
40: uff_graph.binary(inputs[0], inputs[1], 'add', name)
41: return [tf2uff.split_node_name_and_output(inp)[0] for inp in inputs]
Here is backtrace info from the debugger:
name = {str} 'mrcnn_mask/add'
tf_node = {NodeDef} name: "mrcnn_mask/add"\nop: "Add"\ninput: "mrcnn_mask/transpose_1"\nattr {\n key: "T"\n value {\n type: DT_FLOAT\n }\n}\n
uff_graph = {Graph} <uff.model.graph.Graph object at 0x7ff47c2bda20>uff_graph = {Graph} <uff.model.graph.Graph object at 0x7ff47c2bda20>
__exception__ = {tuple: 3} (<class 'IndexError'>, IndexError('list index out of range',), <traceback object at 0x7ff47c770e88>)
inputs = {list: 1} ['mrcnn_mask/transpose_1']
kwargs = {dict: 1} {'tf_nodes': {'input_image': name: "input_image"\nop: "Placeholder"\nattr {\n key: "dtype"\n value {\n type: DT_FLOAT\n }\n}\nattr {\n key: "shape"\n value {\n shape {\n dim {\n size: -1\n }\n dim {\n size: 3\n }\n dim {\n size: 1024\n }\n dim {\n size: 1024\n }\n }\n }\n}\n, 'zero_padding2d_1/Pad/paddings': name: "zero_padding2d_1/Pad/paddings"\nop: "Const"\nattr {\n key: "dtype"\n value {\n type: DT_INT32\n }\n}\nattr {\n key: "value"\n value {\n tensor {\n dtype: DT_INT32\n tensor_shape {\n dim {\n size: 4\n }\n dim {\n size: 2\n }\n }\n tensor_content: "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\000\000\000\003\000\000\000\003\000\000\000\003\000\000\000"\n }\n }\n}\n, 'zero_padding2d_1/Pad': name: "zero_padding2d_1/Pad"\nop: "Pad"\ninput: "input_image"\ninput: "zero_padding2d_1/Pad/paddings"\nattr {\n key: "T"\n value {\n type: DT_FLOAT\n }\n}\nattr...
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (1 by maintainers)
Please try the updated instructions from: https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/sampleUffMaskRCNN#generating-uff-model