htc.py 490 B

12345678910111213141516
  1. # Copyright (c) OpenMMLab. All rights reserved.
  2. from mmdet.registry import MODELS
  3. from .cascade_rcnn import CascadeRCNN
  4. @MODELS.register_module()
  5. class HybridTaskCascade(CascadeRCNN):
  6. """Implementation of `HTC <https://arxiv.org/abs/1901.07518>`_"""
  7. def __init__(self, **kwargs) -> None:
  8. super().__init__(**kwargs)
  9. @property
  10. def with_semantic(self) -> bool:
  11. """bool: whether the detector has a semantic head"""
  12. return self.roi_head.with_semantic