Onnx to tensorrt plugin for NonMaxSuppression

Description

I want to optimize my object detection algorithm using Tensorrt.
my algorithm written in tf2. i try many ways but all was unsuccessful
finally i convert my model to onnx…
and now i have no idea about writing NonMaxSuppression plugin for it!!!

Environment

TensorRT Version : 7.0
GPU Type : 930M
Nvidia Driver Version : 440
CUDA Version : 10.2
CUDNN Version : 7.6.5
Operating System + Version : ubuntu 18.04
Python Version (if applicable) : 3.7
TensorFlow Version (if applicable) :2.1

Steps To Reproduce

‫‪./trtexec‬‬ ‫‪–explicitBatch‬‬ ‫‪–onnx=in.onnx‬‬ ‫‪–workspace=1024‬‬ ‫=‪–saveEngine‬‬ ‫‪out.trt‬‬
No importer registered for op: NonMaxSuppression

Hi,

“NonMaxSuppression” is currently not supported in ONNX parser.
Please refer to below link:

You need to create a custom plugin for any supported layer in your model. Please refer to below samples:


Custom plugin for ONNX:

Thanks

2 Likes