It's a personal backup repository, but I will try my best to help you understand how to use them.
Now it contains: | Plugins | Support |
---|---|---|
DCNv2 | pytorch1.5+/tensorrt7 | |
yolov5 detection | tensorrt7/tensorrt8 |
Models | Support |
---|---|
mobilenetv3-centernet | pytorch1.5+/tensorrt7 |
yolov5 (integrated with detection and nms) | tensorrt7/tensorrt8 |
cd pytorch
python setup.py install --user(optioanl)
cd ../examples
python
from dcn_v2_wrapper import DeformableConv2DLayer as DCN
Copy plugin folders from tensorrt
to NVIDIA/TensorRT/plugin
Add relative head file and initializePlugin() to InferPlugin.cpp at proper place, for example
#include "dcnv2Plugin.h"
#include "yoloPlugin.h"
initializePlugin<nvinfer1::plugin::DCNv2PluginCreator>(logger, libNamespace);
initializePlugin<nvinfer1::plugin::YoloPluginCreator>(logger, libNamespace);
Add name of plugin folder to PLUGIN_LISTS
in CMakeLists.txt
Build and use libnvinfer_plugin.so
following offical introduction.
There are two pytorch2tensorrt transfer scripts in examples
to show how these plugins work.
cd examples
python mbv3_centernet_trt7.py
The evaluation output is as follow which are mean values of hm
, wh
, reg