Anchor box generation for Resnet-SSD


I am trying to implement SSD on TensorRT 5.0 with Resnet as backbone network for feature extraction. Since the model implementation is in Tensorflow, I had to use UFF converter with a preprocessor , for conversion. The sample example by nvidia on Inception SSD was taken as reference for the same and the was modified in order to handle the changes in the network.

However I am stuck at the SSD Prior box implementation. Here are some of my questions:

  1. How is GridAnchoGenerator plugin different from PriorBox Plugin ? Which one should be used with SSD?

  2. In my current implementation I have used PriorBox Plugin with 6 intermediate feature maps in order to generate the anchor boxes and while parsing the network , I am getting the following error :

priorBoxPlugin.cpp:91: virtual nvinfer1::Dims nvinfer1::plugin::PriorBox::getOutputDimensions(int, const nvinfer1::Dims*, int): Assertion `nbInputDims == 2’ failed

Any help on the topic would be very useful. Thanks in advance.

I was not sure of usage of prior box and whether they would exactly match with tensor flow.

GridAnchoGenerator plugin
: This is a plugin of tensorrt and tensorflow that gives anchors that match to Google’s SSD inception model.
multiscale_grid_anchor_generator :This is plugin in tensorflow that gives anchors that match to Google’s SSD resnet model. This is not available in Tensorrt

so i did the following

  1. write a custom layer that generates the plugin boxes for ssd - resnet.
    a) specify it in config file
    b) debug tensor flow and understand the code
    c) write a CUDA code to support it