引入注册器builder

  1. from ..builder import DETECTORS, build_backbone, build_head, build_neck

通过backbone进行特征提取

  1. def extract_feat(self, img):
  2. """Directly extract features from the backbone+neck."""
  3. x = self.backbone(img)
  4. if self.with_neck:
  5. x = self.neck(x)
  6. return x

forward_train

有四个子算法对forward_train这个method进行了override,如下:

  • sparse_rcnn.py
  • trident_faster_rcnn.py
  • panoptic_two_stage_segmentor.py
  • mpsr.py

image.png