class_docstr: Implementation of `End-to-End Semi-Supervised Object Detection
  with Soft Teacher <https://arxiv.org/abs/2106.09018>`_
  
  Args:
      detector (:obj:`ConfigDict` or dict): The detector config.
      semi_train_cfg (:obj:`ConfigDict` or dict, optional):
          The semi-supervised training config.
      semi_test_cfg (:obj:`ConfigDict` or dict, optional):
          The semi-supervised testing config.
      data_preprocessor (:obj:`ConfigDict` or dict, optional): Config of
          :class:`DetDataPreprocessor` to process the input data.
          Defaults to None.
      init_cfg (:obj:`ConfigDict` or list[:obj:`ConfigDict`] or dict or
          list[dict], optional): Initialization config dict.
          Defaults to None.
code: def __init__(
      self,
      detector: ConfigType,
      semi_train_cfg: OptConfigType = None,
      semi_test_cfg: OptConfigType = None,
      data_preprocessor: OptConfigType = None,
      init_cfg: OptMultiConfig = None,
  ) -> None:
      super().__init__(
          detector=detector,
          semi_train_cfg=semi_train_cfg,
          semi_test_cfg=semi_test_cfg,
          data_preprocessor=data_preprocessor,
          init_cfg=init_cfg,
      )
  
imports: import copy
  from typing import List, Optional, Tuple
  import torch
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.models.utils import filter_gt_instances, rename_loss_dict, reweight_loss_dict
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList
  from mmdet.structures.bbox import bbox2roi, bbox_project
  from mmdet.utils import ConfigType, InstanceList, OptConfigType, OptMultiConfig
  from ..utils.misc import unpack_gt_instances
  from .semi_base import SemiBaseDetector
label_desc: Use image node_id 1 to create a new SoftTeacher object from inherited base classes: SemiBaseDetector with example: obj = SoftTeacher(detector, semi_train_cfg, semi_test_cfg, data_preprocessor, init_cfg)