the descriptors_only=true flag means that we are only interested in the descriptors themselvesand not in their pixel locationsizeand other method information alternativelywe could have used the dense sampling methodusing the surf dense functionfrom mahotas features import surf descriptors surf dense(imagespacing= this returns the value of the descriptors computed on points that are at distance of pixels from each other since the position of the points is fixedthe metainformation on the interest points is not very interesting and is not returned by default in either casethe result (descriptorsis an -times- arraywhere is the number of points sampled the number of points depends on the size of your imagestheir contentand the parameters you pass to the functions we used defaults previouslyand this way we obtain few hundred descriptors per image we cannot directly feed these descriptors to support vector machinelogistic regressoror similar classification system in order to use the descriptors from the imagesthere are several solutions we could just average thembut the results of doing so are not very good as they throw away all location-specific information in that casewe would have just another global feature set based on edge measurements the solution we will use here is the bag-of-words modelwhich is very recent idea it was published in this form first in this is one of those "obvious in hindsightideasit is very simple and works very well it may seem strange to say "wordswhen dealing with images it may be easier to understand if you think that you have not written wordswhich are easy to distinguish from each otherbut orally spoken audio noweach time word is spokenit will sound slightly differentso its waveform will not be identical to the other times it was spoken howeverby using clustering on these waveformswe can hope to recover most of the structure so that all the instances of given word are in the same cluster even if the process is not perfect (and it will not be)we can still talk of grouping the waveforms into words this is the same thing we do with visual wordswe group together similar-looking regions from all images and call these visual words grouping is form of clustering that we first encountered in clustering finding related posts