title: Open CV traincascade gets stuck with a Hit rate of 1 and a False alarm rate of 0
body: <p>I want to train a LBP classifier.  I have 103 positive and 500 negative samples.  I used almost default values, except for <code>-featureType LBP</code> and <code>-numPos 88</code>.</p>
  
  <pre><code>opencv_traincascade -data "$NAME"_Output \
                      -vec "$NAME".vec \
                      -bg "$NAME"_Negative.txt \
                      -numPos 88 \
                      -numNeg 500 \
                      -numStages 20 \
                      -stageType BOOST \
                      -featureType LBP \
                      -w 32 \
                      -h 48 \
                      -bt GAB \
                      -minHitRate 0.995 \
                      -maxFalseAlarmRate 0.5 \
                      -weightTrimRate 0.95 \
                      -maxDepth 1 \
                      -maxWeakCount 100
  </code></pre>
  
  <p>The classifier gets stuck at stage 2 after stage 1 got a full hit rate and a zero false alarm rate.  I tried playing with the numPos, numNeg, and bt parameters, but it always gets approximately the same result.</p>
  
  <pre><code>===== TRAINING 0-stage =====
  &lt;BEGIN
  POS count : consumed   88 : 88
  NEG count : acceptanceRatio    500 : 1
  Precalculation time: 1
  +----+---------+---------+
  |  N |    HR   |    FA   |
  +----+---------+---------+
  |   1|        1|        1|
  +----+---------+---------+
  |   2|        1|    0.046|
  +----+---------+---------+
  END&gt;
  
  ===== TRAINING 1-stage =====
  &lt;BEGIN
  POS count : consumed   88 : 88
  NEG count : acceptanceRatio    500 : 0.0456038
  Precalculation time: 0
  +----+---------+---------+
  |  N |    HR   |    FA   |
  +----+---------+---------+
  |   1|        1|        1|
  +----+---------+---------+
  |   2|        1|        0|
  +----+---------+---------+
  END&gt;
  
  ===== TRAINING 2-stage =====
  &lt;BEGIN
  POS count : consumed   88 : 88
  </code></pre>
  
  <p>I don't know enough about this but my guess is that its complete after stage 1, but it still trying to generate 18 more stages.  My data set is quite simple,  the positive should all be quite similar and the negative images are the same size.  </p>
  
  <ul>
  <li>Is it possible to have a classifier with only 2 stages? (stage 0 and stage 1)</li>
  <li>Has anyone got a LBP classifier working before, or should I stick to HAAR?</li>
  <li>Have I made any mistakes with the parameters or input data?</li>
  </ul>