class_docstr: Prepare data for mmocr models.
class_docstr_tok: ["Prepare","data","for","mmocr","models","."]
docstr: Parameters
  ----------
  model
      The model using this data processor.
  max_img_num_per_col
      The maximum number of images one sample can have.
  missing_value_strategy
      How to deal with a missing image. We now support:
      - skip
          Skip this sample
      -zero
          Use an image with zero pixels.
  requires_column_info
      Whether to require feature column information in dataloader.
docstr_tok: ["Parameters","--","--","--","--","--","model","The","model","using","this","data","processor",".","max_img_num_per_col","The","maximum","number","of","images","one","sample","can","have",".","missing_value_strategy","How","to","deal","with","a","missing","image",".","We","now","support",":","-","skip","Skip","this","sample","-zero","Use","an","image","with","zero","pixels",".","requires_column_info","Whether","to","require","feature","column","information","in","dataloader","."]
code: def __init__(
      self,
      model: nn.Module,
      max_img_num_per_col: Optional[int] = 1,
      missing_value_strategy: Optional[str] = "zero",
      requires_column_info: bool = False,
  ):
      """
      Parameters
      ----------
      model
          The model using this data processor.
      max_img_num_per_col
          The maximum number of images one sample can have.
      missing_value_strategy
          How to deal with a missing image. We now support:
          - skip
              Skip this sample
          -zero
              Use an image with zero pixels.
      requires_column_info
          Whether to require feature column information in dataloader.
      """
      from ...utils import CollateMMOcr
  
      super().__init__(
          model=model,
          collate_func=CollateMMOcr,
          max_img_num_per_col=max_img_num_per_col,
          missing_value_strategy=missing_value_strategy,
          requires_column_info=requires_column_info,
      )
  
file_path: autogluon/multimodal/src/autogluon/multimodal/data/process_mmlab/process_mmocr.py
imports: import logging
  from typing import Dict, List, Optional
  import numpy
  import PIL
  from PIL import ImageFile
  from torch import nn
  from ...constants import AUTOMM
  from ..utils import is_rois_input
  from .process_mmlab_base import MMLabProcessor
label_desc: Use image node_id 1 to create a new MMOcrProcessor object from inherited base classes: MMLabProcessor with example: obj = MMOcrProcessor(model, max_img_num_per_col, missing_value_strategy, requires_column_info)