Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How exactly does BoVW work for Python-3 Open cv3?

So, I wrote a code for a SIFT/SURF+BOVW+SVM Classifier for 20 kinds of texture in Python. So, in method train(), I extract SIFT/SURF feature descriptors for every image in my training set, and I have created a BOWKMeansTrainer as follows: dictionarySize = 20 BOW = cv.BOWKMeansTrainer(dictionarySize)

I have 80 training images.

So, I add the descriptors of each image to BOW like: kp,desc=surf(img) BOW.add(desc)

All of these form a dictionary with size (20,64). What does this 64 mean?

And, how does the BOW trainer know that some image x belongs to class c? What data do I feed into the SVM?

Help in understanding this would be greatly appreciated. Thanks

How exactly does BoVW work for Python-3 Open cv3?

So, I wrote a code for a SIFT/SURF+BOVW+SVM Classifier for 20 kinds of texture in Python. So, in In method train(), I extract SIFT/SURF feature descriptors for every image in my training set, and I have created a BOWKMeansTrainer as follows: follows:

dictionarySize = 20 20

BOW = cv.BOWKMeansTrainer(dictionarySize)

I have 80 training images.

So, I add the descriptors of each image to BOW like: kp,desc=surf(img) BOW.add(desc)

All of these form a dictionary with size (20,64). What does this 64 mean?

And, how does the BOW trainer know that some image x belongs to class c? What data do I feed into the SVM?

Help in understanding this would be greatly appreciated. Thanks

click to hide/show revision 3
retagged

updated 2018-01-31 03:49:32 -0600

berak gravatar image

How exactly does BoVW work for Python-3 Open cv3?

So, I wrote a code for a SIFT/SURF+BOVW+SVM Classifier for 20 kinds of texture in Python. In method train(), I extract SIFT/SURF feature descriptors for every image in my training set, and I have created a BOWKMeansTrainer as follows:

dictionarySize = 20

BOW = cv.BOWKMeansTrainer(dictionarySize)

I have 80 training images.

So, I add the descriptors of each image to BOW like: kp,desc=surf(img) BOW.add(desc)

All of these form a dictionary with size (20,64). What does this 64 mean?

And, how does the BOW trainer know that some image x belongs to class c? What data do I feed into the SVM?

Help in understanding this would be greatly appreciated. Thanks