ddod.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright (c) OpenMMLab. All rights reserved.
  2. from mmdet.registry import MODELS
  3. from mmdet.utils import ConfigType, OptConfigType, OptMultiConfig
  4. from .single_stage import SingleStageDetector
  5. @MODELS.register_module()
  6. class DDOD(SingleStageDetector):
  7. """Implementation of `DDOD <https://arxiv.org/pdf/2107.02963.pdf>`_.
  8. Args:
  9. backbone (:obj:`ConfigDict` or dict): The backbone module.
  10. neck (:obj:`ConfigDict` or dict): The neck module.
  11. bbox_head (:obj:`ConfigDict` or dict): The bbox head module.
  12. train_cfg (:obj:`ConfigDict` or dict, optional): The training config
  13. of ATSS. Defaults to None.
  14. test_cfg (:obj:`ConfigDict` or dict, optional): The testing config
  15. of ATSS. Defaults to None.
  16. data_preprocessor (:obj:`ConfigDict` or dict, optional): Config of
  17. :class:`DetDataPreprocessor` to process the input data.
  18. Defaults to None.
  19. init_cfg (:obj:`ConfigDict` or dict, optional): the config to control
  20. the initialization. Defaults to None.
  21. """
  22. def __init__(self,
  23. backbone: ConfigType,
  24. neck: ConfigType,
  25. bbox_head: ConfigType,
  26. train_cfg: OptConfigType = None,
  27. test_cfg: OptConfigType = None,
  28. data_preprocessor: OptConfigType = None,
  29. init_cfg: OptMultiConfig = None) -> None:
  30. super().__init__(
  31. backbone=backbone,
  32. neck=neck,
  33. bbox_head=bbox_head,
  34. train_cfg=train_cfg,
  35. test_cfg=test_cfg,
  36. data_preprocessor=data_preprocessor,
  37. init_cfg=init_cfg)