2017-05-31 21:59:00 -0600 | commented question | Why does my custom HOG detector always draws a rectangle on the center of image even when I have obtained good accuracies on Test data? Hi, thanks for your reply. The problem is same even if I don't apply the non max suppression. I have already provided the codes. I think, the problem is with SVM training and/or Support vectors extraction. Can you please lookup those parts and maybe suggestion something? :/ |
2017-05-27 00:52:04 -0600 | received badge | ● Enthusiast |
2017-05-25 05:26:11 -0600 | commented question | Why does my custom HOG detector always draws a rectangle on the center of image even when I have obtained good accuracies on Test data? svm = cv2.ml.SVM_create() svm.setType(cv2.ml.SVM_EPS_SVR) svm.setKernel(cv2.ml.SVM_LINEAR) svm.setGamma(0) svm.setC(10) svm.setNu(0.5) svm.setP(0.1) svm.setC(0.01) svm.setTermCriteria((cv2.TermCriteria_MAX_ITER+cv2.TermCriteria_EPS, 1000, 1e-3)) Unfortunately, this didn't work either. :/ |
2017-05-25 04:38:17 -0600 | commented question | Why does my custom HOG detector always draws a rectangle on the center of image even when I have obtained good accuracies on Test data? Hi, thanks for your reply. I was using these parameters for SVM training: svm = cv2.ml.SVM_create() svm.setType(cv2.ml.SVM_C_SVC) svm.setKernel(cv2.ml.SVM_LINEAR) svm.setGamma(0.0001) svm.setC(10) Now, I tried with regression too: svm = cv2.ml.SVM_create() svm.setType(cv2.ml.SVM_EPS_SVR) svm.setKernel(cv2.ml.SVM_LINEAR) svm.setP(0.1) The support vectors are again not even close to the default support vectors and the rectangle is still being drawn in the center. |
2017-05-25 03:29:36 -0600 | asked a question | Why does my custom HOG detector always draws a rectangle on the center of image even when I have obtained good accuracies on Test data? I am trying to make a custom HOG detector. Before working on my dataset, I am trying to verify the results on INRIA dataset. I have extracted features from hog.compute function and then used those features to train an SVM classifier. Using the svm.predict command, I tested the accuracies on test data provided by INRIA. I got 97.3% accuracy on pos test data, and 99.6% on neg test data (neg images were resized to 64x128. I tried with cropping to 64x128 as well and the accuracy was 95.4%) I used the following code to find the support vectors and rho to provide to the setSVMdetector function:
However, when I run the code, the rectangle is always drawn in the center before or after the NMS. Check here: Below is the code provided by OpenCV for HOG detector. I have just made a change in the setSVMDetector function where I am providing my trained support vectors now.
|
2017-05-20 05:50:37 -0600 | commented question | Why does my custom HOG detector always draws a rectangle on the center of image and not on the person? Well, the results before non max suppression are the same i.e. It always draws a rectangle in the center. |
2017-05-20 05:25:33 -0600 | asked a question | Why does my custom HOG detector always draws a rectangle on the center of image and not on the person? I have extracted features from hog.compute function and then used those features to train an SVM classifier. I used a script that I found online to separate rho and support vectors from the classified file.
This code saved the rho and support vectors to a different file which I provided to the hog.DetectMultiScale function. Initially I got the CheckDetectorSize errors, but somehow i dealt with them. But now that it finally executes, why does it always draw a rectangle on the center instead of a person? Check: The final code that uses the file generated from the above code, to draw rectangles on the detected area(s):
|