3
votes

I implemented the Spatial Pyramid Matching algorithm designed by Lazebnik in Matlab and the last step is to do the svm classification. And at this point I totally don't understand how I should do that in terms of what input I should provide to the svmtrain and svmclassify functions to get the pairs of feature point coordinates of train and test image in the end.

I have:

  • coordinates of SIFT feature points on the train image
  • coordinates of SIFT feature points on the train image
  • intersection kernel matrix for train image
  • intersection kernel matrix for test image.

Which of these I should use?

3

3 Answers

1
votes

A SVM classifier expects as input a set of objects (images) represented by tuples where each tuple is a set of numeric attributes. Some image features (e.g. gray level histogram) provides an image representation in the form of a vector of numerical values which is suitable to train a SVM. However, feature extraction algorithms like SIFT will output for each image a set of vectors. So the question is:

How can we convert this set of feature vectors to a unique vector that represents the image?

To solve this problem, you will have to use a technique that is called bag of visual words.

0
votes

The problem is that number of points is different, SVM expects feature vector to be the same size for train and for test.

0
votes

coordinates of SIFT feature points on the train image coordinates of SIFT feature points on the train image

The coordinates won't help for SVM.

I would use:

  1. the number of found SIFT feature points
  2. segment the images in small rects and use the presence of a SIFT-Feature point in a particular rect as boolean feature value. The feature is then the rect/SIFT-feature type combination. for N-Rects and M-SIFt feature point types you obtain N*M features.

The second approach requires spatial normalization of images - same size, same rotation

P.S.: I'm not expert in ML. I've only done some experiments on cell-recognition in microscope images.