code: def parse_opt():
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "--model-dir",
          type=str,
          default=None,
          help="paddle static model",
      )
      parser.add_argument(
          "--save-file",
          type=str,
          default=None,
          help="onnx model save path",
      )
      parser.add_argument(
          "--opset", type=int, default=11, help="opset version"
      )
      parser.add_argument(
          "--img-size",
          nargs="+",
          type=int,
          default=[640, 640],
          help="image size",
      )
      parser.add_argument(
          "--batch-size", type=int, default=1, help="batch size"
      )
      parser.add_argument(
          "--topk-all",
          type=int,
          default=100,
          help="topk objects for every images",
      )
      parser.add_argument(
          "--iou-thres",
          type=float,
          default=0.45,
          help="iou threshold for NMS",
      )
      parser.add_argument(
          "--conf-thres",
          type=float,
          default=0.25,
          help="conf threshold for NMS",
      )
      opt = parser.parse_args()
      opt.img_size *= 2 if len(opt.img_size) == 1 else 1
      return opt
  
file_path: PaddleDetection/deploy/end2end_ppyoloe/end2end.py
imports: import argparse
  import onnx
  import onnx_graphsurgeon
  import numpy
  from pathlib import Path
  from paddle2onnx.legacy.command import program2onnx
  from collections import OrderedDict
label_desc: Use image node_id 2 for calling a global function with example usage: parse_opt() and returns: opt