Upload 2 files
Browse files
detection_onnxruntime_static.py
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# _base_ = ["./_base_/base_static.py", "../_base_/backends/onnxruntime.py"]
|
2 |
+
|
3 |
+
onnx_config = dict(
|
4 |
+
type='onnx',
|
5 |
+
export_params=True,
|
6 |
+
keep_initializers_as_inputs=False,
|
7 |
+
opset_version=11,
|
8 |
+
save_file='end2end.onnx',
|
9 |
+
input_names=['input'],
|
10 |
+
output_names=['dets', 'labels'],
|
11 |
+
input_shape=None,
|
12 |
+
optimize=True)
|
13 |
+
|
14 |
+
backend_config = dict(type='onnxruntime')
|
15 |
+
|
16 |
+
|
17 |
+
codebase_config = dict(
|
18 |
+
type='mmdet',
|
19 |
+
task='ObjectDetection',
|
20 |
+
model_type='end2end',
|
21 |
+
post_processing=dict(
|
22 |
+
score_threshold=0.05,
|
23 |
+
confidence_threshold=0.005, # for YOLOv3
|
24 |
+
iou_threshold=0.5,
|
25 |
+
max_output_boxes_per_class=200,
|
26 |
+
pre_top_k=5000,
|
27 |
+
keep_top_k=100,
|
28 |
+
background_label_id=-1,
|
29 |
+
))
|
pose-detection_simcc_onnxruntime_dynamic.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# _base_ = ["./pose-detection_static.py", "../_base_/backends/onnxruntime.py"]
|
2 |
+
|
3 |
+
# onnx_config = dict(input_shape=None)
|
4 |
+
|
5 |
+
codebase_config = dict(type="mmpose", task="PoseDetection")
|
6 |
+
|
7 |
+
backend_config = dict(type='onnxruntime')
|
8 |
+
|
9 |
+
onnx_config = dict(
|
10 |
+
input_shape=[192, 256],
|
11 |
+
output_names=["simcc_x", "simcc_y"],
|
12 |
+
dynamic_axes={
|
13 |
+
"input": {
|
14 |
+
0: "batch",
|
15 |
+
},
|
16 |
+
"simcc_x": {0: "batch"},
|
17 |
+
"simcc_y": {0: "batch"},
|
18 |
+
},
|
19 |
+
)
|