I've been trying to use SURF features to make a classifier with sklearn SVM (to identify one class of objects). I keep running into problems with the dimensions of the feature vectors. I've generated an array of feature objects and an array of descriptors but what do I use as the feature vector? I tried passing the features and descriptors directly as parameters as follows:
sd = cv2.FeatureDetector_create("SURF")
keypoints = sd.detect(img)
kp,des = surf.compute(img, keypoints)
model = svm.SVC()
model.fit(des,['type1'])
Do I have to extract the attributes of the features objects or the descriptor array to get the final feature vector? What should be the dimension of the feature vector? Shouldn't it be an array of vectors (one vector for a keypoint)?