code: def get_args():
      parser = argparse.ArgumentParser(
          description="Mask convert to RoI for Segmentation"
      )
      # Parameters
      parser.add_argument(
          "--image_path",
          type=str,
          required=True,
          help="The directory of images.",
      )
      parser.add_argument(
          "--anno_path",
          type=str,
          required=True,
          help="The directory of ground truth masks.",
      )
      parser.add_argument(
          "--class_num",
          type=int,
          required=True,
          help="Number of categories, without background.",
      )
      parser.add_argument(
          "--to_binary",
          action="store_true",
          help="Whether or not to convert mask to binary RoI.",
      )
      parser.add_argument(
          "--suffix",
          type=str,
          default=".png",
          help="The suffix of filename between gt and image.",
      )
      parser.add_argument(
          "--pad_scale",
          type=float,
          default=0.5,
          help="The padding scale of box to crop 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_mask_to_RoI.py
imports: import argparse
  import os
  import os.path
  import sys
  import cv2
  import numpy
  from qinspector.utils.bbox_utils import adjust_bbox
label_desc: Use image node_id 1 for calling a global function with example usage: get_args() and returns: parser