简体   繁体   中英

Opencv_traincascade froze

I have got some problems with training my cascade classifier, opencv_traincascede.It didn't work properly. Previous stage takes 12 min to complete, but at 20th stage it gives:

===== TRAINING 20-stage =====
<BEGIN
POS count : consumed   500 : 500

and nothing more in the next 45 minutes. I expected something like:

===== TRAINING 20-stage =====
<BEGIN
POS count : consumed   500 : 500
NEG current samples  <negNum>

Should I restart the training?

-numStages 30

Anyway in task manager traincascade eats 35% CPU (i5)

(not an answer, still..)

  • each stage takes like exponentially longer than the last one
  • you can break it, and resume later. if you ctrl^c'ed it at .g. stage 17, rerun your cmdline with -numStages 16, this will generate a cascade.xml for the current 16 valid stages (n# 17 might be broken) at least you can try out your current cascade this way. later restart with -numStages 30, to continue the training
  • while lbp or hogcascades are (slightly) less accurate, they train in minutes instead of days, so until you get nice results, you should try that. (if it does not work at all, haar cascades won't either)
  • 30 stages sounds insane. if you don't get results with 20, 30 won't help
  • http://answers.opencv.org/questions/scope:all/sort:relevance-desc/query:cascade%20training/page:1/

last but not least, we don't know, what you're training there. some kind of objects might not fit the cascade scheme at all, and might need a different treatment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM