class_docstr: Base class for instance masks.
class_docstr_tok: ["Base","class","for","instance","masks","."]
docstr: Pad masks to the given size of (h, w).
  
  Args:
      out_shape (tuple[int]): Target (h, w) of padded mask.
      pad_val (int): The padded value.
  
  Returns:
      BaseInstanceMasks: The padded masks.
docstr_tok: ["Pad","masks","to","the","given","size","of","(","h",",","w",")",".","Args",":","out_shape","(","tuple","[","int","]",")",":","Target","(","h",",","w",")","of","padded","mask",".","pad_val","(","int",")",":","The","padded","value",".","Returns",":","BaseInstanceMasks",":","The","padded","masks","."]
code: def pad(self, out_shape, pad_val):
      """Pad masks to the given size of (h, w).
  
      Args:
          out_shape (tuple[int]): Target (h, w) of padded mask.
          pad_val (int): The padded value.
  
      Returns:
          BaseInstanceMasks: The padded 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 4 for calling the BaseInstanceMasks obj's underlying member method code with example usage: obj.pad(out_shape, pad_val) without return types