text: import argparse
  import sys
  
  import cv2 as cv
  import numpy as np
  
  from object_detector_2022.utils import nnUtils
  from object_detector_2022.utils import openCVUtils
  from object_detector_2022.utils import terminalUtils
  
  
  # ----------------------------custom parameters-------------------------
  showDemo = False
  customCVFont = cv.FONT_HERSHEY_DUPLEX
  lineWidthTimes = 1  # integer, the relative line width of rectangle box comparing to the whole image
  # ---------------------------- process -------------------------
  confThreshold = 0.5
  nmsThreshold = 0.4
  inpWidth = 416
  inpHeight = 416
  
  parser = argparse.ArgumentParser(add_help=False)
  parser.add_argument('--image', help='input image')
  parser.add_argument('--video', help='input video')
  parser.add_argument('--webcam', help='webcam as input')
  args = parser.parse_args()
  
  cap, outputFileSuffix, vid_writer = terminalUtils.read_args_cv(args)
  # show a piece of video
  if showDemo is True:
      openCVUtils.showVideoHead(args.video)
  
  
  # load models and classes
  net = nnUtils.load_net('yolov3.cfg', 'yolov3.weights')
  classes = nnUtils.load_classes('coco.names')
  colors = openCVUtils.generate_rgb_colors(len(classes))
  
  # process each frame
  while cv.waitKey(1) < 0:
      hasFrame, frame = cap.read()
  
      # processing finished
      if not hasFrame:
          print('Done processing !!!')
          print('Output file is stored as ', outputFileSuffix)
          cv.waitKey(3000)
          cap.release()
          break
  
      blob = cv.dnn.blobFromImage(frame, 1 / 255, (inpWidth, inpHeight), [0, 0, 0], 1, crop=False)
      outputLayers = nnUtils.getOutputsNames(net)
  
      net.setInput(blob)
      outs = net.forward(outputLayers)
      t, _ = net.getPerfProfile()
  
      openCVUtils.postprocess(frame, outs, classes, t, colors, confThreshold, nmsThreshold, lineWidthTimes, customCVFont)
  
  
  
      # draw the prediction on the image
      if (args.image):
          cv.imwrite(outputFileSuffix, frame.astype(np.uint8))
      else:
          vid_writer.write(frame.astype(np.uint8))
  