code: def parse_mask(self, idx: int):
      mask = self.masks[idx]
      c = mask.max()  # 有几个目标最大索引就等于几
      masks = []
      # 对每个目标的mask单独使用一个channel存放
      for i in range(1, c + 1):
          masks.append(mask == i)
      masks = np.stack(masks, axis=0)
      return torch.as_tensor(masks, dtype=torch.uint8)
  
file_path: deep-learning-for-image-processing/pytorch_object_detection/mask_rcnn/my_dataset_voc.py
imports: import os
  import json
  from lxml import etree
  import numpy
  from PIL import Image
  import torch
  from torch.utils.data import Dataset
  from train_utils import convert_to_coco_api
label_desc: Use image node_id 2 for calling the VOCInstances obj's underlying member method code with example usage: obj.parse_mask(idx) and returns: torch