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.flip`.
docstr_tok: ["See",":","func",":","`","BaseInstanceMasks.flip","`","."]
code: def flip(self, flip_direction="horizontal"):
      """See :func:`BaseInstanceMasks.flip`."""
      assert flip_direction in ("horizontal", "vertical", "diagonal")
  
      if len(self.masks) == 0:
          flipped_masks = self.masks
      else:
          flipped_masks = np.stack(
              [
                  mmcv.imflip(mask, direction=flip_direction)
                  for mask in self.masks
              ]
          )
      return BitmapMasks(flipped_masks, self.height, 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 8 for calling the BitmapMasks obj's underlying member method code with example usage: obj.flip(flip_direction) and returns: BitmapMasks