Getting error while converting model from h5 to uff during segmentation using tensor rt

Description

I have a Jetson Xavier NX. I am trying to run instan ce segmentation using tensor rt . However, I am getting the rror as shown below. I am following he exact instructions as shown in the github readme of the same. I want to run instance segmentation on the coco dataset. I have installed all the necesasry modules . I am unsure why it is not able to convert the model

Environment

GPU Type: Jetson Xavier NX GPU
Nvidia Driver Version: -
CUDA Version: 10.2.89
CUDNN Version: 8.0.0
Operating System + Version: Ubuntu 18.04 LTS
Python Version (if applicable): 3.6.9
TensorFlow Version (if applicable): 1.15.4
PyTorch Version (if applicable): -
Baremetal or Container (if container which image + tag): -

Relevant Files

https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/sampleUffMaskRCNN

Steps To Reproduce

Followed the steps as mentioned in Segmentation using Tensor RT

Please include:
This is the error
Traceback (most recent call last):
File “mrcnn_to_trt_single.py”, line 164, in
main()
File “mrcnn_to_trt_single.py”, line 113, in main
model = modellib.MaskRCNN(mode=“inference”, model_dir=LOG_DIR, config=config).keras_model
File “/usr/local/lib/python3.6/dist-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py”, line 1837, in init
File “/usr/local/lib/python3.6/dist-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py”, line 1901, in build
File “/usr/local/lib/python3.6/dist-packages/mask_rcnn-2.1-py3.6.egg/mrcnn/model.py”, line 180, in resnet_graph
File “/home/nvidia/.local/lib/python3.6/site-packages/keras/engine/topology.py”, line 590, in call
self.build(input_shapes[0])
File “/home/nvidia/.local/lib/python3.6/site-packages/keras/layers/convolutional.py”, line 129, in build
raise ValueError('The channel dimension of the inputs ’
ValueError: The channel dimension of the inputs should be defined. Found None.

Hi,

uff requires the model to be TensorFlow v1.15.x format.
Which TensorFlow version do you use?

Thanks.

I am using 1.15.4 . Is there some problem with the config file?

Hi,

Have you followed the same procedure mentioned here?
This is essential for converting the model into TensorRT.

We have verifed the GitHub on Jetson before.
It should work good if all the steps are applied.

Thanks.

Yes I have. I am getting the error when I run the model conversion step

Thanks.

We are checking this internally.
Will update more information with you later.

Hi,

Could you double check if you applied the steps correctly?

We have veried the sample on Xavier NX with JetPack 4.5.1 + TensorFlow 1.15.x.
mrcnn_to_trt_single.py can work correctly without the error you met.

Thanks.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.