Hi,
Currently I am trying to implement S^3FD face detector on TensorRT 4.0.1.6.
Which is based on SSD detector, but I don’t want to parse from caffe prototxt file and trying to import the weight and build network native in tensorrt.
Now I have some problem about the last layer - detection_out.
Creation of network is ok but during enqueue to context a quest, TensorRT died without any error messaage. And Jupyter notebook kernel died.
I want to use Nvidia plugin layer created by
TENSORRTAPI INvPlugin * createSSDDetectionOutputPlugin(DetectionOutputParameters param)
I created the param structure like:
const char* createDetectionOutputPlugin(const char* name_c) {
DetectionOutputParameters param = {
true, false, 0, 2, 5000, 750, float(0.05), float(0.3), CodeTypeSSD::CENTER_SIZE,
{0, 1, 2}, true, false
};
IPlugin *ptr = createSSDDetectionOutputPlugin(param);
return insertPlugin(name_c, ptr);
}
The input is mbox_loc, mbox_conf_flat, mbox_priorbox in right order.
Their output shape is like: (input image is at 1024 * 768)
mbox_loc: (263340, 1, 1)
mbox_conf_flat: (131670, 1, 1)
mbox_priorbox: (2, 263340, 1)
This shape is without batch N, and in DimsCHW format. I am not sure whether this is acceptable by detection output plugin.
PS1. the output shapes in caffe of these three layers are (1, 263340), (1, 131670), (1, 2, 263340), at least the number is correct. So I guess it is a problem of shape dimension order.
PS2. It should be the problem with DetectionOutput plugin, because I have tried erase this layer only and everything works fine during execution.
PS3. I have checked samples and in sampleUffSSD sample the network was converted from tensorflow and parse from UFF. I actually generate the plugin in the same way but didn’t work.
Any advice will be appreciated!