class_docstr: Base class for instance masks.
class_docstr_tok: ["Base","class","for","instance","masks","."]
docstr: Flip masks alone the given direction.
  
  Args:
      flip_direction (str): Either 'horizontal' or 'vertical'.
  
  Returns:
      BaseInstanceMasks: The flipped masks.
docstr_tok: ["Flip","masks","alone","the","given","direction",".","Args",":","flip_direction","(","str",")",":","Either","'horizontal","'","or","'vertical","'",".","Returns",":","BaseInstanceMasks",":","The","flipped","masks","."]
code: def flip(self, flip_direction="horizontal"):
      """Flip masks alone the given direction.
  
      Args:
          flip_direction (str): Either 'horizontal' or 'vertical'.
  
      Returns:
          BaseInstanceMasks: The flipped masks.
      """
      pass
  
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 3 for calling the BaseInstanceMasks obj's underlying member method code with example usage: obj.flip(flip_direction) without return types