class_docstr: Support MMOCR object detection models.
  Refer to https://github.com/open-mmlab/mmocr
docstr: Load a pretrained ocr text detection detector from MMOCR.
  
  Parameters
  ----------
  prefix
      The prefix of the MMdetAutoModelForTextDetection model.
  checkpoint_name
      Name of the mmdet checkpoint.
  num_classes
      The number of classes.
  pretrained
      Whether using the pretrained mmdet models. If pretrained=True, download the pretrained model.
docstr_tok: ["Load","a","pretrained","ocr","text","detection","detector","from","MMOCR",".","Parameters","--","--","--","--","--","prefix","The","prefix","of","the","MMdetAutoModelForTextDetection","model",".","checkpoint_name","Name","of","the","mmdet","checkpoint",".","num_classes","The","number","of","classes",".","pretrained","Whether","using","the","pretrained","mmdet","models",".","If","pretrained=True",",","download","the","pretrained","model","."]
code: def __init__(
      self,
      prefix: str,
      checkpoint_name: str,
      num_classes: Optional[int] = None,
      pretrained: Optional[bool] = True,
  ):
      """
      Load a pretrained ocr text detection detector from MMOCR.
  
      Parameters
      ----------
      prefix
          The prefix of the MMdetAutoModelForTextDetection model.
      checkpoint_name
          Name of the mmdet checkpoint.
      num_classes
          The number of classes.
      pretrained
          Whether using the pretrained mmdet models. If pretrained=True, download the pretrained model.
      """
      super().__init__()
      logger.debug(f"initializing {checkpoint_name}")
      self.checkpoint_name = checkpoint_name
      self.pretrained = pretrained
  
      self.config, self.model = get_mmocr_config_and_model(
          checkpoint_name
      )
      self.model = revert_sync_batchnorm(self.model)
      self.model.cfg = self.config
      self.prefix = prefix
  
file_path: autogluon/multimodal/src/autogluon/multimodal/models/mmocr_text_detection.py
imports: import logging
  from typing import Optional
  from torch import nn
  from ..constants import AUTOMM, BBOX, COLUMN, COLUMN_FEATURES, FEATURES, IMAGE, IMAGE_VALID_NUM, LABEL, LOGITS, MASKS
  from .utils import assign_layer_ids, get_column_features, get_mmocr_config_and_model, get_model_head
label_desc: Use image node_id 1 to create a new MMOCRAutoModelForTextDetection object from inherited base classes: nn with example: obj = MMOCRAutoModelForTextDetection(prefix, checkpoint_name, num_classes, pretrained)