Ask Your Question
0

opencv_traincascade does not seem to make any progress anymore

asked 2014-02-12 04:19:38 -0600

taktak004 gravatar image

updated 2014-02-12 04:20:10 -0600

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 ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-02-12 04:35:02 -0600

Well, you are asking the algorithm to reach a global false alarm rate of 0.1 with a hitrate of 0.99 on only 10 stages. Each stage, the traincascade will need more and more time to process the negative samples, and it will only get worse as you advance through the stages. Choosing 0.1 FA rate seems to be too demanding, unless the object you are trying to find is very rigid with little variation to background conditions. Try using 20 stages instead of 10, and if that doesn't work, you'll probably have to choose a higher FA rate. Keep in mind that as you advance through stages, they will take longer and longer to train, for example, the last time I trained a 20 stage cascade, the last stage took as much time as the other 19 stages. Good luck

edit flag offensive delete link more

Comments

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

taktak004 gravatar imagetaktak004 ( 2014-02-12 07:48:29 -0600 )edit

I'm not sure how the algorithm works, but it has to do with that acceptance ratio of the negative samples. The lower this ratio gets, the longer it takes to process it.

Pedro Batista gravatar imagePedro Batista ( 2014-02-12 09:27:47 -0600 )edit

Question Tools

Stats

Asked: 2014-02-12 04:19:38 -0600

Seen: 493 times

Last updated: Feb 12 '14