[Refactor] Refactor config v1 (#80)
* [Refactor] Refactor configs according to new standard (#67) * modify cfg and cfg_util * modify tensorrt config * fix bug * lint * Fix 1. Delete print 2. Modify the return value from "False, None" to "None" and related code 3. Rename 2 get functions * modify apply_marks * [Feature] Refactor ocr config (#71) * add text detection config refactor * add text recognition refactor * add static exporting for mmocr * fix lint * set max space in child config * use Sequence[int] instead * add assert input_shape * fix static bug and add ppl ort and trt static (#77) * [Feature] Refine setup.py (#61) * add setup.py and related files * lint * Edit requirements * modify onnx version * modify according to comments * [Refactor] Refactor mmseg configs (#73) * refactor mmseg config * change create_input * fix lint * fix lint * fix lint * fix yapf * fix yapf * update export * remove Segmentation * remove tast assert * add onnx_config * remove hardcode * Inherit with static * Remove blank line * Add segmentation task enum * add assert task * mmocr version 0.3.0 (#79) * add dump_info * [Feature]: Refactor config in mmdet (#75) * support onnxruntime * add two stage * test two-stage ort and ppl * update fcos post_params * fix calib * test ok with maskrcnn dynamic * add empty line * add static into config filename * add input_shape to create_input in mmdet * add static to some configs * remove todo codes * remove partition config in base * refactor create_input * rename task name in mmdet * return None if input_shape is None * add size info into mmdet configs filenames * reorganize mmdet configs * add object detection task for mmdet * rename get_mmdet_params * keep naming style consistent * update post_params for fcos * fix typo in ncnn config * [Refactor] Refactor mmedit static config (#78) * add static cfg * update create_input * [Refactor]: Refactor mmcls configs (#74) * refactor mmcls2.0 * fix classify_tensorrt_dynamic.py * fix classify_tensorrt_dynmic.py * classify_tensorrt_dynamic_int8.py * fix file name * fix ncnn ppl * updata prepare_input.py * update utils.py * updata constant.py * add * fix prepare_input.py * fix prepare_input.py * add static config file * add blank lines * fix prepare_input.py(wait test) * fix input_shape(wait test) * Update prepare_input.py * fix classification_tensorrt_dynamic(wait test) * fix classification_tensorrt_dynamic_int8(wait test) * fix classification_tensorrt_static_int8(wait test) * Rename classification_tensorrt_dynamic.py to classification_tensorrt_dynamic-224x224-224x224.py * Rename classification_tensorrt_dynamic_int8.py to classification_tensorrt_dynamic_int8-224x224-224x224.py * Rename classification_tensorrt_dynamic_int8-224x224-224x224.py to classification_tensorrt_int8_dynamic_224x224-224x224.py * Rename classification_tensorrt_dynamic-224x224-224x224.py to classification_tensorrt_dynamic_224x224-224x224.py * Rename classification_tensorrt_static.py to classification_tensorrt_static_224x224.py * Rename classification_tensorrt_static_int8.py to classification_tensorrt_int8_static_224x224.py * Update prepare_input.py * Rename classification_tensorrt_dynamic_224x224-224x224.py to classification_tensorrt_dynamic-224x224-224x224.py * Rename classification_tensorrt_int8_dynamic_224x224-224x224.py to classification_tensorrt_int8-dynamic_224x224-224x224.py * Rename classification_tensorrt_int8-dynamic_224x224-224x224.py to classification_tensorrt_int8_dynamic-224x224-224x224.py * Rename classification_tensorrt_int8_static_224x224.py to classification_tensorrt_int8_static-224x224.py * Rename classification_tensorrt_static_224x224.py to classification_tensorrt_static-224x224.py * Update prepare_input.py * Update prepare_input.py * Update prepare_input.py * Update prepare_input.py * Update prepare_input.py * Update prepare_input.py * Update prepare_input.py * change logging msg Co-authored-by: maningsheng <mnsheng@yeah.net> * fix * fix else branch * fix bug for trt in mmseg * enable dump trt info * fix trt static for mmdet * remove two-stage_partition_tensorrt_static-800x1344 config * fix wrong backend in ppl config * fix partition calibration Co-authored-by: Yifan Zhou <singlezombie@163.com> Co-authored-by: AllentDan <41138331+AllentDan@users.noreply.github.com> Co-authored-by: hanrui1sensetime <83800577+hanrui1sensetime@users.noreply.github.com> Co-authored-by: RunningLeon <maningsheng@sensetime.com> Co-authored-by: VVsssssk <88368822+VVsssssk@users.noreply.github.com> Co-authored-by: maningsheng <mnsheng@yeah.net> Co-authored-by: AllentDan <AllentDan@yeah.net>pull/12/head
parent
aba6ad5da7
commit
4c0b36b7ff
|
@ -0,0 +1 @@
|
|||
include requirements/*.txt
|
|
@ -1,4 +1,4 @@
|
|||
add_definitions(-std=c++11)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
||||
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
|
|
|
@ -1 +1 @@
|
|||
backend = 'ncnn'
|
||||
backend_config = dict(type='ncnn')
|
||||
|
|
|
@ -1 +1 @@
|
|||
backend = 'onnxruntime'
|
||||
backend_config = dict(type='onnxruntime')
|
||||
|
|
|
@ -1 +1 @@
|
|||
backend = 'ppl'
|
||||
backend_config = dict(type='ppl')
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import tensorrt as trt
|
||||
|
||||
backend = 'tensorrt'
|
||||
tensorrt_params = dict(
|
||||
shared_params=dict(fp16_mode=False, log_level=trt.Logger.INFO))
|
||||
backend_config = dict(
|
||||
type='tensorrt',
|
||||
common_config=dict(
|
||||
fp16_mode=False, log_level=trt.Logger.INFO, max_workspace_size=0))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = ['./tensorrt.py']
|
||||
|
||||
create_calib = True
|
||||
calib_params = dict(calib_file='calib_data.h5')
|
||||
tensorrt_params = dict(shared_params=dict(fp16_mode=True, int8_mode=True))
|
||||
backend_config = dict(common_config=dict(fp16_mode=True, int8_mode=True))
|
||||
|
||||
calib_config = dict(create_calib=True, calib_file='calib_data.h5')
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
onnx_config = dict(
|
||||
type='onnx',
|
||||
export_params=True,
|
||||
keep_initializers_as_inputs=False,
|
||||
opset_version=11,
|
||||
save_file='end2end.onnx',
|
||||
input_names=['input'],
|
||||
output_names=['output'],
|
||||
input_shape=None)
|
|
@ -1,5 +0,0 @@
|
|||
pytorch2onnx = dict(
|
||||
export_params=True,
|
||||
keep_initializers_as_inputs=False,
|
||||
opset_version=11,
|
||||
save_file='end2end.onnx')
|
|
@ -1,3 +0,0 @@
|
|||
_base_ = ['../_base_/torch2onnx.py']
|
||||
codebase = 'mmcls'
|
||||
pytorch2onnx = dict(input_names=['input'], output_names=['output'])
|
|
@ -1,11 +0,0 @@
|
|||
_base_ = ['./base.py']
|
||||
pytorch2onnx = dict(dynamic_axes={
|
||||
'input': {
|
||||
0: 'batch',
|
||||
2: 'height',
|
||||
3: 'width'
|
||||
},
|
||||
'output': {
|
||||
0: 'batch'
|
||||
}
|
||||
})
|
|
@ -0,0 +1,13 @@
|
|||
_base_ = ['./classification_static.py']
|
||||
|
||||
onnx_config = dict(
|
||||
dynamic_axes={
|
||||
'input': {
|
||||
0: 'batch',
|
||||
2: 'height',
|
||||
3: 'width'
|
||||
},
|
||||
'output': {
|
||||
0: 'batch'
|
||||
}
|
||||
}, )
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['./classification_dynamic.py', '../_base_/backends/ncnn.py']
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = ['./classification_static.py', '../_base_/backends/ncnn.py']
|
||||
|
||||
onnx_config = dict(input_shape=None)
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['./classification_dynamic.py', '../_base_/backends/onnxruntime.py']
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = ['./classification_static.py', '../_base_/backends/onnxruntime.py']
|
||||
|
||||
onnx_config = dict(input_shape=None)
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['./classification_dynamic.py', '../_base_/backends/ppl.py']
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = ['./classification_static.py', '../_base_/backends/ppl.py']
|
||||
|
||||
onnx_config = dict(input_shape=None)
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = ['../_base_/onnx_config.py']
|
||||
|
||||
codebase_config = dict(type='mmcls', task='Classification')
|
|
@ -0,0 +1,13 @@
|
|||
_base_ = ['./classification_dynamic.py', '../_base_/backends/tensorrt.py']
|
||||
|
||||
onnx_config = dict(input_shape=[224, 224])
|
||||
backend_config = dict(
|
||||
common_config=dict(max_workspace_size=1 << 30),
|
||||
model_inputs=[
|
||||
dict(
|
||||
input_shapes=dict(
|
||||
input=dict(
|
||||
min_shape=[1, 3, 224, 224],
|
||||
opt_shape=[4, 3, 224, 224],
|
||||
max_shape=[64, 3, 224, 224])))
|
||||
])
|
|
@ -0,0 +1,13 @@
|
|||
_base_ = ['./classification_dynamic.py', '../_base_/backends/tensorrt_int8.py']
|
||||
|
||||
onnx_config = dict(input_shape=[224, 224])
|
||||
backend_config = dict(
|
||||
common_config=dict(max_workspace_size=1 << 30),
|
||||
model_inputs=[
|
||||
dict(
|
||||
input_shapes=dict(
|
||||
input=dict(
|
||||
min_shape=[1, 3, 224, 224],
|
||||
opt_shape=[4, 3, 224, 224],
|
||||
max_shape=[64, 3, 224, 224])))
|
||||
])
|
|
@ -0,0 +1,13 @@
|
|||
_base_ = ['./classification_static.py', '../_base_/backends/tensorrt_int8.py']
|
||||
|
||||
onnx_config = dict(input_shape=[224, 224])
|
||||
backend_config = dict(
|
||||
common_config=dict(max_workspace_size=1 << 30),
|
||||
model_inputs=[
|
||||
dict(
|
||||
input_shapes=dict(
|
||||
input=dict(
|
||||
min_shape=[1, 3, 224, 224],
|
||||
opt_shape=[1, 3, 224, 224],
|
||||
max_shape=[1, 3, 224, 224])))
|
||||
])
|
|
@ -0,0 +1,13 @@
|
|||
_base_ = ['./classification_static.py', '../_base_/backends/tensorrt.py']
|
||||
|
||||
onnx_config = dict(input_shape=[224, 224])
|
||||
backend_config = dict(
|
||||
common_config=dict(max_workspace_size=1 << 30),
|
||||
model_inputs=[
|
||||
dict(
|
||||
input_shapes=dict(
|
||||
input=dict(
|
||||
min_shape=[1, 3, 224, 224],
|
||||
opt_shape=[1, 3, 224, 224],
|
||||
max_shape=[1, 3, 224, 224])))
|
||||
])
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py', '../_base_/backends/ncnn.py']
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py', '../_base_/backends/onnxruntime.py']
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py', '../_base_/backends/ppl.py']
|
|
@ -1,8 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py', '../_base_/backends/tensorrt.py']
|
||||
tensorrt_params = dict(model_params=[
|
||||
dict(
|
||||
save_file='end2end.engine',
|
||||
opt_shape_dict=dict(
|
||||
input=[[1, 3, 224, 224], [4, 3, 224, 224], [64, 3, 224, 224]]),
|
||||
max_workspace_size=1 << 30)
|
||||
])
|
|
@ -1,8 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py', '../_base_/backends/tensorrt_int8.py']
|
||||
tensorrt_params = dict(model_params=[
|
||||
dict(
|
||||
save_file='end2end.engine',
|
||||
opt_shape_dict=dict(
|
||||
input=[[1, 3, 224, 224], [1, 3, 224, 224], [64, 3, 224, 224]]),
|
||||
max_workspace_size=1 << 30)
|
||||
])
|
|
@ -1,5 +1,5 @@
|
|||
_base_ = ['./base_static.py']
|
||||
pytorch2onnx = dict(
|
||||
onnx_config = dict(
|
||||
dynamic_axes={
|
||||
'input': {
|
||||
0: 'batch',
|
|
@ -0,0 +1,14 @@
|
|||
_base_ = ['../../_base_/onnx_config.py']
|
||||
|
||||
onnx_config = dict(output_names=['dets', 'labels'], input_shape=None)
|
||||
codebase_config = dict(
|
||||
type='mmdet',
|
||||
task='ObjectDetection',
|
||||
post_processing=dict(
|
||||
score_threshold=0.05,
|
||||
iou_threshold=0.5,
|
||||
max_output_boxes_per_class=200,
|
||||
pre_top_k=-1,
|
||||
keep_top_k=100,
|
||||
background_label_id=-1,
|
||||
))
|
|
@ -0,0 +1,12 @@
|
|||
_base_ = ['./base_dynamic.py', '../../_base_/backends/tensorrt.py']
|
||||
|
||||
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, 800, 1344],
|
||||
max_shape=[1, 3, 1344, 1344])))
|
||||
])
|
|
@ -0,0 +1,12 @@
|
|||
_base_ = ['./base_dynamic.py', '../../_base_/backends/tensorrt_int8.py']
|
||||
|
||||
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, 800, 1344],
|
||||
max_shape=[1, 3, 1344, 1344])))
|
||||
])
|
|
@ -0,0 +1,14 @@
|
|||
_base_ = ['./base_static.py', '../../_base_/backends/tensorrt_int8.py']
|
||||
|
||||
onnx_config = dict(input_shape=(1344, 800))
|
||||
|
||||
backend_config = dict(
|
||||
common_config=dict(max_workspace_size=1 << 30),
|
||||
model_inputs=[
|
||||
dict(
|
||||
input_shapes=dict(
|
||||
input=dict(
|
||||
min_shape=[1, 3, 800, 1344],
|
||||
opt_shape=[1, 3, 800, 1344],
|
||||
max_shape=[1, 3, 800, 1344])))
|
||||
])
|
|
@ -0,0 +1,14 @@
|
|||
_base_ = ['./base_static.py', '../../_base_/backends/tensorrt.py']
|
||||
|
||||
onnx_config = dict(input_shape=(1344, 800))
|
||||
|
||||
backend_config = dict(
|
||||
common_config=dict(max_workspace_size=1 << 30),
|
||||
model_inputs=[
|
||||
dict(
|
||||
input_shapes=dict(
|
||||
input=dict(
|
||||
min_shape=[1, 3, 800, 1344],
|
||||
opt_shape=[1, 3, 800, 1344],
|
||||
max_shape=[1, 3, 800, 1344])))
|
||||
])
|
|
@ -1,6 +1,5 @@
|
|||
_base_ = ['./base_dynamic.py']
|
||||
pytorch2onnx = dict(
|
||||
output_names=['dets', 'labels', 'masks'],
|
||||
_base_ = ['./mask_base_static.py']
|
||||
onnx_config = dict(
|
||||
dynamic_axes={
|
||||
'input': {
|
||||
0: 'batch',
|
||||
|
@ -21,5 +20,4 @@ pytorch2onnx = dict(
|
|||
2: 'height',
|
||||
3: 'width'
|
||||
},
|
||||
},
|
||||
)
|
||||
})
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = ['./base_static.py']
|
||||
|
||||
onnx_config = dict(output_names=['dets', 'labels', 'masks'])
|
|
@ -1,15 +0,0 @@
|
|||
_base_ = ['../_base_/torch2onnx.py']
|
||||
codebase = 'mmdet'
|
||||
pytorch2onnx = dict(
|
||||
input_names=['input'],
|
||||
output_names=['dets', 'labels'],
|
||||
)
|
||||
|
||||
post_processing = dict(
|
||||
score_threshold=0.05,
|
||||
iou_threshold=0.5,
|
||||
max_output_boxes_per_class=200,
|
||||
pre_top_k=-1,
|
||||
keep_top_k=100,
|
||||
background_label_id=-1,
|
||||
)
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./mask_base.py', '../_base_/backends/onnxruntime.py']
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./mask_base.py', './tensorrt_base.py']
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py', '../_base_/backends/onnxruntime.py']
|
|
@ -1,5 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py']
|
||||
|
||||
apply_marks = True
|
||||
|
||||
partition_params = dict(partition_type='single_stage_base')
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./partition_single_stage.py', '../_base_/backends/onnxruntime.py']
|
|
@ -1,5 +0,0 @@
|
|||
_base_ = ['./base_static.py']
|
||||
|
||||
apply_marks = True
|
||||
|
||||
partition_params = dict(partition_type='single_stage_base')
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./partition_single_stage_static.py', '../_base_/backends/ncnn.py']
|
|
@ -1,5 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py']
|
||||
|
||||
apply_marks = True
|
||||
|
||||
partition_params = dict(partition_type='two_stage_base')
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./partition_two_stage.py', '../_base_/backends/onnxruntime.py']
|
|
@ -1,5 +0,0 @@
|
|||
_base_ = ['./base_static.py']
|
||||
|
||||
apply_marks = True
|
||||
|
||||
partition_params = dict(partition_type='two_stage_base')
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./partition_two_stage_static.py', '../_base_/backends/ncnn.py']
|
|
@ -1,12 +0,0 @@
|
|||
_base_ = ['./partition_two_stage.py', '../_base_/backends/tensorrt_int8.py']
|
||||
|
||||
tensorrt_params = dict(model_params=[
|
||||
dict(
|
||||
opt_shape_dict=dict(
|
||||
input=[[1, 3, 320, 320], [1, 3, 800, 1344], [1, 3, 1344, 1344]]),
|
||||
max_workspace_size=1 << 30),
|
||||
dict(
|
||||
opt_shape_dict=dict(bbox_feats=[[500, 256, 7, 7], [1000, 256, 7, 7],
|
||||
[2000, 256, 7, 7]]),
|
||||
max_workspace_size=1 << 30)
|
||||
])
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py', '../_base_/backends/ppl.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_dynamic.py', '../../_base_/backends/onnxruntime.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_static.py', '../../_base_/backends/onnxruntime.py']
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = ['../_base_/base_static.py', '../../_base_/backends/ncnn.py']
|
||||
|
||||
partition_config = dict(type='single_stage', apply_marks=True)
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = ['./single-stage_onnxruntime_dynamic.py']
|
||||
|
||||
partition_config = dict(type='single_stage', apply_marks=True)
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = ['./single-stage_onnxruntime_static.py']
|
||||
|
||||
partition_config = dict(type='single_stage', apply_marks=True)
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_dynamic.py', '../../_base_/backends/ppl.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_static.py', '../../_base_/backends/ppl.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_tensorrt_dynamic-320x320-1344x1344.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_tensorrt_int8_dynamic-320x320-1344x1344.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_tensorrt_int8_static-800x1344.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_tensorrt_static-800x1344.py']
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py', './tensorrt_base.py']
|
|
@ -1,7 +0,0 @@
|
|||
_base_ = ['../_base_/backends/tensorrt.py']
|
||||
tensorrt_params = dict(model_params=[
|
||||
dict(
|
||||
opt_shape_dict=dict(
|
||||
input=[[1, 3, 320, 320], [1, 3, 800, 1344], [1, 3, 1344, 1344]]),
|
||||
max_workspace_size=1 << 30)
|
||||
])
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py', './tensorrt_int8_base.py']
|
|
@ -1,7 +0,0 @@
|
|||
_base_ = ['../_base_/backends/tensorrt_int8.py']
|
||||
tensorrt_params = dict(model_params=[
|
||||
dict(
|
||||
opt_shape_dict=dict(
|
||||
input=[[1, 3, 320, 320], [1, 3, 800, 1344], [1, 3, 1344, 1344]]),
|
||||
max_workspace_size=1 << 30)
|
||||
])
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_dynamic.py', '../../_base_/backends/onnxruntime.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_static.py', '../../_base_/backends/onnxruntime.py']
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = ['../_base_/base_static.py', '../../_base_/backends/ncnn.py']
|
||||
|
||||
partition_config = dict(type='two_stage', apply_marks=True)
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = ['./two-stage_onnxruntime_dynamic.py']
|
||||
|
||||
partition_config = dict(type='two_stage', apply_marks=True)
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = ['./two-stage_onnxruntime_static.py']
|
||||
|
||||
partition_config = dict(type='two_stage', apply_marks=True)
|
|
@ -0,0 +1,19 @@
|
|||
_base_ = ['./two-stage_tensorrt_int8_dynamic-320x320-1344x1344.py']
|
||||
|
||||
partition_config = dict(type='two_stage', apply_marks=True)
|
||||
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, 800, 1344],
|
||||
max_shape=[1, 3, 1344, 1344]))),
|
||||
dict(
|
||||
input_shapes=dict(
|
||||
bbox_feats=dict(
|
||||
min_shape=[500, 256, 7, 7],
|
||||
opt_shape=[1000, 256, 7, 7],
|
||||
max_shape=[2000, 256, 7, 7])))
|
||||
])
|
|
@ -0,0 +1,19 @@
|
|||
_base_ = ['./two-stage_tensorrt_dynamic-320x320-1344x1344.py']
|
||||
|
||||
partition_config = dict(type='two_stage', apply_marks=True)
|
||||
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, 800, 1344],
|
||||
max_shape=[1, 3, 1344, 1344]))),
|
||||
dict(
|
||||
input_shapes=dict(
|
||||
bbox_feats=dict(
|
||||
min_shape=[500, 256, 7, 7],
|
||||
opt_shape=[1000, 256, 7, 7],
|
||||
max_shape=[2000, 256, 7, 7])))
|
||||
])
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_dynamic.py', '../../_base_/backends/ppl.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_static.py', '../../_base_/backends/ppl.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_tensorrt_dynamic-320x320-1344x1344.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_tensorrt_int8_dynamic-320x320-1344x1344.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_tensorrt_int8_static-800x1344.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/base_tensorrt_static-800x1344.py']
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = [
|
||||
'../_base_/mask_base_dynamic.py', '../../_base_/backends/onnxruntime.py'
|
||||
]
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = [
|
||||
'../_base_/mask_base_static.py', '../../_base_/backends/onnxruntime.py'
|
||||
]
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/mask_base_dynamic.py', '../../_base_/backends/ppl.py']
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['../_base_/mask_base_static.py', '../../_base_/backends/ppl.py']
|
|
@ -0,0 +1,14 @@
|
|||
_base_ = [
|
||||
'../_base_/mask_base_dynamic.py', '../../_base_/backends/tensorrt.py'
|
||||
]
|
||||
|
||||
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, 800, 1344],
|
||||
max_shape=[1, 3, 1344, 1344])))
|
||||
])
|
|
@ -0,0 +1,13 @@
|
|||
_base_ = ['../_base_/mask_base_static.py', '../../_base_/backends/tensorrt.py']
|
||||
|
||||
onnx_config = dict(input_shape=(1344, 800))
|
||||
backend_config = dict(
|
||||
common_config=dict(max_workspace_size=1 << 30),
|
||||
model_inputs=[
|
||||
dict(
|
||||
input_shapes=dict(
|
||||
input=dict(
|
||||
min_shape=[1, 3, 800, 1344],
|
||||
opt_shape=[1, 3, 800, 1344],
|
||||
max_shape=[1, 3, 800, 1344])))
|
||||
])
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py', '../_base_/backends/onnxruntime.py']
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py', '../_base_/backends/ppl.py']
|
|
@ -1,7 +0,0 @@
|
|||
_base_ = ['./base_dynamic.py', '../_base_/backends/tensorrt.py']
|
||||
tensorrt_params = dict(model_params=[
|
||||
dict(
|
||||
opt_shape_dict=dict(
|
||||
input=[[1, 3, 32, 32], [1, 3, 32, 32], [1, 3, 512, 512]]),
|
||||
max_workspace_size=1 << 30)
|
||||
])
|
|
@ -1,8 +1,5 @@
|
|||
_base_ = ['../_base_/torch2onnx.py']
|
||||
codebase = 'mmedit'
|
||||
pytorch2onnx = dict(
|
||||
input_names=['input'],
|
||||
output_names=['output'],
|
||||
_base_ = ['./super-resolution_static.py']
|
||||
onnx_config = dict(
|
||||
dynamic_axes={
|
||||
'input': {
|
||||
0: 'batch',
|
||||
|
@ -15,4 +12,4 @@ pytorch2onnx = dict(
|
|||
3: 'width'
|
||||
}
|
||||
},
|
||||
)
|
||||
input_shape=None)
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = [
|
||||
'./super-resolution_dynamic.py', '../../_base_/backends/onnxruntime.py'
|
||||
]
|
|
@ -0,0 +1,5 @@
|
|||
_base_ = [
|
||||
'./super-resolution_static.py', '../../_base_/backends/onnxruntime.py'
|
||||
]
|
||||
|
||||
onnx_config = dict(input_shape=[256, 256])
|
|
@ -0,0 +1 @@
|
|||
_base_ = ['./super-resolution_dynamic.py', '../../_base_/backends/ppl.py']
|
|
@ -0,0 +1,3 @@
|
|||
_base_ = ['./super-resolution_static.py', '../../_base_/backends/ppl.py']
|
||||
|
||||
onnx_config = dict(input_shape=[256, 256])
|
|
@ -0,0 +1,2 @@
|
|||
_base_ = ['../../_base_/onnx_config.py']
|
||||
codebase_config = dict(type='mmedit', task='SuperResolution')
|
|
@ -0,0 +1,9 @@
|
|||
_base_ = ['./super-resolution_dynamic.py', '../../_base_/backends/tensorrt.py']
|
||||
backend_config = dict(model_inputs=[
|
||||
dict(
|
||||
input_shapes=dict(
|
||||
input=dict(
|
||||
min_shape=[1, 3, 32, 32],
|
||||
opt_shape=[1, 3, 256, 256],
|
||||
max_shape=[1, 3, 512, 512])))
|
||||
])
|
|
@ -0,0 +1,10 @@
|
|||
_base_ = ['./super-resolution_static.py', '../../_base_/backends/tensorrt.py']
|
||||
onnx_config = dict(input_shape=[256, 256])
|
||||
backend_config = dict(model_inputs=[
|
||||
dict(
|
||||
input_shapes=dict(
|
||||
input=dict(
|
||||
min_shape=[1, 3, 256, 256],
|
||||
opt_shape=[1, 3, 256, 256],
|
||||
max_shape=[1, 3, 256, 256])))
|
||||
])
|
|
@ -1,17 +0,0 @@
|
|||
_base_ = ['../_base_/torch2onnx.py']
|
||||
codebase = 'mmocr'
|
||||
|
||||
# 'TextDetection' or 'TextRecognition'
|
||||
task = 'TextDetection'
|
||||
|
||||
pytorch2onnx = dict(
|
||||
input_names=['input'],
|
||||
output_names=['output'],
|
||||
dynamic_axes={'input': {
|
||||
0: 'batch',
|
||||
2: 'height',
|
||||
3: 'width'
|
||||
}})
|
||||
|
||||
if task == 'TextRecognition':
|
||||
pytorch2onnx['dynamic_axes'] = {'input': {0: 'batch', 3: 'width'}}
|
|
@ -1,6 +0,0 @@
|
|||
_base_ = ['../_base_/torch2onnx.py']
|
||||
codebase = 'mmocr'
|
||||
|
||||
# 'TextDetection' or 'TextRecognition'
|
||||
task = 'TextDetection'
|
||||
pytorch2onnx = dict(input_names=['input'], output_names=['output'])
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./base_static.py', '../_base_/backends/ncnn.py']
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./base.py', '../_base_/backends/onnxruntime.py']
|
|
@ -1 +0,0 @@
|
|||
_base_ = ['./base.py', '../_base_/backends/ppl.py']
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue