I am learning how to train custom HOG descriptor for pedestrians detection. When I pass parameters to the hog object using following code
rho, _, _ = svm.getDecisionFunction(0)
sv = svm.getSupportVectors()
hog.setSVMDetector(np.append(sv.ravel(), rho))
I came across this error:
---------------------------------------------------------------------------
error Traceback (most recent call last)
<ipython-input-23-445de3dc92d7> in <module>
1 rho, _, _ = svm.getDecisionFunction(0)
2 sv = svm.getSupportVectors()
----> 3 hog.setSVMDetector(np.append(sv.ravel(), rho))
error: OpenCV(4.0.0) /Users/travis/build/skvark/opencv-python/opencv/modules/objdetect/src/hog.cpp:115: error: (-215:Assertion failed) checkDetectorSize() in function 'setSVMDetector'
A complete ipynotebook is available here The error is present on line 23.
The test image is present at this link
How do I solve this.