solo.py 1.1 KB

12345678910111213141516171819202122232425262728293031
  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_instance_seg import SingleStageInstanceSegmentor
  5. @MODELS.register_module()
  6. class SOLO(SingleStageInstanceSegmentor):
  7. """`SOLO: Segmenting Objects by Locations
  8. <https://arxiv.org/abs/1912.04488>`_
  9. """
  10. def __init__(self,
  11. backbone: ConfigType,
  12. neck: OptConfigType = None,
  13. bbox_head: OptConfigType = None,
  14. mask_head: OptConfigType = None,
  15. train_cfg: OptConfigType = None,
  16. test_cfg: OptConfigType = None,
  17. data_preprocessor: OptConfigType = None,
  18. init_cfg: OptMultiConfig = None):
  19. super().__init__(
  20. backbone=backbone,
  21. neck=neck,
  22. bbox_head=bbox_head,
  23. mask_head=mask_head,
  24. train_cfg=train_cfg,
  25. test_cfg=test_cfg,
  26. data_preprocessor=data_preprocessor,
  27. init_cfg=init_cfg)