docstr: API for human pose estimation and tracking.
  
  Args:
      images (list(numpy.ndarray)): images data, shape of each is [H, W, C].
      paths (list[str]): The paths of images.
      batch_size (int): batch size.
      use_gpu (bool): Whether to use gpu.
      output_dir (str): The path to store output images.
      visualization (bool): Whether to save image or not.
  
  Returns:
      res (list[dict]): each element of res is a dict, keys contains 'path', 'data', the corresponding valus are:
          path (str): the path of original image.
          data (OrderedDict): The key points of human pose.
docstr_tok: ["API","for","human","pose","estimation","and","tracking",".","Args",":","images","(","list","(","numpy.ndarray",")",")",":","images","data",",","shape","of","each","is","[","H",",","W",",","C","]",".","paths","(","list","[","str","]",")",":","The","paths","of","images",".","batch_size","(","int",")",":","batch","size",".","use_gpu","(","bool",")",":","Whether","to","use","gpu",".","output_dir","(","str",")",":","The","path","to","store","output","images",".","visualization","(","bool",")",":","Whether","to","save","image","or","not",".","Returns",":","res","(","list","[","dict","]",")",":","each","element","of","res","is","a","dict",",","keys","contains","'path","'",",","'data","'",",","the","corresponding","valus","are",":","path","(","str",")",":","the","path","of","original","image",".","data","(","OrderedDict",")",":","The","key","points","of","human","pose","."]
code: def keypoint_detection(
      self,
      images=None,
      paths=None,
      batch_size=1,
      use_gpu=False,
      output_dir="output_pose",
      visualization=False,
  ):
      """
      API for human pose estimation and tracking.
  
      Args:
          images (list(numpy.ndarray)): images data, shape of each is [H, W, C].
          paths (list[str]): The paths of images.
          batch_size (int): batch size.
          use_gpu (bool): Whether to use gpu.
          output_dir (str): The path to store output images.
          visualization (bool): Whether to save image or not.
  
      Returns:
          res (list[dict]): each element of res is a dict, keys contains 'path', 'data', the corresponding valus are:
              path (str): the path of original image.
              data (OrderedDict): The key points of human pose.
      """
      all_data = list()
      for yield_data in reader(images, paths):
          all_data.append(yield_data)
  
      total_num = len(all_data)
      loop_num = int(np.ceil(total_num / batch_size))
      res = list()
      for iter_id in range(loop_num):
          batch_data = list()
          handle_id = iter_id * batch_size
          for image_id in range(batch_size):
              try:
                  batch_data.append(all_data[handle_id + image_id])
              except:
                  pass
          # feed batch image
          batch_image = np.array([data["image"] for data in batch_data])
          predictor = (
              self.gpu_predictor if use_gpu else self.cpu_predictor
          )
          input_names = predictor.get_input_names()
          input_handle = predictor.get_input_handle(input_names[0])
          input_handle.copy_from_cpu(batch_image)
          predictor.run()
          output_names = predictor.get_output_names()
          output_handle = predictor.get_output_handle(output_names[0])
          output = np.expand_dims(output_handle.copy_to_cpu(), axis=1)
          # postprocess one by one
          for i in range(len(batch_data)):
              out = postprocess(
                  out_heatmaps=output[i],
                  org_im=batch_data[i]["org_im"],
                  org_im_shape=batch_data[i]["org_im_shape"],
                  org_im_path=batch_data[i]["org_im_path"],
                  output_dir=output_dir,
                  visualization=visualization,
              )
              res.append(out)
      return res
  
imports: from __future__ import absolute_import
  from __future__ import division
  import ast
  import os
  import argparse
  import paddle
  import paddle.jit
  import paddle.static
  import numpy
  from paddle.inference import Config, create_predictor
  from paddlehub.module.module import moduleinfo, runnable, serving
  from .processor import base64_to_cv2, postprocess
  from .data_feed import reader
label_desc: Use image node_id 3 for calling the HumanPoseEstimation obj's underlying member method code with example usage: obj.keypoint_detection(images, paths, batch_size, use_gpu, output_dir, visualization) and returns: res