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.
class_docstr_tok: ["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: ConfigType,
      neck: OptConfigType = None,
      bbox_head: OptConfigType = None,
      train_cfg: OptConfigType = None,
      test_cfg: OptConfigType = None,
      data_preprocessor: OptConfigType = None,
      init_cfg: OptMultiConfig = None,
  ) -> None:
      super().__init__(
          data_preprocessor=data_preprocessor, init_cfg=init_cfg
      )
      self.backbone = MODELS.build(backbone)
      if neck is not None:
          self.neck = MODELS.build(neck)
      bbox_head.update(train_cfg=train_cfg)
      bbox_head.update(test_cfg=test_cfg)
      self.bbox_head = MODELS.build(bbox_head)
      self.train_cfg = train_cfg
      self.test_cfg = test_cfg
  
file_path: mmdetection/mmdet/models/detectors/single_stage.py
imports: from typing import List, Tuple, Union
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import OptSampleList, SampleList
  from mmdet.utils import ConfigType, OptConfigType, OptMultiConfig
  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, data_preprocessor, init_cfg)