Clustering a set of images using keypoint descriptors - Computer Science Stack Exchange most recent 30 from cs.stackexchange.com 2019-09-17T23:02:03Z https://cs.stackexchange.com/feeds/question/47034 https://creativecommons.org/licenses/by-sa/4.0/rdf https://cs.stackexchange.com/q/47034 0 Clustering a set of images using keypoint descriptors m_amber https://cs.stackexchange.com/users/19651 2015-09-10T08:31:34Z 2015-09-11T15:57:16Z <p>I'm trying to cluster around 16000 images into ~200 clusters, using kmeans with metric as euclidean distance or cosine distance. I understand that i need to extract keypoint descriptors to compute features for each image. I'm looking at SIFT as an option but, SIFT outputs different number of keypoints for each image that i have. How can i use these keypoint descriptors generated by SIFT to make a uniform sized feature vector for every image, so that i can feed these vectors to kmeans. Or should i use any other feature descriptor apart from SIFT?</p> https://cs.stackexchange.com/questions/47034/-/47081#47081 2 Answer by D.W. for Clustering a set of images using keypoint descriptors D.W. https://cs.stackexchange.com/users/755 2015-09-11T15:57:16Z 2015-09-11T15:57:16Z <p>I don't know how to do it that way. I would suggest you do it a different way:</p> <ol> <li><p>Define a distance metric that measures the dissimilarity between two metrics. In particular, if \$I,J\$ are two images, \$d(I,J)\$ should quantify how dissimilar \$I,J\$ are -- large values indicate they are very different, small values indicate they are very similar.</p></li> <li><p>Use a different clustering algorithm that only needs a distance metric.</p></li> </ol> <p>For #1, there are many ways of measuring/computing image similarity. If you want to use SIFT as your starting point, you can align the two images and compute some metric based upon the number of keypoints that are well-matched ("inliers") vs the number that aren't ("outliers).</p> <p>For #2, there are many options. One option is to use <a href="https://en.wikipedia.org/wiki/Hierarchical_clustering" rel="nofollow noreferrer">hierarchical clustering</a>.</p> <p>I recommend you spend some time reading through the research literature on measuring image similarity in the computer vision literature. There's <em>lots</em> of work, and many methods proposed and evaluated.</p> <p>See also <a href="https://stackoverflow.com/q/843972/781723">https://stackoverflow.com/q/843972/781723</a> and <a href="https://stackoverflow.com/q/4196453/781723">https://stackoverflow.com/q/4196453/781723</a>. You could also use the TinEye API.</p>