def extend_box(bbox, image_size, extend_ratio):
  """Zoom the input bbox

  Args:
      bbox: Input bbox
      image_size: Input image original size
      extend_ratio: Zoom ratio

  Returns:
      a box extand from input bbox
  """
  x_x = (bbox[2] - bbox[0]) * extend_ratio
  y_y = (bbox[3] - bbox[1]) * extend_ratio
  extend_bbox = []
  extend_bbox.append(int(max(0, (bbox[2] + bbox[0]) / 2 - x_x / 2)))
  extend_bbox.append(int(max(0, (bbox[3] + bbox[1]) / 2 - y_y / 2)))
  extend_bbox.append(int(min(image_size[1], (bbox[2] + bbox[0]) / 2 + x_x / 2)))
  extend_bbox.append(int(min(image_size[0], (bbox[3] + bbox[1]) / 2 + y_y / 2)))
  return extend_bbox