code: def create_full_masks(gt_bboxes, img_w, img_h):
      xmin, ymin = gt_bboxes[:, 0:1], gt_bboxes[:, 1:2]
      xmax, ymax = gt_bboxes[:, 2:3], gt_bboxes[:, 3:4]
      gt_masks = np.zeros(
          (len(gt_bboxes), img_h, img_w), dtype=np.uint8
      )
      for i in range(len(gt_bboxes)):
          gt_masks[
              i,
              int(ymin[i]) : int(ymax[i]),
              int(xmin[i]) : int(xmax[i]),
          ] = 1
      gt_masks = BitmapMasks(gt_masks, img_h, img_w)
      return gt_masks
  
file_path: mmdetection/tests/test_datasets/test_transforms/utils.py
imports: import numpy
  from mmengine.testing import assert_allclose
  from mmdet.structures.bbox import BaseBoxes, HorizontalBoxes
  from mmdet.structures.mask import BitmapMasks, PolygonMasks
label_desc: Use image node_id 2 for calling a global function with example usage: create_full_masks(gt_bboxes, img_w, img_h) and returns: gt_masks