1
$\begingroup$

I got a dataset of images(GRAZ_02 Data set-Cars,Bikes,People) and extracted features from each and every image in the database using a descriptor(SIFT algorithm) that returns a matrix of order :(No. of interest points)X128.

Since the number of interest points detected for each image varies from image to image,the output Descriptot Matrix is not uniform.In order to overcome this problem,we are using K-means clustering that gives same sized desriptorl the presence for the purpose of classification(presence/absence of an object).

My question is that how is this matrix :(kX128) for each and every image converted into vector so that it can be applied on the SVM classification?

$\endgroup$

1 Answer 1

2
$\begingroup$

This approach is called bag-of-words. During training you get features (SIFT in your case) from all the training images. Because each image contains different number of features extracted and there are too many of them you perform $k$-means clustering. This process creates a codebook which is something like compressed version of the initial features. After clustering given an image you extract SIFT features and map each of them to the closest $k$-means centroid. Finally you calculate a vector of frequencies which consists of the number of SIFT features mapped to the first centroid, second, and so on. This vector is $k$ dimensional. Once such conversion is possible you can create $k$ dimensional representation for both training and testing images and learn SVM.

$\endgroup$
2
  • $\begingroup$ Thanks a lot for the reply.Does the vector that we feed into the SVM consist of the frequency of occurrence of each cluster? Does this mean that the vector is of dimension kX1 where all the elements of the vectors are positive integers. $\endgroup$
    – logamadi
    Commented Mar 20, 2014 at 2:58
  • $\begingroup$ I would suggest to normalize (to one) that vector before feeding into SVM. $\endgroup$
    – Gnattuha
    Commented Mar 20, 2014 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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