class_docstr: A wrapper of MMDet's model.
  
  Args:
      cfg (dict): The config of the model.
      text_repr_type (str): The boundary encoding type 'poly' or 'quad'.
          Defaults to 'poly'.
code: def __init__(self, cfg: Dict, text_repr_type: str = "poly") -> None:
      data_preprocessor = cfg.pop("data_preprocessor")
      data_preprocessor.update(_scope_="mmdet")
      super().__init__(
          data_preprocessor=data_preprocessor, init_cfg=None
      )
      cfg["_scope_"] = "mmdet"
      self.wrapped_model = MODELS.build(cfg)
      self.text_repr_type = text_repr_type
  
file_path: mmocr/mmocr/models/textdet/detectors/mmdet_wrapper.py
imports: from typing import Dict, List, Optional, Tuple, Union
  import cv2
  import torch
  from mmdet.structures import DetDataSample
  from mmdet.structures import SampleList
  from mmdet.structures.mask import bitmap_to_polygon
  from mmengine.model import BaseModel
  from mmengine.structures import InstanceData
  from mmocr.registry import MODELS
  from mmocr.utils.bbox_utils import bbox2poly
  from mmocr.utils.typing_utils import DetSampleList
label_desc: Use image node_id 1 to create a new MMDetWrapper object from inherited base classes: BaseModel with example: obj = MMDetWrapper(cfg, text_repr_type)