def keypoint_to_dict(keypoint):
    """
    convert cv2.KeyPoint to dict
    """
    y, x = keypoint.pt
    return dict(
        x=int(x),
        y=int(y),
        size=keypoint.size,
        response=keypoint.response,
        octave=keypoint.octave,
        class_id=keypoint.class_id,
        angle=keypoint.angle,
    )