class_docstr: The base class to prepare data for mmlab models specified by "prefix".
  Child class shall provide its specific collate function in __init__.
class_docstr_tok: ["The","base","class","to","prepare","data","for","mmlab","models","specified","by","``","prefix","''",".","Child","class","shall","provide","its","specific","collate","function","in","__init__","."]
docstr: Parameters
  ----------
  model
      The model using this data processor.
  collate_func
      The collate function to use for this 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",".","collate_func","The","collate","function","to","use","for","this","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,
      collate_func: Callable,
      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.
      collate_func
          The collate function to use for this 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 check_if_packages_installed
  
      check_if_packages_installed(package_names=["mmcv"])
  
      self.prefix = model.prefix
      self.missing_value_strategy = missing_value_strategy
      self.requires_column_info = requires_column_info
      self.collate_func = collate_func
  
      self.max_img_num_per_col = max_img_num_per_col
      if max_img_num_per_col <= 0:
          logger.debug(
              f"max_img_num_per_col {max_img_num_per_col} is reset to 1"
          )
          max_img_num_per_col = 1
      self.max_img_num_per_col = max_img_num_per_col
      logger.debug(f"max_img_num_per_col: {max_img_num_per_col}")
  
      if self.prefix.lower().startswith(MMDET_IMAGE):
          check_if_packages_installed(package_names=["mmdet"])
      else:
          assert (
              mmocr is not None
          ), "Please install MMOCR by: pip install mmocr."
      self.cfg = model.model.cfg
      self.val_processor = Compose(self.cfg.test_pipeline)
      self.train_processor = Compose(self.cfg.train_pipeline)
  
file_path: autogluon/multimodal/src/autogluon/multimodal/data/process_mmlab/process_mmlab_base.py
imports: import logging
  import warnings
  from typing import Callable, Dict, List, Optional, Union
  import numpy
  import PIL
  from PIL import ImageFile
  from torch import nn
  from ...constants import AUTOMM, COLUMN, IMAGE, IMAGE_VALID_NUM, MMDET_IMAGE
  from ..collator import StackCollator
  from ..utils import is_rois_input
label_desc: Use image node_id 1 to create a new MMLabProcessor object  with example: obj = MMLabProcessor(model, collate_func, max_img_num_per_col, missing_value_strategy, requires_column_info)