def sort_keypoints(kps):
  """ Sort a list of cv2.KeyPoint based on their response """
  responses = [kp.response for kp in kps]
  indices = range(len(responses))
  indices = sorted(indices, key=lambda i: responses[i], reverse=True)
  return [kps[i] for i in indices]