class_docstr: Base class for single-stage detectors.
  
  Single-stage detectors directly and densely predict bounding boxes on the
  output features of the backbone+neck.
code: def __init__(
      self,
      backbone,
      neck=None,
      bbox_head=None,
      train_cfg=None,
      test_cfg=None,
      pretrained=None,
  ):
      super(SingleStageDetector, self).__init__()
      self.backbone = build_backbone(backbone)
      if neck is not None:
          self.neck = build_neck(neck)
      bbox_head.update(train_cfg=train_cfg)
      bbox_head.update(test_cfg=test_cfg)
      self.bbox_head = build_head(bbox_head)
      self.train_cfg = train_cfg
      self.test_cfg = test_cfg
      self.init_weights(pretrained=pretrained)
  
file_path: insightface/detection/scrfd/mmdet/models/detectors/single_stage.py
imports: import torch
  import torch.nn
  from mmdet.core import bbox2result
  from ..builder import DETECTORS, build_backbone, build_head, build_neck
  from .base import BaseDetector
label_desc: Use image node_id 1 to create a new SingleStageDetector object from inherited base classes: BaseDetector with example: obj = SingleStageDetector(backbone, neck, bbox_head, train_cfg, test_cfg, pretrained)