Fail to create SSD engine

Hello,

I’m trying to deploy all models available on TLT on DeepStream SDK.
I’ve already built the TensorRT OSS plugins, and have successfully tested a RetinaNet engine trained in my dataset (which has only one class).

Now I’m trying to deploy a SSD model, trained on the same dataset. I have no trouble training and exporting the model to an .etlt file. However, when I try to run it on DeepStream, the conversion process fails.

I’m using the following command for the conversion:

./tlt-converter $HOME/deepstream_tlt_apps/ssd.etlt -k $KEY -d3,544,960

And receiving the following output

[INFO] 
[INFO] --------------- Layers running on DLA: 
[INFO] 
[INFO] --------------- Layers running on GPU: 
[INFO] conv1/convolution + re_lu_1/Relu, expanded_conv_depthwise/depthwise + expanded_conv_relu/Relu, expanded_conv_project/convolution, block_1_expand/convolution + re_lu_2/Relu, block_1_depthwise/depthwise + block_1_relu/Relu, block_1_project/convolution, block_2_expand/convolution + re_lu_3/Relu, block_2_depthwise/depthwise + block_2_relu/Relu, block_2_project/convolution, block_2_projected_inputs/convolution + block_2_add/add, block_3_expand/convolution + re_lu_4/Relu, block_3_depthwise/depthwise + block_3_relu/Relu, block_3_project/convolution, block_4_expand/convolution + re_lu_5/Relu, block_4_depthwise/depthwise + block_4_relu/Relu, block_4_project/convolution, block_4_projected_inputs/convolution + block_4_add/add, block_5_expand/convolution + re_lu_6/Relu, block_5_depthwise/depthwise + block_5_relu/Relu, block_5_project/convolution, block_5_projected_inputs/convolution + block_5_add/add, block_6_expand/convolution + re_lu_7/Relu, ssd_conf_0/convolution, block_6_depthwise/depthwise + block_6_relu/Relu, ssd_loc_0/convolution, ssd_anchor_0/Const, block_6_project/convolution, FirstDimTile_0, block_7_expand/convolution + re_lu_8/Relu, block_7_depthwise/depthwise + block_7_relu/Relu, block_7_project/convolution, block_7_projected_inputs/convolution + block_7_add/add, block_8_expand/convolution + re_lu_9/Relu, block_8_depthwise/depthwise + block_8_relu/Relu, block_8_project/convolution, block_8_projected_inputs/convolution + block_8_add/add, block_9_expand/convolution + re_lu_10/Relu, block_9_depthwise/depthwise + block_9_relu/Relu, block_9_project/convolution, block_9_projected_inputs/convolution + block_9_add/add, block_10_expand/convolution + re_lu_11/Relu, block_10_depthwise/depthwise + block_10_relu/Relu, block_10_project/convolution, block_11_expand/convolution + re_lu_12/Relu, block_11_depthwise/depthwise + block_11_relu/Relu, block_11_project/convolution, block_11_projected_inputs/convolution + block_11_add/add, block_12_expand/convolution + re_lu_13/Relu, block_12_depthwise/depthwise + block_12_relu/Relu, block_12_project/convolution, block_12_projected_inputs/convolution + block_12_add/add, ssd_conf_1/convolution, ssd_expand_block_1_conv_0/convolution + ssd_expand_block_1_relu_0/Relu, ssd_loc_1/convolution, ssd_anchor_1/Const, ssd_expand_block_1_conv_1/convolution + ssd_expand_block_1_relu_1/Relu, FirstDimTile_1, ssd_conf_2/convolution, ssd_expand_block_2_conv_0/convolution + ssd_expand_block_2_relu_0/Relu, ssd_loc_2/convolution, ssd_anchor_2/Const, ssd_expand_block_2_conv_1/convolution + ssd_expand_block_2_relu_1/Relu, FirstDimTile_2, ssd_conf_3/convolution, ssd_expand_block_3_conv_0/convolution + ssd_expand_block_3_relu_0/Relu, ssd_loc_3/convolution, ssd_anchor_3/Const, ssd_expand_block_3_conv_1/convolution + ssd_expand_block_3_relu_1/Relu, FirstDimTile_3, ssd_conf_4/convolution, ssd_expand_block_4_conv_0/convolution + ssd_expand_block_4_relu_0/Relu, ssd_loc_4/convolution, ssd_anchor_4/Const, ssd_expand_block_4_conv_1/convolution + ssd_expand_block_4_relu_1/Relu, FirstDimTile_4, ssd_conf_5/convolution, ssd_loc_5/convolution, ssd_anchor_5/Const, FirstDimTile_5, anchor_reshape_0/Reshape, anchor_reshape_1/Reshape, anchor_reshape_2/Reshape, anchor_reshape_3/Reshape, anchor_reshape_4/Reshape, anchor_reshape_5/Reshape, anchor_reshape/Reshape + anchor_permute/transpose + (Unnamed Layer* 726) [Shuffle], anchor_data/Reshape, permute_14/transpose + (Unnamed Layer* 735) [Shuffle] + loc_reshape_0/Reshape, permute_16/transpose + (Unnamed Layer* 744) [Shuffle] + loc_reshape_1/Reshape, permute_18/transpose + (Unnamed Layer* 753) [Shuffle] + loc_reshape_2/Reshape, permute_20/transpose + (Unnamed Layer* 762) [Shuffle] + loc_reshape_3/Reshape, permute_22/transpose + (Unnamed Layer* 771) [Shuffle] + loc_reshape_4/Reshape, permute_24/transpose + (Unnamed Layer* 780) [Shuffle] + loc_reshape_5/Reshape, loc_data/Reshape, permute_13/transpose + (Unnamed Layer* 801) [Shuffle] + conf_reshape_0/Reshape, permute_15/transpose + (Unnamed Layer* 814) [Shuffle] + conf_reshape_1/Reshape, permute_17/transpose + (Unnamed Layer* 827) [Shuffle] + conf_reshape_2/Reshape, permute_19/transpose + (Unnamed Layer* 840) [Shuffle] + conf_reshape_3/Reshape, permute_21/transpose + (Unnamed Layer* 853) [Shuffle] + conf_reshape_4/Reshape, permute_23/transpose + (Unnamed Layer* 866) [Shuffle] + conf_reshape_5/Reshape, NMS, 
[INFO] Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.
[INFO] Detected 1 inputs and 2 output network tensors.
#assertion/home/rmclabs/trt_oss/TensorRT/plugin/nmsPlugin/nmsPlugin.cpp,246

Inspecting the nmsplugin.cpp code, I find the error is in the following assertion:

ASSERT(numPriors * numLocClasses * nbBoxCoordinates == inputDims[param.inputOrder[0]].d[0]);

What could be going wrong? Is it because of the change of class numbers?
Here’s my training spec file, if it helps:

Thanks!

Can you change above according to the width/height in your training spec?

Yes, it was a mismatch between the training data and the deployment dimensions.

Thanks!