I am trying to train a HOG+SVM on the INRIA dataset using the OpenCV sample code train_HOG.cpp. Firstly, I am confused why Support Vector Regression (EPS_SVR) is used for what is clearly a classification problem. I've tried changing it to C_SVC but am getting the following runtime error with all kernels other than linear (this happens for the regression case as well) while testing on the training set itself:
OpenCV Error: Assertion failed (alpha.total() == 1 && svidx.total() == 1 && sv_total == 1) in get_svm_detector terminate called after throwing an instance of 'cv::Exception' what(): HOGsvm.cpp:41: error: (-215) alpha.total() == 1 && svidx.total() == 1 && sv_total == 1 in function get_svm_detector Aborted (core dumped)
Any idea on why it is happening and how to resolve it?