Ask Your Question

Steven_ocv's profile - activity

2015-09-08 15:47:19 -0600 commented answer opencv_traincascade crash without explanation

Thank you @Miguel Lorenzo

2015-09-08 15:34:54 -0600 commented answer Informative websites related to OpenCV

Thanks, ^_^

2015-09-08 15:32:55 -0600 commented question Train Cascade parameters calculations issue
  1. Thank you for your reply @StevenPuttemans. I thought about your first choice earlier, I ran the program on both opencv 2.7.10 and opencv 3.0. The same thing happened.
  2. About you third suggestion, I have a 4 gigabyte RAM and a 2.6 GHz processor, so when i ran this program , the opencv_traincascade program consumes 3.7 gigabyte of the RAM. Whenever i use 2048 bufsize , the program crushes.

Another thing I want to ask you about..... Every time I ran the opencv to train a classifier ,when it finishes the training It says "OPENCV_TRAINCASCADE STOPPED WORKING", no matter what parameter i change. Do you have any idea? ^_^

2015-09-07 15:00:15 -0600 commented question Train Cascade parameters calculations issue

Thank you @StevenPuttemans. I tried to use 400 positive samples and it stopped.

I tried to get every possible shot that i can use it as a different sample, which is 400, and that is the best i could do. How to get more positive samples? IDK

I am trying to train the classifier to identify the traffic STOP sign.

I just want to know how to use the formula [vec-file has to contain >= (numPose + (numStages-1) * (1 - minHitRate) * numPose) + S].... It makes no sense to me, specially the S. ^_^

2015-09-07 10:51:33 -0600 received badge  Supporter (source)
2015-09-07 10:42:11 -0600 received badge  Editor (source)
2015-09-07 10:31:27 -0600 asked a question Train Cascade parameters calculations issue

I am training a cascade classifier using opencv. I have 56 positive and 120 negative samples. Their dimensions are 40 * 50 pixels.

The code that I used to make the samples was:

 E:\openCV\opencv\build\x64\vc12\bin\opencv_createsamples.exe -info pos.txt -vec SAMP.vec -num 56 -w 40 -h 50

and the traning code is :

E:\openCV\opencv\build\x64\vc12\bin\opencv_traincascade.exe -data classifier -vec SAMP.vec -bg neg.txt -featureType HAAR -numStages 12 -minHitRate 0.999 -maxFalseAlarmRate 0.5 -numPos 40 -numNeg 120 -w 40 -h 50 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024

The training is showing this message:

image description

===== TRAINING 4-stage =====

BEGIN

POS count : consumed 40 : 45


and no matter how long i wait, nothing happens.

1. Is there any problem in my code?

2. Does this equation has any thing to do in my code :

vec-file has to contain >= (numPose + (numStages-1) * (1 - minHitRate) * numPose) + S ??

I still cant figure out the S, what it really means? how to calculate the S?