Closed pra-dan closed 3 years ago
@ttyio @Tyler-D Can you guys please look into this ? I can dive deeper into this problem but can't debug this. I tried printing inputs[0].nDims
using printf()
but nothing gets printed on the console.
Did you change the num_classes
here ?https://github.com/NVIDIA/TensorRT/blob/master/samples/sampleUffMaskRCNN/converted/config.py#L26 .
You can check your .uff
model in txt by setting this parameter to True: https://github.com/NVIDIA/TensorRT/blob/master/samples/sampleUffMaskRCNN/converted/mrcnn_to_trt_single.py#L154
Referring to this
You can check your .uff model in txt by setting this parameter to True: https://github.com/NVIDIA/TensorRT/blob/master/samples/sampleUffMaskRCNN/converted/mrcnn_to_trt_single.py#L154
I tried this but didn't see any extra file getting saved, other than the .pbtxt
and uff
You can use txt editor to open .pbtxt, and search the DetectionLayer_TRT
to check the parameter of this plugin.
I don't know why you cannot print the message in the c++ sample. Maybe you could compile it with debug flag.
Thanks for the tip tyler. It worked. I think I was missing changing num_classes
in this config.py. I had already changed it in mrcnn/config.py
and thought it was enough.
Also, the .pbtxt
is helpful and as an alternative to that, I could also use netron to search for the layer. I got the hint about the layer name in the docs for plugins: https://github.com/NVIDIA/TensorRT/plugin/
.
Throughout this experiment, I used the GPU-enabled Google Colab ipython notebook with NVIDIA TESLA.
I am trying to optimise my custom Mask-RCNN model (
.h5
) using TensorRT 8.0.0.3I successfully converted my custom model (with 4 classes) to Uff.
For running inference, I compile the given
sample_uff_maskRCNN
by simply altering its config file and replacingI also replace the sample uff file with mine but with the same name.
On running I get:
As per the error, the following assertion fails. I can't understand how to debug this.
https://github.com/NVIDIA/TensorRT/blob/c2668947ea9ba4c73eb1182c162101f09ff250fd/plugin/detectionLayerPlugin/detectionLayerPlugin.cpp#L254