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.crop`.
docstr_tok: ["See",":","func",":","`","BaseInstanceMasks.crop","`","."]
code: def crop(self, bbox):
      """See :func:`BaseInstanceMasks.crop`."""
      assert isinstance(bbox, np.ndarray)
      assert bbox.ndim == 1
  
      # clip the boundary
      bbox = bbox.copy()
      bbox[0::2] = np.clip(bbox[0::2], 0, self.width)
      bbox[1::2] = np.clip(bbox[1::2], 0, self.height)
      x1, y1, x2, y2 = bbox
      w = np.maximum(x2 - x1, 1)
      h = np.maximum(y2 - y1, 1)
  
      if len(self.masks) == 0:
          cropped_masks = np.empty((0, h, w), dtype=np.uint8)
      else:
          cropped_masks = self.masks[:, y1 : y1 + h, x1 : x1 + w]
      return BitmapMasks(cropped_masks, h, w)
  
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 10 for calling the BitmapMasks obj's underlying member method code with example usage: obj.crop(bbox) and returns: BitmapMasks