[Fix] Avoid scope switching when using mmdet inference interface#2039
[Fix] Avoid scope switching when using mmdet inference interface#2039ly015 merged 3 commits intoopen-mmlab:dev-1.xfrom
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev-1.x #2039 +/- ##
===========================================
- Coverage 82.15% 82.15% -0.01%
===========================================
Files 224 225 +1
Lines 13362 13373 +11
Branches 2265 2268 +3
===========================================
+ Hits 10978 10986 +8
- Misses 1873 1877 +4
+ Partials 511 510 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
| from mmpose.utils.typing import ConfigDict | ||
|
|
||
|
|
||
| def convert_mmdet_test_pipeline(cfg: ConfigDict) -> ConfigDict: |
There was a problem hiding this comment.
What about naming the function 'port_mmdet_pipeline' or 'adapt_mmdet_pipeline'?
There was a problem hiding this comment.
Good idea. I think 'adapt_mmdet_pipeline' is preferable
|
BTW, please also use lazy import for mmdetection in other parts of mmpose package, like |
Fixed in #2045 . No need to update this PR. |
Motivation
While inferring top-down models on videos, the scope alternates between 'mmdet' and 'mmpose' repeatedly, which often results in numerous warning messages.

Modification
BC-breaking (Optional)
Use cases (Optional)
Checklist
Before PR:
After PR: