How to train HoG manually in Python? [closed]
Hi guys, I'm trying to train my SVM detector and set it on the SVM in detectMultiscale-method implementation of HoG. I want to do it with the Inria person data set in order to achieve maybe the same results, as the guys, who invented the method. Unfortunately I don't have an idea what I'm doing wrong, but I dont detect any people on my test-picture (basically it is a one big picture containing some of the learned images). Below I'm posting my code, but if you have an elegant solution please feel free to share. Thanks.
imho, you have to use opencv's SVM to train it, not the one from sklearn.
also have a look here, the svmdetector is just a float array from the support vector(s), with -rho added at the end
Thanks for the responce. I have tried the solution, proposed in ( http://answers.opencv.org/question/56...), but I also dont get any detections. It uses only OpenCV for thraining the detector
I have used the OpenCV methods and set the type of the SVM to EPS_SVR. That worked for me.
Yasen, Can u please post ur solution to the problem. I have got similar problem. or, mail me at [email protected]
@ameer, it just does not work, like you want it. noone will mail you
do you understand, that you need to put in some own effort here?
@berak, yea i am trying to get it done by myself, but i am not able to. if Yasen wishes, he can. right?
the following line is not clear for me svm_classificator = np.array(my_svm().coef_)
where from do you take the my_svm() ?
folks, you should use this c++ tool to train an HOG detector, not python.
also, mixing scikit's svm data with opencv's probably will not work.
berak is right. The c++ tool is perfect for training the classifier. "Translating" the code into python (and only cv2 methods) is not much of an effort, but it gives you the same results, so its not worth it.I removed the code in order not to confuse other users.
I'm bit ashame, but some people (including me) are not so comfortable with C++, that's why I'm interested in "python" version of HoG...