mask_scoring_rcnn.py 997 B

12345678910111213141516171819202122232425262728293031
  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 MaskScoringRCNN(TwoStageDetector):
  7. """Mask Scoring RCNN.
  8. https://arxiv.org/abs/1903.00241
  9. """
  10. def __init__(self,
  11. backbone: ConfigType,
  12. rpn_head: ConfigType,
  13. roi_head: ConfigType,
  14. train_cfg: ConfigType,
  15. test_cfg: ConfigType,
  16. neck: OptConfigType = None,
  17. data_preprocessor: OptConfigType = None,
  18. init_cfg: OptMultiConfig = None) -> None:
  19. super().__init__(
  20. backbone=backbone,
  21. neck=neck,
  22. rpn_head=rpn_head,
  23. roi_head=roi_head,
  24. train_cfg=train_cfg,
  25. test_cfg=test_cfg,
  26. data_preprocessor=data_preprocessor,
  27. init_cfg=init_cfg)