opencv - Bag of words training samples -


i have implemented bag of words, working smoothly. but, i'm confused steps , how implement it.

i create bow descriptors last step in bag of words create samples, shown here bowde.compute(img, keypoints, bow_descriptor); .. things i'm confused next steps.

i know in bow have train , test class (car) non-class (cola), created in bow_descriptor vector class car, have vector samples belong car. here questions have training system , test it.

1- shall make vector of bow_descriptor half of class(cola) , rest non-class(cola) , or have create new bow_descriptor non-class(cola) ?

2- need multi-class classification, after finishing first system class (car), , need train new class (buses+trains , on), shall create new training model each of them, or possible training procedure previous training (i.e. training class bus,train class car in same system)?

it not matter whether create 1 object classes or 1 object each class, long use same dictionary classes. creating 1 object might more economical. extracted image descriptors should same.

regarding multiclass svms:

you used svm tag. assume want use svm. there exist ways multiclass classifications explicitly svms more common train several binary svms , combine them multiclass results.

you can either use 1-vs-1 setting, train 1 svm per class pair. testing evaluate test example on each svm. class wins duels becomes final result.

the other popular approach 1-vs-all svms. here train 1 svm per class samples current class labeled positive , other samples negative. during testing class highest score wins.

so if want use 1-vs-1 setting might able reuse binary svms when add new classes. not possible 1-vs-all setting, need add new class negative samples each svm.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -