text: import argparse
  import logging
  import sys
  import time
  
  from tf_pose import common
  import cv2
  import numpy as np
  from tf_pose.estimator import TfPoseEstimator
  from tf_pose.networks import get_graph_path, model_wh
  
  logger = logging.getLogger('TfPoseEstimatorRun')
  logger.handlers.clear()
  logger.setLevel(logging.DEBUG)
  ch = logging.StreamHandler()
  ch.setLevel(logging.DEBUG)
  formatter = logging.Formatter('[%(asctime)s] [%(name)s] [%(levelname)s] %(message)s')
  ch.setFormatter(formatter)
  logger.addHandler(ch)
  
  
  if __name__ == '__main__':
      parser = argparse.ArgumentParser(description='tf-pose-estimation run')
      parser.add_argument('--image', type=str, default='./images/p1.jpg')
      parser.add_argument('--model', type=str, default='cmu',
                          help='cmu / mobilenet_thin / mobilenet_v2_large / mobilenet_v2_small')
      parser.add_argument('--resize', type=str, default='0x0',
                          help='if provided, resize images before they are processed. '
                               'default=0x0, Recommends : 432x368 or 656x368 or 1312x736 ')
      parser.add_argument('--resize-out-ratio', type=float, default=4.0,
                          help='if provided, resize heatmaps before they are post-processed. default=1.0')
      parser.add_argument('--result', type=str, default='./result/result.jpg')
      parser.add_argument('--num', type=int, default=0)
  
      args = parser.parse_args()
  
      w, h = model_wh(args.resize)
      if w == 0 or h == 0:
          e = TfPoseEstimator(get_graph_path(args.model), target_size=(432, 368))
      else:
          e = TfPoseEstimator(get_graph_path(args.model), target_size=(w, h))
  
      for j in range(args.num):
          i = j + 11
          path = './images/' + args.image + '_' + str(i) + '.jpg'
          print(path)
          image = common.read_imgfile(path, None, None)
          humans = e.inference(image, resize_to_default=(w > 0 and h > 0), upsample_size=args.resize_out_ratio)
          image = TfPoseEstimator.draw_humans(image, humans, imgcopy=False)
          result_path = './result/' + args.result + '_' + str(i) + '.jpg'
          print(result)
          cv2.imwrite(result_path, image)
  
  