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"]
docstr: See :func:`BaseInstanceMasks.rescale`.
docstr_tok: ["See",":","func",":","`","BaseInstanceMasks.rescale","`","."]
code: def rescale(self, scale, interpolation="nearest"):
      """See :func:`BaseInstanceMasks.rescale`."""
      if len(self.masks) == 0:
          new_w, new_h = mmcv.rescale_size(
              (self.width, self.height), scale
          )
          rescaled_masks = np.empty((0, new_h, new_w), dtype=np.uint8)
      else:
          rescaled_masks = np.stack(
              [
                  mmcv.imrescale(
                      mask, scale, interpolation=interpolation
                  )
                  for mask in self.masks
              ]
          )
      height, width = rescaled_masks.shape[1:]
      return BitmapMasks(rescaled_masks, height, 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 6 for calling the BitmapMasks obj's underlying member method code with example usage: obj.rescale(scale, interpolation) and returns: BitmapMasks