class_docstr: Wrapper of a Detectron2 model. Input/output formats of this class follow
  MMDetection's convention, so a Detectron2 model can be trained and
  evaluated in MMDetection.
  
  Args:
      detector (:obj:`ConfigDict` or dict): The module config of
          Detectron2.
      bgr_to_rgb (bool): whether to convert image from BGR to RGB.
          Defaults to False.
      rgb_to_bgr (bool): whether to convert image from RGB to BGR.
          Defaults to False.
class_docstr_tok: ["Wrapper","of","a","Detectron2","model",".","Input\/output","formats","of","this","class","follow","MMDetection","'s","convention",",","so","a","Detectron2","model","can","be","trained","and","evaluated","in","MMDetection",".","Args",":","detector","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","The","module","config","of","Detectron2",".","bgr_to_rgb","(","bool",")",":","whether","to","convert","image","from","BGR","to","RGB",".","Defaults","to","False",".","rgb_to_bgr","(","bool",")",":","whether","to","convert","image","from","RGB","to","BGR",".","Defaults","to","False","."]
docstr: Initialization Backbone.
  
  NOTE: The initialization of other layers are in Detectron2,
  if users want to change the initialization way, please
  change the code in Detectron2.
docstr_tok: ["Initialization","Backbone",".","NOTE",":","The","initialization","of","other","layers","are","in","Detectron2",",","if","users","want","to","change","the","initialization","way",",","please","change","the","code","in","Detectron2","."]
code: def init_weights(self) -> None:
      """Initialization Backbone.
  
      NOTE: The initialization of other layers are in Detectron2,
      if users want to change the initialization way, please
      change the code in Detectron2.
      """
      from detectron2.checkpoint import DetectionCheckpointer
  
      checkpointer = DetectionCheckpointer(model=self.d2_model)
      checkpointer.load(self.cfg.MODEL.WEIGHTS, checkpointables=[])
  
imports: from typing import Union
  from mmengine.config import ConfigDict
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList
  from mmdet.structures.bbox import BaseBoxes
  from mmdet.structures.mask import BitmapMasks, PolygonMasks
  from mmdet.utils import ConfigType
  from .base import BaseDetector
label_desc: Use image node_id 2 for calling the Detectron2Wrapper obj's underlying member method code with example usage: obj.init_weights() without return types