centernet.py 974 B

1234567891011121314151617181920212223242526272829
  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 CenterNet(SingleStageDetector):
  7. """Implementation of CenterNet(Objects as Points)
  8. <https://arxiv.org/abs/1904.07850>.
  9. """
  10. def __init__(self,
  11. backbone: ConfigType,
  12. neck: ConfigType,
  13. bbox_head: ConfigType,
  14. train_cfg: OptConfigType = None,
  15. test_cfg: OptConfigType = None,
  16. data_preprocessor: OptConfigType = None,
  17. init_cfg: OptMultiConfig = None) -> None:
  18. super().__init__(
  19. backbone=backbone,
  20. neck=neck,
  21. bbox_head=bbox_head,
  22. train_cfg=train_cfg,
  23. test_cfg=test_cfg,
  24. data_preprocessor=data_preprocessor,
  25. init_cfg=init_cfg)