Skip to content

Commit

Permalink
fix rtmdet ncnn
Browse files Browse the repository at this point in the history
  • Loading branch information
RunningLeon committed Sep 13, 2023
1 parent e685cdc commit 8a095ac
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/md-link-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
},
{
"pattern": "^http://localhost"
},
{
"pattern": "^https://openmmlab.com"
}
],
"httpHeaders": [
Expand Down
4 changes: 4 additions & 0 deletions configs/mmdet/detection/single-stage_ncnn_static-640x640.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
_base_ = ['../_base_/base_static.py', '../../_base_/backends/ncnn.py']

codebase_config = dict(model_type='ncnn_end2end')
onnx_config = dict(output_names=['detection_output'], input_shape=[640, 640])
4 changes: 3 additions & 1 deletion mmdeploy/codebase/mmdet/deploy/object_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ def process_model_config(model_cfg: Config,
if transform.type == 'Resize':
pipeline[i].keep_ratio = False
pipeline[i].scale = tuple(input_shape)
if transform.type in ('YOLOv5KeepRatioResize', 'LetterResize'):
elif transform.type in ('YOLOv5KeepRatioResize', 'LetterResize'):
pipeline[i].scale = tuple(input_shape)
elif transform.type == 'Pad' and 'size' in transform:
pipeline[i].size = tuple(input_shape)

Check warning on line 76 in mmdeploy/codebase/mmdet/deploy/object_detection.py

View check run for this annotation

Codecov / codecov/patch

mmdeploy/codebase/mmdet/deploy/object_detection.py#L76

Added line #L76 was not covered by tests

pipeline = [
transform for transform in pipeline
Expand Down
4 changes: 2 additions & 2 deletions tests/regression/mmdet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,11 @@ models:
- configs/rtmdet/rtmdet_s_8xb32-300e_coco.py
pipelines:
- *pipeline_ort_dynamic_fp32
- deploy_config: configs/mmdet/detection/detection_tensorrt_dynamic-64x64-800x800.py
- deploy_config: configs/mmdet/detection/detection_tensorrt_static-640x640.py
convert_image: *convert_image
backend_test: *default_backend_test
sdk_config: *sdk_dynamic
- deploy_config: configs/mmdet/detection/single-stage_ncnn_static-320x320.py
- deploy_config: configs/mmdet/detection/single-stage_ncnn_static-640x640.py
convert_image: *convert_image

- name: SOLO
Expand Down

0 comments on commit 8a095ac

Please sign in to comment.