retinanet.py 947 B

1234567891011121314151617181920212223242526
  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 RetinaNet(SingleStageDetector):
  7. """Implementation of `RetinaNet <https://arxiv.org/abs/1708.02002>`_"""
  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)