grid_rcnn.py 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. # Copyright (c) OpenMMLab. All rights reserved.
  2. from mmdet.registry import MODELS
  3. from mmdet.utils import ConfigType, OptConfigType, OptMultiConfig
  4. from .two_stage import TwoStageDetector
  5. @MODELS.register_module()
  6. class GridRCNN(TwoStageDetector):
  7. """Grid R-CNN.
  8. This detector is the implementation of:
  9. - Grid R-CNN (https://arxiv.org/abs/1811.12030)
  10. - Grid R-CNN Plus: Faster and Better (https://arxiv.org/abs/1906.05688)
  11. """
  12. def __init__(self,
  13. backbone: ConfigType,
  14. rpn_head: ConfigType,
  15. roi_head: ConfigType,
  16. train_cfg: ConfigType,
  17. test_cfg: ConfigType,
  18. neck: OptConfigType = None,
  19. data_preprocessor: OptConfigType = None,
  20. init_cfg: OptMultiConfig = None) -> None:
  21. super().__init__(
  22. backbone=backbone,
  23. neck=neck,
  24. rpn_head=rpn_head,
  25. roi_head=roi_head,
  26. train_cfg=train_cfg,
  27. test_cfg=test_cfg,
  28. data_preprocessor=data_preprocessor,
  29. init_cfg=init_cfg)