code: def parse_args():
      parser = ArgumentParser(
          description="Perform MMDET inference on large images."
      )
      parser.add_argument(
          "img", help="Image path, include image file, dir and URL."
      )
      parser.add_argument("config", help="Config file")
      parser.add_argument("checkpoint", help="Checkpoint file")
      parser.add_argument(
          "--out-dir", default="./output", help="Path to output file"
      )
      parser.add_argument(
          "--device", default="cuda:0", help="Device used for inference"
      )
      parser.add_argument(
          "--show",
          action="store_true",
          help="Show the detection results",
      )
      parser.add_argument(
          "--tta",
          action="store_true",
          help="Whether to use test time augmentation",
      )
      parser.add_argument(
          "--score-thr",
          type=float,
          default=0.3,
          help="Bbox score threshold",
      )
      parser.add_argument(
          "--patch-size",
          type=int,
          default=640,
          help="The size of patches",
      )
      parser.add_argument(
          "--patch-overlap-ratio",
          type=float,
          default=0.25,
          help="Ratio of overlap between two patches",
      )
      parser.add_argument(
          "--merge-iou-thr",
          type=float,
          default=0.25,
          help="IoU threshould for merging results",
      )
      parser.add_argument(
          "--merge-nms-type",
          type=str,
          default="nms",
          help="NMS type for merging results",
      )
      parser.add_argument(
          "--batch-size",
          type=int,
          default=1,
          help="Batch size, must greater than or equal to 1",
      )
      parser.add_argument(
          "--debug",
          action="store_true",
          help="Export debug results before merging",
      )
      parser.add_argument(
          "--save-patch",
          action="store_true",
          help="Save the results of each patch. "
          "The `--debug` must be enabled.",
      )
      args = parser.parse_args()
      return args
  
file_path: mmdetection/demo/large_image_demo.py
imports: import os
  import random
  from argparse import ArgumentParser
  from pathlib import Path
  import mmcv
  import numpy
  from mmengine.config import Config, ConfigDict
  from mmengine.logging import print_log
  from mmengine.utils import ProgressBar
  from mmdet.apis import inference_detector, init_detector
  from mmdet.registry import VISUALIZERS
  from mmdet.utils.large_image import merge_results_by_nms, shift_predictions
  from mmdet.utils.misc import get_file_list
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: args