class_docstr: Base class for instance masks.
class_docstr_tok: ["Base","class","for","instance","masks","."]
docstr: Translate the masks.
  
  Args:
      out_shape (tuple[int]): Shape for output mask, format (h, w).
      offset (int | float): The offset for translate.
      direction (str): The translate direction, either "horizontal"
          or "vertical".
      fill_val (int | float): Border value. Default 0.
      interpolation (str): Same as :func:`mmcv.imtranslate`.
  
  Returns:
      Translated masks.
docstr_tok: ["Translate","the","masks",".","Args",":","out_shape","(","tuple","[","int","]",")",":","Shape","for","output","mask",",","format","(","h",",","w",")",".","offset","(","int","|","float",")",":","The","offset","for","translate",".","direction","(","str",")",":","The","translate","direction",",","either","``","horizontal","''","or","``","vertical","''",".","fill_val","(","int","|","float",")",":","Border","value",".","Default","0.","interpolation","(","str",")",":","Same","as",":","func",":","`","mmcv.imtranslate","`",".","Returns",":","Translated","masks","."]
code: def translate(
      self,
      out_shape,
      offset,
      direction="horizontal",
      fill_val=0,
      interpolation="bilinear",
  ):
      """Translate the masks.
  
      Args:
          out_shape (tuple[int]): Shape for output mask, format (h, w).
          offset (int | float): The offset for translate.
          direction (str): The translate direction, either "horizontal"
              or "vertical".
          fill_val (int | float): Border value. Default 0.
          interpolation (str): Same as :func:`mmcv.imtranslate`.
  
      Returns:
          Translated 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 11 for calling the BaseInstanceMasks obj's underlying member method code with example usage: obj.translate(out_shape, offset, direction, fill_val, interpolation) without return types