From 2ceabd0274a4767feffeff0d20d1c2ba4921359f Mon Sep 17 00:00:00 2001 From: hanrui1sensetime <83800577+hanrui1sensetime@users.noreply.github.com> Date: Tue, 31 Jan 2023 14:36:17 +0800 Subject: [PATCH] [Enhancement] Add 320x320 static config for tensorrt (#1689) * add trt static 320 config for rtmdet * only add on detection folder --- .../detection_tensorrt-fp16_static-320x320.py | 14 ++++++++++++++ .../detection_tensorrt-int8_static-320x320.py | 14 ++++++++++++++ .../detection/detection_tensorrt_static-320x320.py | 14 ++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 configs/mmdet/detection/detection_tensorrt-fp16_static-320x320.py create mode 100644 configs/mmdet/detection/detection_tensorrt-int8_static-320x320.py create mode 100644 configs/mmdet/detection/detection_tensorrt_static-320x320.py diff --git a/configs/mmdet/detection/detection_tensorrt-fp16_static-320x320.py b/configs/mmdet/detection/detection_tensorrt-fp16_static-320x320.py new file mode 100644 index 0000000000..d03fa8be2f --- /dev/null +++ b/configs/mmdet/detection/detection_tensorrt-fp16_static-320x320.py @@ -0,0 +1,14 @@ +_base_ = ['../_base_/base_static.py', '../../_base_/backends/tensorrt-fp16.py'] + +onnx_config = dict(input_shape=(320, 320)) + +backend_config = dict( + common_config=dict(max_workspace_size=1 << 30), + model_inputs=[ + dict( + input_shapes=dict( + input=dict( + min_shape=[1, 3, 320, 320], + opt_shape=[1, 3, 320, 320], + max_shape=[1, 3, 320, 320]))) + ]) diff --git a/configs/mmdet/detection/detection_tensorrt-int8_static-320x320.py b/configs/mmdet/detection/detection_tensorrt-int8_static-320x320.py new file mode 100644 index 0000000000..978dcef1f6 --- /dev/null +++ b/configs/mmdet/detection/detection_tensorrt-int8_static-320x320.py @@ -0,0 +1,14 @@ +_base_ = ['../_base_/base_static.py', '../../_base_/backends/tensorrt-int8.py'] + +onnx_config = dict(input_shape=(320, 320)) + +backend_config = dict( + common_config=dict(max_workspace_size=1 << 30), + model_inputs=[ + dict( + input_shapes=dict( + input=dict( + min_shape=[1, 3, 320, 320], + opt_shape=[1, 3, 320, 320], + max_shape=[1, 3, 320, 320]))) + ]) diff --git a/configs/mmdet/detection/detection_tensorrt_static-320x320.py b/configs/mmdet/detection/detection_tensorrt_static-320x320.py new file mode 100644 index 0000000000..5c58d0ddc0 --- /dev/null +++ b/configs/mmdet/detection/detection_tensorrt_static-320x320.py @@ -0,0 +1,14 @@ +_base_ = ['../_base_/base_static.py', '../../_base_/backends/tensorrt.py'] + +onnx_config = dict(input_shape=(320, 320)) + +backend_config = dict( + common_config=dict(max_workspace_size=1 << 30), + model_inputs=[ + dict( + input_shapes=dict( + input=dict( + min_shape=[1, 3, 320, 320], + opt_shape=[1, 3, 320, 320], + max_shape=[1, 3, 320, 320]))) + ])