Ask Your Question

CascadeClassifier Training - pressing "Return" Key continues computation.

asked 2016-06-17 07:41:07 -0500

Micka gravatar image


I've seen problems for the application opencv_traincascade.exe being stuck in finding enough negatives samples, so that the application stops on terminal output NEG current samples: x. I could collect more negative samples or reduce numNeg parameter, but I've observed some strange behaviour instead:

If the program is stuck in this way and I press the return-key on my keyboard, most of the time the program immediately continues with some higher "NEG current samples"-value (and often additional increases occur fast).

Can anyone explain what is happening on that keypress? Is it a bug or a feature? Is it ok to do so? Am I destroying my classifier-result or lowering its performance?

edit retag flag offensive close merge delete



this sounds very very weird, and you're the 1st person ever to report such a behaviour.

os / opencv version ? how did you install it ?

berak gravatar imageberak ( 2016-06-17 09:32:45 -0500 )edit

Windows 10; OpenCV 2.4.11 - 32 bit precompiled binaries. I'm mostly using negative samples that fit the training window size perfectly...

Micka gravatar imageMicka ( 2016-06-17 12:12:58 -0500 )edit

I'll create and share a dataset on monday. The behaviour doesn't always occur, but often.

Micka gravatar imageMicka ( 2016-06-17 12:28:23 -0500 )edit

well, it's definitely not the intended behaviour..

berak gravatar imageberak ( 2016-06-17 12:48:18 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-06-22 05:09:34 -0500

Micka gravatar image

updated 2016-06-22 05:10:12 -0500

I located the problem:

Windows 10 command prompt has some kind of "selection mode". If you click with your mouse inside the command prompt, you'll enter the selection mode. In selection mode it looks like the application is paused (or at least paused if it wants to print new content to terminal - not certain). To leave that selection mode you'll have to press return/enter, that's why my training needed ages (in pause) until I pressed enter (resumed)

maybe this will help someone else :)


Here's someone else with the same problem in another application...

edit flag offensive delete link more


Haha, again a reason why I moved to Linux for developing software. MS just does the weirdest shit ever :D

StevenPuttemans gravatar imageStevenPuttemans ( 2016-06-30 07:30:57 -0500 )edit

Me !! Thanks for the hint.

tOnIp gravatar imagetOnIp ( 2017-08-03 05:54:01 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-06-17 07:41:07 -0500

Seen: 94 times

Last updated: Jun 22 '16