Skip to content

Commit

Permalink
fix rtmdet deploy error (open-mmlab#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanrui1sensetime authored Nov 17, 2022
1 parent c043181 commit 5ecaf18
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mmyolo/deploy/object_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,22 @@ class MMYOLO(MMCodebase):

task_registry = MMYOLO_TASK

@classmethod
def register_deploy_modules(cls):
"""register all rewriters for mmcls."""
import mmdeploy.codebase.mmdet.models # noqa: F401
import mmdeploy.codebase.mmdet.ops # noqa: F401
import mmdeploy.codebase.mmdet.structures # noqa: F401

@classmethod
def register_all_modules(cls):
from mmdet.utils.setup_env import \
register_all_modules as register_all_modules_mmdet

from mmyolo.utils.setup_env import \
register_all_modules as register_all_modules_mmyolo

cls.register_deploy_modules()
register_all_modules_mmyolo(True)
register_all_modules_mmdet(False)

Expand Down

0 comments on commit 5ecaf18

Please sign in to comment.