DCNv2 dnn plugin: getOutputDimensions gives only first input dimension instead of array of input dimension

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.9.1.10844
other

Host Machine Version
native Ubuntu 18.04
other

Hi, i need help to implement custom dnn plugin for DCNv2.

Firstly, i want to confirm that weight and bias would be included as an inputs right?
e.g. if my layer has 3 inputs (input, offset, mask) then _dwDNNPlugin_getOutputDimensions would gives 5x input dimension (input, offset, mask, weight, bias) as parameter const dwBlobSize * inputDimensions.

Currently i want to implement DCNv2 plugin to convert onnx model to tensorrt model. I need to get weight dimension to compute output dimension. I try to get the weight dimensions from inputs[3] but it seems that inputs[0] is the only correct dimension and inputs[1~4] give wrong dimension.

Expected values:

input #0 dimension: 1 512 14 25      // input
input #1 dimension: 1, 18, 14, 25    // offset
input #2 dimension: 1, 9, 14, 25     // mask
input #3 dimension: 256, 512, 3, 3   // weight
input #4 dimension: 256              // bias

Obtained values:

input #0 dimension: 1 512 14 25
input #1 dimension: 0 0 0 0
input #2 dimension: 128 0 2716860161 32759
input #3 dimension: 1110023088 32765 2720397152 32759
input #4 dimension: 2720379552 32759 2961882512 21907

Here is files to reproduce:
sample_dcnv2_plugin.zip (37.2 KB)
cf_img.onnx (77.1 MB)

Thank you

Dear @user142014,
My apologies for late response. Does this issue still need support?

Yes, urgently need your help @SivaRamaKrishnaNV

Hey, any update?

Dear @user142014,
Could you check print in each function and provide output to see workflow when trying to run the model. Do you see the expected input buffer values in enqueue function?
Did you check the model with TRT ?

Dear @user142014,

  1. The inputs of this layer are 5, and input 0/1/2 are from upper layer, but the 3/4 are from const layer, one is weights [64x64x3x3], another is bias [64] which is same dim as output normally
  2. The output is 1
  3. The deserializeFromBuffer should be implemented, they are used to load the layer, but the deserializeFromWeights could be removed.

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