mmdeploy/configs/mmocr/text-detection/text-detection_mrcnn_onnxruntime_dynamic.py
AllentDan ff95bf48ea
[Feature] Support more MMOCR models: DBNet++, TextSnake, ABINet, MRCNN (#1534)
* WIP ocr

* add mrcnn rewrite

* add any rewrite for abinet

* export abinet to onnx

* fix abinet onnx export

* support abinet to tensorrt static and modify mmocr.yml

* add textsnake and dbnetpp

* support mrcnn in ORT and TRT

* add a condition before update data_preprocessor scope

* update doc and mmocr.yml

* add ut

* markdown and simple config

* write build_pytorch_model in child class

* update any_default

* remove where in abi_language_decoder___get_length__default

* keep where

* fix UT

* fix UT

* fix UT

* update mmocr.yml and config description

* tensorrt-fp32 -> tensorrt

* update doc
2023-01-16 12:06:03 +08:00

34 lines
876 B
Python

_base_ = ['./text-detection_static.py', '../../_base_/backends/onnxruntime.py']
onnx_config = dict(
output_names=['dets', 'labels', 'masks'],
dynamic_axes=dict(
input=dict({
0: 'batch',
2: 'height',
3: 'width'
}),
dets=dict({
0: 'batch',
1: 'num_dets'
}),
labels=dict({
0: 'batch',
1: 'num_dets'
}),
masks=dict({
0: 'batch',
1: 'num_dets',
2: 'height',
3: 'width'
})))
codebase_config = dict(
post_processing=dict(
score_threshold=0.05,
confidence_threshold=0.005,
iou_threshold=0.5,
max_output_boxes_per_class=200,
pre_top_k=5000,
keep_top_k=100,
background_label_id=-1,
export_postprocess_mask=False))