2
$\begingroup$

I am implementing visual bag of words through these steps:

  1. Find interest points using SIFT
  2. Calculate SIFT descriptor
  3. Build codebook through kmeans clustering of SIFT descriptors.

How can I visualize these visual words? For example in the following lecture, how do they get those patches?

enter image description here

$\endgroup$
2
$\begingroup$

Each SIFT descriptor corresponds to a region of the image. You take these from a bunch of images and group them into some number of clusters. I think what he's showing in the slide there is just a few samples from each cluster where he chose human-meaningful names for the clusters after the fact.

$\endgroup$
0
$\begingroup$

For anyone might be interested in my question, this is how the patches are created:

1) For each codebook, find the closest interest point that has SIFT descriptor closest to the codebook

2) Simply print out a window around that interest point.

$\endgroup$
0
$\begingroup$

In reply to your self-answer, the codebook is only one for the whole training set, it describes a set of visual words which might have some Human interpretation but it is not guaranteed.

Regarding on how to extract the patches of each keypoint I would say you have to consider as well the scale at which it was extracted (if a scale invariant descriptor was used) or the relevant path size of the descriptor itself.

As side comment, don't use the visualization of keypoints assigned to visual words as a measure of quality of your BoF model, several factors influence it and what the computer grants as similar might not have human interpretation as said before.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.