yolact.py 1.0 KB

12345678910111213141516171819202122232425262728
  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 YOLACT(SingleStageInstanceSegmentor):
  7. """Implementation of `YOLACT <https://arxiv.org/abs/1904.02689>`_"""
  8. def __init__(self,
  9. backbone: ConfigType,
  10. neck: ConfigType,
  11. bbox_head: ConfigType,
  12. mask_head: ConfigType,
  13. train_cfg: OptConfigType = None,
  14. test_cfg: OptConfigType = None,
  15. data_preprocessor: OptConfigType = None,
  16. init_cfg: OptMultiConfig = None) -> None:
  17. super().__init__(
  18. backbone=backbone,
  19. neck=neck,
  20. bbox_head=bbox_head,
  21. mask_head=mask_head,
  22. train_cfg=train_cfg,
  23. test_cfg=test_cfg,
  24. data_preprocessor=data_preprocessor,
  25. init_cfg=init_cfg)