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: Read images, process them, and stack them. One sample can have multiple images,
  resulting in a tensor of (n, 3, size, size), where n <= max_img_num_per_col is the available image number.
  
  Parameters
  ----------
  image_paths
      One sample may have multiple image columns in a pd.DataFrame and multiple images
      inside each image column.
  is_training
      Whether to process images in the training mode.
  
  Returns
  -------
  A dictionary containing one sample's images and their number.
docstr_tok: ["Read","images",",","process","them",",","and","stack","them",".","One","sample","can","have","multiple","images",",","resulting","in","a","tensor","of","(","n",",","3",",","size",",","size",")",",","where","n","<","=","max_img_num_per_col","is","the","available","image","number",".","Parameters","--","--","--","--","--","image_paths","One","sample","may","have","multiple","image","columns","in","a","pd.DataFrame","and","multiple","images","inside","each","image","column",".","is_training","Whether","to","process","images","in","the","training","mode",".","Returns","--","--","--","-","A","dictionary","containing","one","sample","'s","images","and","their","number","."]
code: def process_one_sample(
      self,
      image_paths: Dict[str, List[str]],
      is_training: bool,
  ) -> Dict:
      """
      Read images, process them, and stack them. One sample can have multiple images,
      resulting in a tensor of (n, 3, size, size), where n <= max_img_num_per_col is the available image number.
  
      Parameters
      ----------
      image_paths
          One sample may have multiple image columns in a pd.DataFrame and multiple images
          inside each image column.
      is_training
          Whether to process images in the training mode.
  
      Returns
      -------
      A dictionary containing one sample's images and their number.
      """
      mm_data = dict(img_prefix=None, bbox_fields=[], mask_fields=[])
      ret = {}
  
      for per_col_name, per_col_content in image_paths.items():
          if is_rois_input(per_col_content):
              rois = np.array(per_col_content)
              # TODO: add gt masks
              mm_data["ann_info"] = dict(
                  bboxes=rois[:, :4], labels=rois[:, 4], masks=[]
              )
          else:
              with PIL.Image.open(per_col_content[0]) as img:
                  mm_data["img_info"] = dict(
                      filename=per_col_content[0],
                      height=img.height,
                      width=img.width,
                  )
      if self.requires_column_info:
          pass  # TODO
  
      ret.update(
          {
              self.image_key: self.train_processor(mm_data)
              if is_training
              else self.val_processor(mm_data)
          }
      )
  
      return ret
  
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 6 for calling the MMLabProcessor obj's underlying member method code with example usage: obj.process_one_sample(image_paths, is_training) and returns: ret