def METHOD_NAME(input_node, image_dir, image_list, calib_iter,
                          batch_size, image_height, image_width, size_type,
                          means, scales, normalize):
  """Generate imagenet input_fn"""
  check_images(image_dir, image_list, calib_iter, batch_size)
  def imagenet_input_fn(iter):
    """imagenet input function to load image and do preprocessing for quantize calibraton,
        as the calibration process do not need labels, the return value only contain
        images without labels"""
    if len(input_nodes) != 1:
      raise ValueError(
          "Default input_fn only support single input network, but {} found.".
          format(len(input_nodes)))
    text = open(image_list).readlines()
    images = []
    for i in range(0, batch_size):
      image_name = text[iter + i].split(' ')[0]
      image_file = os.path.join(image_dir, image_name.strip())
      if not tf.gfile.Exists(image_file):
        raise ValueError("Cannot find image file {}.".format(image_file))
      image = cv2.imread(image_file)
      if size_type == 0:
        image = central_crop(image, image_height, image_width)
      elif size_type == 1:
        image = resize(image, image_height, image_width)
      else:
        raise ValueError("Invalid size_type")
      image = means_subtraction(image, means)
      if scales != 1:
        image = scale_image(image, scales)
      if normalize:
        image = nomalize_image(image)
      image = convert_bgr_to_rgb(image)
      images.append(image)
    return {input_nodes[0]: images}
  return default_input_fn