0

e.g. -numPos 2000 -numNeg 1000 -numStages 10 -w 20 -h 20 -minHitRate 0.995 -maxFalseAlarmRate 0.2

I have some questions about collecting negative samples.

1.According to the answer of the article(opencv_traincascade Negative samples training method), is 800 negative samples will be recognize as NEG and 200 negative samples be recognize as POS by 0th stage? If Yes, will those 200 samples be picked up to the next stage?

2.The source code in the imagestorge.cpp ->NegReader::nextImg

What is meaning of "round"? if the current negative image is 1000x1000 pixels, will the image be cropped to many 20x20 images and randomly resized to predict function? The main question is how does the procedure of collecting negative samples?

3.Why does the process of "NEG current samples" always count slowly by the high-stages?

Thanks in advance!

Casey Wang
  • 45
  • 1
  • 8
  • I'm a beginner in cascade training, so more like adjucated guesses: 1. I would be very surprised if failing negatives are lost for future stages. And as far as I've read, samples aren't chosen randomly but in order of appearance (from your listing file). 2. probably each subwindow and resized window is chosen. 3. The algorithm needs negative samples that are still in question to be positive in your current stage. If you already throw away about maxFalseAlarmRate^currentStage of negative windows, you'll see that in average you'll have to try exponentially increasing number until you find one. – Micka Jun 21 '16 at 14:05
  • Hi Micka, thanks for your answers! The _**predict**_ function seems like a weak-classifier. About the 3rd answer, in other words, it means negative samples be recognized as positive samples is difficultly by the higher-stages right(because the nodes are more than lower-stages)? If yes, it needs to take a long time to pick up positive samples in the negative samples on _**predict**_ function is reasonable. – Casey Wang Jun 22 '16 at 06:40
  • That's just my intuition, I didn't have a look at the code. Maybe someone else can give facts. Maybe you get better answers at OpenCVs Q&A forum. and/or have a look at the original cascade classification publications (viola & jones?). – Micka Jun 22 '16 at 08:43

0 Answers0