fast_rcnn.py 925 B

1234567891011121314151617181920212223242526
  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 FastRCNN(TwoStageDetector):
  7. """Implementation of `Fast R-CNN <https://arxiv.org/abs/1504.08083>`_"""
  8. def __init__(self,
  9. backbone: ConfigType,
  10. roi_head: ConfigType,
  11. train_cfg: ConfigType,
  12. test_cfg: ConfigType,
  13. neck: OptConfigType = None,
  14. data_preprocessor: OptConfigType = None,
  15. init_cfg: OptMultiConfig = None) -> None:
  16. super().__init__(
  17. backbone=backbone,
  18. neck=neck,
  19. roi_head=roi_head,
  20. train_cfg=train_cfg,
  21. test_cfg=test_cfg,
  22. init_cfg=init_cfg,
  23. data_preprocessor=data_preprocessor)