Ask Your Question

daniele2688's profile - activity

2018-09-07 09:09:59 -0600 received badge  Student (source)
2016-01-25 13:38:00 -0600 received badge  Scholar (source)
2016-01-25 12:30:41 -0600 commented answer OpenCV+PYTHON: HOGDescriptor readALTModel(filename)

Yeah, maybe I have to train my own detector. Other work for me T.T Many many thanks @LorenaGdL for helping me!!!!!

2016-01-25 12:28:53 -0600 commented answer OpenCV+PYTHON: HOGDescriptor readALTModel(filename)

Moreover, I could claim that the new wrapped function

CV_WRAP void readALTModel(String modelfile);

works properly. I have tried to read the standard Dalal model (that is compatible with opencv) without errors:

>>> hog = cv2.HOGDescriptor()
>>> hog.readALTModel("/Users/lele/Desktop/OLTMac/HOG/model_4BiSVMLight.alt")
>>>

So if I could fit the upperbody model I am happy :)

2016-01-25 12:12:47 -0600 commented answer OpenCV+PYTHON: HOGDescriptor readALTModel(filename)

Thank you, I have tried to set the proper parameters -- winsize=(100,90), blocksize=(16,16),blockstride=(8,8),cellsize(8,8),nbins=9. I am sure that OLT software runs with them. By the way, it seems that these parameters are not accepted by opencv:

OpenCV Error: Assertion failed ((winSize.width - blockSize.width) % blockStride.width == 0 && (winSize.height - blockSize.height) % blockStride.height == 0) in getDescriptorSize, file /Users/lele/opencv/modules/objdetect/src/hog.cpp, line 92
2016-01-25 09:53:30 -0600 commented answer OpenCV+PYTHON: HOGDescriptor readALTModel(filename)

I have tried to re-build opencv following the suggestion of @berak, but when I run the code I get an error:

>>> hog = cv2.HOGDescriptor()
>>> hog.readALTModel("/Users/lele/Desktop/UB_release/HOGub/model_4BiSVMLight.H90.alt")
OpenCV Error: Assertion failed (checkDetectorSize()) in setSVMDetector, file /Users/lele/opencv/modules/objdetect/src/hog.cpp, line 117
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
cv2.error: /Users/lele/opencv/modules/objdetect/src/hog.cpp:117: error: (-215) checkDetectorSize() in function setSVMDetector
2016-01-23 07:21:53 -0600 commented answer OpenCV+PYTHON: HOGDescriptor readALTModel(filename)

Thanks for the reply, now it is clear for me. Is it possible to infer the parameters from the shell script that they include in the package?

    WIDTH=100; export WIDTH
    HEIGHT=90; export HEIGHT
    THR=0.0001; export THR

allOptions="-W $WIDTH,$HEIGHT -C 8,8 -N 2,2 -B 9 -G 8,8 -S 0 --wtscale 2 --maxvalue 0.2 --epsilon 1 --fullcirc 0 -v 3 --proc rgb_sqrt_grad --norm norml2hys -p 1,0 --no_nonmax 0 -z 8,16,1.3 --cachesize 152 --scaleratio 1.05 --stride 8 --margin 4,4 --avsize 0,70 -t $THR -m 0 "
2016-01-23 07:09:12 -0600 commented answer OpenCV+PYTHON: HOGDescriptor readALTModel(filename)

I am not skilled in c++, but I suppose it is doable because the model is "model_4BiSVMLight.H90.alt" and the description of function readALTModel(filename) says that it reads/parses Dalal's alt model file. I am not an expert, just a student, could you explain your doubts please?

2016-01-23 06:45:28 -0600 commented answer OpenCV+PYTHON: HOGDescriptor readALTModel(filename)

Thank you, but maybe I have not enough experience to re-build all. I simply would to use HOGDescriptor to detect upper bodies, in python. I have found the right SVM to do that (check here), but I can't understand how to set it in the HOGDescriptor python object :(

2016-01-23 06:40:41 -0600 received badge  Supporter (source)
2016-01-23 06:06:23 -0600 asked a question OpenCV+PYTHON: HOGDescriptor readALTModel(filename)

Hi, does anybody know if there is a way to use the function readALTModel(filename) in the HOGDescriptor class with python/opencv?

Thanks!