class_docstr: Load mutiple types of annotations.
  
  Args:
      with_bbox (bool): Whether to parse and load the bbox annotation.
           Default: True.
      with_label (bool): Whether to parse and load the label annotation.
          Default: True.
      with_keypoints (bool): Whether to parse and load the keypoints annotation.
          Default: False.
      with_mask (bool): Whether to parse and load the mask annotation.
           Default: False.
      with_seg (bool): Whether to parse and load the semantic segmentation
          annotation. Default: False.
      poly2mask (bool): Whether to convert the instance masks from polygons
          to bitmaps. Default: True.
      file_client_args (dict): Arguments to instantiate a FileClient.
          See :class:`mmcv.fileio.FileClient` for details.
          Defaults to ``dict(backend='disk')``.
class_docstr_tok: ["Load","mutiple","types","of","annotations",".","Args",":","with_bbox","(","bool",")",":","Whether","to","parse","and","load","the","bbox","annotation",".","Default",":","True",".","with_label","(","bool",")",":","Whether","to","parse","and","load","the","label","annotation",".","Default",":","True",".","with_keypoints","(","bool",")",":","Whether","to","parse","and","load","the","keypoints","annotation",".","Default",":","False",".","with_mask","(","bool",")",":","Whether","to","parse","and","load","the","mask","annotation",".","Default",":","False",".","with_seg","(","bool",")",":","Whether","to","parse","and","load","the","semantic","segmentation","annotation",".","Default",":","False",".","poly2mask","(","bool",")",":","Whether","to","convert","the","instance","masks","from","polygons","to","bitmaps",".","Default",":","True",".","file_client_args","(","dict",")",":","Arguments","to","instantiate","a","FileClient",".","See",":","class",":","`","mmcv.fileio.FileClient","`","for","details",".","Defaults","to","``","dict","(","backend='disk","'",")","``","."]
docstr: Private function to convert masks represented with polygon to
  bitmaps.
  
  Args:
      mask_ann (list | dict): Polygon mask annotation input.
      img_h (int): The height of output mask.
      img_w (int): The width of output mask.
  
  Returns:
      numpy.ndarray: The decode bitmap mask of shape (img_h, img_w).
docstr_tok: ["Private","function","to","convert","masks","represented","with","polygon","to","bitmaps",".","Args",":","mask_ann","(","list","|","dict",")",":","Polygon","mask","annotation","input",".","img_h","(","int",")",":","The","height","of","output","mask",".","img_w","(","int",")",":","The","width","of","output","mask",".","Returns",":","numpy.ndarray",":","The","decode","bitmap","mask","of","shape","(","img_h",",","img_w",")","."]
code: def _poly2mask(self, mask_ann, img_h, img_w):
      """Private function to convert masks represented with polygon to
      bitmaps.
  
      Args:
          mask_ann (list | dict): Polygon mask annotation input.
          img_h (int): The height of output mask.
          img_w (int): The width of output mask.
  
      Returns:
          numpy.ndarray: The decode bitmap mask of shape (img_h, img_w).
      """
  
      if isinstance(mask_ann, list):
          # polygon -- a single object might consist of multiple parts
          # we merge all parts into one mask rle code
          rles = maskUtils.frPyObjects(mask_ann, img_h, img_w)
          rle = maskUtils.merge(rles)
      elif isinstance(mask_ann["counts"], list):
          # uncompressed RLE
          rle = maskUtils.frPyObjects(mask_ann, img_h, img_w)
      else:
          # rle
          rle = mask_ann
      mask = maskUtils.decode(rle)
      return mask
  
imports: import os.path
  import mmcv
  import numpy
  import pycocotools.mask
  from mmdet.core import BitmapMasks, PolygonMasks
  from ..builder import PIPELINES
label_desc: Use image node_id 5 for calling the LoadAnnotations obj's underlying member method code with example usage: obj._poly2mask(mask_ann, img_h, img_w) and returns: mask