point_rend.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright (c) OpenMMLab. All rights reserved.
  2. from mmengine.config import ConfigDict
  3. from mmdet.registry import MODELS
  4. from mmdet.utils import OptConfigType, OptMultiConfig
  5. from .two_stage import TwoStageDetector
  6. @MODELS.register_module()
  7. class PointRend(TwoStageDetector):
  8. """PointRend: Image Segmentation as Rendering
  9. This detector is the implementation of
  10. `PointRend <https://arxiv.org/abs/1912.08193>`_.
  11. """
  12. def __init__(self,
  13. backbone: ConfigDict,
  14. rpn_head: ConfigDict,
  15. roi_head: ConfigDict,
  16. train_cfg: ConfigDict,
  17. test_cfg: ConfigDict,
  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. init_cfg=init_cfg,
  29. data_preprocessor=data_preprocessor)