|
I use SIFT (Lowe's binaries) and k-means (Pythons's scipy.cluster) to generate visual bag-of-words for an image classification task. Out of curiosity, I would like to see to what edges or edge distributions the cluster represent. |
|
Just find descriptors that are close to the cluster centers and extract the corresponding patches. You can either visualize the top n patches or try averaging them. I don't think SIFT works with patches, however. It's more like a fancy edge detector. The approach you suggested is still valid: look at the cluster centers, find the most representative SIFT vectors for each center, look up where they were in images in your training set and then visualize those.
(Jan 24 '12 at 09:31)
Alexandre Passos ♦
SIFT does work with patches. With BoW approaches, people usually do "dense SIFT". as Nick just added that he uses Lowe's binary, this probably works with keypoints and rotation invariance. There is still a correspondance to patches, but it's a bit harder to get as you have to select the right scale and rotation. As Lowe uses Gaussian weighted bins, I guess it would make most sense to cut out a circle at the given scale and rotate it.
(Jan 24 '12 at 09:38)
Andreas Mueller
|
VLFeat library uses "rose of winds" visualization for SIFT descriptors: http://www.vlfeat.org/overview/sift.html
Hi Yaroslav, thanks! Do you know of any Python implementation? The Python interface for VLFeat does not contain the
VL_PLOTSIFTDESCRIPTORfunction.I think the rose of winds visualization is quite easy to code using matplotlib.