Ask Your Question

taktak004's profile - activity

2017-09-21 09:46:38 -0600 received badge  Popular Question (source)
2014-02-12 07:48:29 -0600 commented answer opencv_traincascade does not seem to make any progress anymore

Why does every stage take so much longer than the previous one. I think I am missing something.

2014-02-12 04:19:38 -0600 asked a question opencv_traincascade does not seem to make any progress anymore

Hi,

When I launch this command:

opencv_traincascade -data cascadeResized25 -vec resized25.vec -bg negResized25.txt -numPos 600 -numNeg 3000 -numStages 10 -featureType HAAR -minHitRate 0.99 -maxFalseAlarmRate 0.1 -w 25 -h 25

opencv_traincascade reach the stage 3 normaly, but when it try to start the stage 4, it does not continue as expected. No error message or excpetion is thrown, but it does not seem to continue ever. The last output i receive is:

===== TRAINING 3-stage ===== BEGIN

POS count : consumed 600 : 622

NEG count : acceptanceRatio 3000 : 0.000661595

Precalculation time: 3.632

+----+---------+---------+

| N | HR | FA |

+----+---------+---------+

| 1| 1| 0|

+----+---------+---------+

END>

Training until now has taken 0 days 1 hours 59 minutes 17 seconds.

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

BEGIN

POS count : consumed 600 : 622

It has been not more than 20 hours that I am "waiting" for the next stage to proceed. Any idea why ?

2014-02-11 07:17:27 -0600 commented answer Traincascade Error: Bad argument (Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file.

And why don't you put that formula and the result of that formula in the thrown message ... ?

Would save a lot of time to a lot of people

2014-01-30 08:27:36 -0600 commented answer opencv_traincascade crash without explanation

Sure, the 10 and 20 was just for trying. Not I am using hundreds (and I will try thousands when I will be able to).

2014-01-30 07:00:19 -0600 commented answer opencv_traincascade crash without explanation

So, as said by @Median, no previous output, and changing from 100 to 25 "solved" my problem. The training does occurs, but as expected, with bad prediction result. But isn't it possible to do the training without allowing everything in the same time ? Probably not with opencv, but theoretically it is possible ?

2014-01-30 06:55:13 -0600 received badge  Editor (source)
2014-01-30 05:50:40 -0600 received badge  Student (source)
2014-01-30 05:46:39 -0600 received badge  Supporter (source)
2014-01-30 05:46:36 -0600 received badge  Scholar (source)
2014-01-30 05:09:26 -0600 asked a question opencv_traincascade crash without explanation

same question on stackoverflow

I try to use opencv_traincascade.exe but it crashes few seconds after I launch it. Here is how I proceeded:

I first create the positive sample using:

opencv_createsamples -info info.txt -vec vecFile.vec -bg neg.txt -num 100 -w 100 -h 100
  • info.txt has 116 lines which are all like:

    imagepath 1 0 0 100 100

    just the name of the file change in the different lines but all the images are of size 100*100 (I am working on high resolution picture on stem cells, therefore in a 25x25 image, I think I would not have enough information to detect what I am looking for)

  • neg.txt contains 715 lines with just file paths

which successfully created 100 samples

and then I launch the training with:

opencv_traincascade -data Cascade -vec vecFile.vec -bg neg.txt -numPos 10 -numNeg 20 -numStages 2 -featureType HAAR -w 100 -h 100

And then I got the following error message:

opencv_traincascade.exe has stopped working

And nothing else.

Any idea what is going on ?

Thanks