code: def run_infer(weights_file, labels_file, image_path, out_filename):
      cls_names = open(labels_file, "r").read().split("\n")
  
      model = YOLOv4Model()
      model.load_weights(weights_file)
  
      img, input = read_img(image_path, 608)
  
      prediction = model.predict(input)
      boxes, scores, labels = inference.decode_prediction(
          prediction, len(cls_names)
      )
  
      labels = [cls_names[cls] for cls in labels]
  
      pixels = add_bboxes(img, boxes, scores, labels)
      if out_filename:
          save_img(out_filename, pixels)
      else:
          draw_img(pixels)
  
file_path: DALI/docs/examples/use_cases/tensorflow/yolov4/src/main.py
imports: from model import YOLOv4Model
  from dali.pipeline import YOLOv4Pipeline
  from img import read_img, draw_img, save_img, add_bboxes
  import inference
  import train
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: run_infer(weights_file, labels_file, image_path, out_filename) without return types