Modify selecting keypoints for clustering