code: def run(self, img_path):
      args = self.args
      input_names = self.predictor.get_input_names()
      input_handle = self.predictor.get_input_handle(input_names[0])
      output_names = self.predictor.get_output_names()
      output_handle = self.predictor.get_output_handle(output_names[0])
  
      img_data = np.array([self._preprocess(img_path)])
      logger.info("input shape:" + str(img_data.shape))
      input_handle.reshape(img_data.shape)
      input_handle.copy_from_cpu(img_data)
  
      logger.info("Warmup")
      for _ in range(args.warmup):
          self.predictor.run()
  
      logger.info("Infer")
      start_time = time.time()
      for _ in range(args.repeats):
          self.predictor.run()
          results = output_handle.copy_to_cpu()
      end_time = time.time()
  
      results = self._postprocess(results)
  
      self._save_imgs(results)
  
      avg_time = (end_time - start_time) * 1000 / args.repeats
      logger.info("Average time: %.3f ms/img" % avg_time)
  
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 the PredictorBenchmark obj's underlying member method code with example usage: obj.run(img_path) without return types