code: def parse_args():
      parser = argparse.ArgumentParser(
          description="CoCo format Json convert to RoI binary Mask."
      )
      # Parameters
      parser.add_argument(
          "--json_path",
          type=str,
          required=True,
          help="The path of coco format json file.",
      )
      parser.add_argument(
          "--image_path",
          type=str,
          default="",
          help="The directory of images, default None if the path of images is absolute path in json file.",
      )
      parser.add_argument(
          "--seg_classid",
          type=int,
          nargs="+",
          default=None,
          help="Classid for converting to RoI, default None if all classes need to be converted.",
      )
      parser.add_argument(
          "--pad_scale",
          type=float,
          default=0.5,
          help="The padding scale of box to crop image.",
      )
      parser.add_argument(
          "--suffix",
          type=str,
          default=".png",
          help="The suffix of filename between gt and image.",
      )
      parser.add_argument(
          "--output_path",
          type=str,
          default="./output/RoI/",
          help="The directory for saving the RoI images, masks and list.txt.",
      )
      return parser.parse_args()
  
file_path: PaddleSeg/contrib/QualityInspector/tools/convert_tools/convert_coco_to_RoI_mask.py
imports: import argparse
  import os
  import os.path
  import sys
  import cv2
  from pycocotools.coco import COCO
  from qinspector.utils.bbox_utils import adjust_bbox
  from qinspector.utils.visualizer import polygons_to_bitmask
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: parser