diffusiondet.py 920 B

1234567891011121314151617181920212223242526
  1. # Copyright (c) OpenMMLab. All rights reserved.
  2. from mmdet.models import SingleStageDetector
  3. from mmdet.registry import MODELS
  4. from mmdet.utils import ConfigType, OptConfigType, OptMultiConfig
  5. @MODELS.register_module()
  6. class DiffusionDet(SingleStageDetector):
  7. """Implementation of `DiffusionDet <>`_"""
  8. def __init__(self,
  9. backbone: ConfigType,
  10. neck: ConfigType,
  11. bbox_head: ConfigType,
  12. train_cfg: OptConfigType = None,
  13. test_cfg: OptConfigType = None,
  14. data_preprocessor: OptConfigType = None,
  15. init_cfg: OptMultiConfig = None) -> None:
  16. super().__init__(
  17. backbone=backbone,
  18. neck=neck,
  19. bbox_head=bbox_head,
  20. train_cfg=train_cfg,
  21. test_cfg=test_cfg,
  22. data_preprocessor=data_preprocessor,
  23. init_cfg=init_cfg)