class_docstr: Base class for instance masks.
class_docstr_tok: ["Base","class","for","instance","masks","."]
docstr: Crop each mask by the given bbox.
  
  Args:
      bbox (ndarray): Bbox in format [x1, y1, x2, y2], shape (4, ).
  
  Return:
      BaseInstanceMasks: The cropped masks.
docstr_tok: ["Crop","each","mask","by","the","given","bbox",".","Args",":","bbox","(","ndarray",")",":","Bbox","in","format","[","x1",",","y1",",","x2",",","y2","]",",","shape","(","4",",",")",".","Return",":","BaseInstanceMasks",":","The","cropped","masks","."]
code: def crop(self, bbox):
      """Crop each mask by the given bbox.
  
      Args:
          bbox (ndarray): Bbox in format [x1, y1, x2, y2], shape (4, ).
  
      Return:
          BaseInstanceMasks: The cropped 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 5 for calling the BaseInstanceMasks obj's underlying member method code with example usage: obj.crop(bbox) without return types