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:
# Supported ONNX Operators
TensorRT 7.0 supports operators up to Opset 11. Latest information of ONNX operators can be found [here](https://github.com/onnx/onnx/blob/master/docs/Operators.md)
TensorRT supports the following ONNX data types: FLOAT32, FLOAT16, INT8, and BOOL
\*There is limited support for INT32 and INT64 types. TensorRT will attempt to cast down INT64 to INT32 where possible. If not possible, TensorRT will throw an error. See the [TensorRT layer support matrix](https://docs.nvidia.com/deeplearning/sdk/tensorrt-support-matrix/index.html#layers-precision-matrix) for more information on data type support.
## Operator Support Matrix
| Operator | Supported? | Restrictions |
|-----------------------|------------|----------------------------------------------------------------------------------------------------------------------------------------|
| Abs | Y |
| Acos | Y |
| Acosh | Y |
| Add | Y |
| And | Y |
| ArgMax | Y |
| ArgMin | Y |
| Asin | Y |
This file has been truncated. show original
You need to create a custom plugin for any supported layer in your model. Please refer to below samples:
# nmsPlugin
**Table Of Contents**
- [Description](#description)
* [Structure](#structure)
- [Parameters](#parameters)
* [`CodeType`](#codetype)
* [`CodeTypeSSD::CORNER`](#codetypessd_corner)
* [`CodeTypeSSD::CENTER_SIZE`](#codetypessdcenter_size)
* [`CodeTypeSSD::CORNER_SIZE`](#codetypessdcorner_size)
* [`CodeTypeSSD::TF_CENTER`](#codetypessdtf_center)
* [`inputOrder`](#inputorder)
- [Additional resources](#additional-resources)
- [License](#license)
- [Changelog](#changelog)
- [Known issues](#known-issues)
## Description
The `nmsPlugin`, similar to the `batchedNMSPlugin`, implements a `non_max_suppression` (NMS) operation over bounding boxes for object detection networks. This plugin is included in TensorRT and used in [sampleSSD](https://docs.nvidia.com/deeplearning/sdk/tensorrt-sample-support-guide/index.html#sample_ssd) and [uff_ssd](https://docs.nvidia.com/deeplearning/sdk/tensorrt-sample-support-guide/index.html#uff_ssd) to run SSD.
This file has been truncated. show original
Custom plugin for ONNX:
https://github.com/NVIDIA/TensorRT/issues/6#issuecomment-603683069
Thanks
2 Likes