-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example of Linear SVM in Opencv #9
Comments
Have you succeeded training your classifier accordingly ? If so, what data and pos/neg ratio did you used ? Thank you |
My work in progress. I think ratio between pos and neg should be 1:1 if you don't use SVM with weights. Look here for example: But then you should perform several iterations of "hard negative mining" to get hard negatives and then you should add (maybe with replacement?) these examples to your training set and retrain classifier. if you like python you can try this: https://github.com/bikz05/object-detector |
"For each detector and parameter combination a preliminary detector is trained and the 1218 negative So there is no replacement, we have to keep the original 12180 negatives. However, I am curious about what they are implying by "parameter combination", do we need to change the training parameters regarding the output of one training iteration ?
[1] http://pascal.inrialpes.fr/data/human/ Cheers, |
I think they just mean crossvalidation over parameters Also as I'm understand if we will use more negative data we will have unbalanced dataset and our confusion matrix will be skewed, anyway we can just copy original positives(this called oversampling) only limitation here is processing time and memory consumption or randomly subsample from negative data(this called undersampling) but in this case we loose some of negative data , I don't know if this is important. |
Yeah, memory is kind of a concern ... Any idea about 2) ? |
I don't understand your question. About false positives: you can try to vary SVM threshold(in OpenCV you can use Also try to plot ROC curve to get understanding if it works in similar way as in original paper. |
Yeah, that's what I meant by 7524 sized buffer. IMHO, cropping it is mathematically correct, but I am wondering whether it assures the correctness of the classification or not, since the bias has been generated using 96 by 160 training windows. ROC plot is a great idea. |
If anyone intersted there is an example of using linear svm + hog descriptor in opencv, but opencv uses libsvm and using liblinear will be faster.
https://github.com/Itseez/opencv/blob/ddf82d0b154873510802ef75c53e628cd7b2cb13/samples/cpp/train_HOG.cpp
https://www.csie.ntu.edu.tw/~cjlin/liblinear/
The text was updated successfully, but these errors were encountered: