The h5 of mask-rcnn is successfully converted to uff, but the result of uff is very different from h5


according to sampleUffMaskRCNN/, I successfully converted h5 to uff, and the executable files of sampleUffMask and trtexec can load the uff file correctly。
Then I use opencv to load my own test image, the code is as follows:

//The following code replaces the func of readPPMFile
auto img_bgr = cv::imread(filename);
cv::Mat img_rgb = img_bgr;
cv::cvtColor(img_bgr, img_rgb, cv::COLOR_BGR2RGB);
ppm.fileName = filename;
ppm.magic = "P6";
ppm.max = 255;
ppm.h = img_rgb.rows;
ppm.w = img_bgr.cols;
ppm.buffer.assign(, + * img_rgb.channels());

But i didn’t get any output…, I checked the original h5 with the same image and got it right
I also used mask_rcnn_coco.h5 mentioned in, the output of the converted uff is consistent with the output mentioned in

My h5 model is trained on my own dataset based on the , and has not changed other than the dataset and marcnn/

Is there any way for me to determine where the problem is or is there any special settings I need to operate?


TensorRT Version: TensorRT-
GPU Type: rtx 2080ti
Nvidia Driver Version: NVRM version: NVIDIA UNIX x86_64 Kernel Module 455.38 Thu Oct 22 06:06:59 UTC 2020
CUDA Version: 10.2 with patch 10.2.1 and 10.2.2
CUDNN Version:
Operating System + Version: ubuntu 18.04
Baremetal or Container (if container which image + tag):

Hi, UFF and Caffe Parser have been deprecated from TensorRT 7 onwards, hence request you to try ONNX parser.

Please check the below link for the same.