Search code examples
tensorrtuffmask-rcnn

Performance drop when converting Mask RCNN to uff format


My goal is to deploy a Mask RCNN model trained with the well known Matterport's repo with Nvidia deepstream.

To do so, first I have to convert the generated .h5 model into a .uff. This operation is decribed here.

After the conversion, I have run the generated .uff model with TensoRT and deepstream and it has a very poor performance compared to the .h5model (almost never detects/masks the objects).

Before the conversion, I have done the corresponding changes to handle NCWH models and configured the number of classes and backbone (in this case resnet50).

I don't know how to continue. Any advice could really healp me. Thanks!


Solution

  • To solve the problem one must use the same configuration for the training and the conversion.

    In particular, since most of models start from tranfering learning from the pretrained coco model, one has to use its very same config.

    In adition, the input images sizes have to be coherent with the trainning configuration.