code: def parse_args():
      parser = argparse.ArgumentParser(description="Test")
      parser.add_argument(
          "--config",
          dest="cfg",
          help="The config file.",
          default=None,
          type=str,
          required=True,
      )
      parser.add_argument(
          "--save_dir",
          dest="save_dir",
          help="The directory for saving the predict result.",
          type=str,
          default="./output",
      )
  
      parser.add_argument(
          "--image_path",
          dest="image_path",
          help="The directory or path or file list of the images to be predicted.",
          type=str,
          default=None,
          required=True,
      )
      parser.add_argument(
          "--resize_width",
          help="Set the resize width to acclerate the test. In default, it is 0, "
          "which means use the origin width.",
          type=int,
          default=0,
      )
      parser.add_argument(
          "--resize_height",
          help="Set the resize height to acclerate the test. In default, it is 0, "
          "which means use the origin height.",
          type=int,
          default=0,
      )
  
      parser.add_argument(
          "--device",
          choices=["cpu", "gpu"],
          default="gpu",
          help="Select which device to inference, defaults to gpu.",
      )
  
      parser.add_argument(
          "--use_trt",
          default=False,
          type=eval,
          choices=[True, False],
          help="Whether to use Nvidia TensorRT to accelerate prediction.",
      )
      parser.add_argument(
          "--precision",
          default="fp32",
          type=str,
          choices=["fp32", "fp16", "int8"],
          help="The tensorrt precision.",
      )
      parser.add_argument(
          "--min_subgraph_size",
          default=3,
          type=int,
          help="The min subgraph size in tensorrt prediction.",
      )
      parser.add_argument(
          "--enable_auto_tune",
          default=False,
          type=eval,
          choices=[True, False],
          help="Whether to enable tuned dynamic shape. We uses some images to collect "
          "the dynamic shape for trt sub graph, which avoids setting dynamic shape manually.",
      )
      parser.add_argument(
          "--auto_tuned_shape_file",
          type=str,
          default="auto_tune_tmp.pbtxt",
          help="The temp file to save tuned dynamic shape.",
      )
  
      parser.add_argument(
          "--cpu_threads",
          default=10,
          type=int,
          help="Number of threads to predict when using cpu.",
      )
      parser.add_argument(
          "--enable_mkldnn",
          default=False,
          type=eval,
          choices=[True, False],
          help="Enable to use mkldnn to speed up when using cpu.",
      )
  
      parser.add_argument("--warmup", default=50, type=int, help="")
      parser.add_argument("--repeats", default=100, type=int, help="")
  
      parser.add_argument(
          "--with_argmax",
          dest="with_argmax",
          help="Perform argmax operation on the predict result.",
          action="store_true",
      )
      parser.add_argument(
          "--print_detail",
          dest="print_detail",
          help="Print GLOG information of Paddle Inference.",
          action="store_true",
      )
  
      return parser.parse_args()
  
file_path: PaddleSeg/deploy/python/infer_benchmark.py
imports: import argparse
  import codecs
  import os
  import time
  import yaml
  import numpy
  from paddleseg.deploy.infer import DeployConfig
  from paddleseg.utils import logger
  from paddleseg.utils.visualize import get_pseudo_color_map
  from infer import auto_tune, use_auto_tune, Predictor
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: parser