class_docstr: Load annotations for semantic segmentation.
  
  Args:
      reduce_zero_label (bool): Whether reduce all label value by 1.
          Usually used for datasets where 0 is background label.
          Default: False.
      file_client_args (dict): Arguments to instantiate a FileClient.
          See :class:`mmcv.fileio.FileClient` for details.
          Defaults to ``dict(backend='disk')``.
      imdecode_backend (str): Backend for :func:`mmcv.imdecode`. Default:
          'pillow'
docstr: Call function to load multiple types annotations.
  
  Args:
      results (dict): Result dict from :obj:`mmseg.CustomDataset`.
  
  Returns:
      dict: The dict contains loaded semantic segmentation annotations.
docstr_tok: ["Call","function","to","load","multiple","types","annotations",".","Args",":","results","(","dict",")",":","Result","dict","from",":","obj",":","`","mmseg.CustomDataset","`",".","Returns",":","dict",":","The","dict","contains","loaded","semantic","segmentation","annotations","."]
code: def __call__(self, results):
      """Call function to load multiple types annotations.
  
      Args:
          results (dict): Result dict from :obj:`mmseg.CustomDataset`.
  
      Returns:
          dict: The dict contains loaded semantic segmentation annotations.
      """
  
      if self.file_client is None:
          self.file_client = mmcv.FileClient(**self.file_client_args)
  
      if results.get("seg_prefix", None) is not None:
          filename = osp.join(
              results["seg_prefix"], results["ann_info"]["seg_map"]
          )
      else:
          filename = results["ann_info"]["seg_map"]
      img_bytes = self.file_client.get(filename)
      gt_semantic_seg = (
          mmcv.imfrombytes(
              img_bytes, flag="unchanged", backend=self.imdecode_backend
          )
          .squeeze()
          .astype(np.uint8)
      )
      # modify if custom classes
      if results.get("label_map", None) is not None:
          for old_id, new_id in results["label_map"].items():
              gt_semantic_seg[gt_semantic_seg == old_id] = new_id
      # reduce zero_label
      if self.reduce_zero_label:
          # avoid using underflow conversion
          gt_semantic_seg[gt_semantic_seg == 0] = 255
          gt_semantic_seg = gt_semantic_seg - 1
          gt_semantic_seg[gt_semantic_seg == 254] = 255
      results["gt_semantic_seg"] = gt_semantic_seg
      results["seg_fields"].append("gt_semantic_seg")
      return results
  
file_path: lavis/lavis/common/annotator/uniformer/mmseg/datasets/pipelines/loading.py
imports: import os.path
  import annotator.uniformer.mmcv
  import numpy
  from ..builder import PIPELINES
label_desc: Use image node_id 2 for calling the LoadAnnotations obj's underlying member method code with example usage: obj.__call__(results) and returns: results