class_docstr: This class represents masks in the form of bitmaps.
  
  Args:
      masks (ndarray): ndarray of masks in shape (N, H, W), where N is
          the number of objects.
      height (int): height of masks
      width (int): width of masks
class_docstr_tok: ["This","class","represents","masks","in","the","form","of","bitmaps",".","Args",":","masks","(","ndarray",")",":","ndarray","of","masks","in","shape","(","N",",","H",",","W",")",",","where","N","is","the","number","of","objects",".","height","(","int",")",":","height","of","masks","width","(","int",")",":","width","of","masks"]
code: def __init__(self, masks, height, width):
      self.height = height
      self.width = width
      if len(masks) == 0:
          self.masks = np.empty(
              (0, self.height, self.width), dtype=np.uint8
          )
      else:
          assert isinstance(masks, (list, np.ndarray))
          if isinstance(masks, list):
              assert isinstance(masks[0], np.ndarray)
              assert masks[0].ndim == 2  # (H, W)
          else:
              assert masks.ndim == 3  # (N, H, W)
  
          self.masks = np.stack(masks).reshape(-1, height, width)
          assert self.masks.shape[1] == self.height
          assert self.masks.shape[2] == self.width
  
imports: from abc import ABCMeta, abstractmethod
  import cv2
  import mmcv
  import numpy
  import pycocotools.mask
  import torch
  from mmcv.ops.roi_align import roi_align
label_desc: Use image node_id 1 to create a new BitmapMasks object from inherited base classes: BaseInstanceMasks with example: obj = BitmapMasks(masks, height, width)