Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Matlab Cascade Classifier is a wrapper over OpenCV one. There is good tutorial for Matlab classifier.

Matlab Cascade Classifier is a wrapper over OpenCV one. There is a good tutorial for Matlab classifier.

Total hit and false alarm rates calculated using hit (stageHR) and false alarm (stageFAR) rates for each stage:

totalHR = stageHR^NumStages;    
totalFAR = stageFAR^NumStages.

Thus values of hit and false alarm rates for each stage depend on number of stages.

Number of stages influences the amount of training data: number of positive samples to use at each stage can be estimated using the following formula (see link):

number of positive samples = floor(totalPositiveSamples / (1 + (NumStages- 1) * (1 - stageHR)))

Following information is useful for choosing a number of stages:

  • "Stages with a lower false positive rate are more complex because they contain a greater number of weak learners."
  • "Stages with a higher false positive rate contain fewer weak learners."
  • "Generally, it is better to have a greater number of simple stages because at each stage the overall false positive rate decreases exponentially. For example, if the false positive rate at each stage is 50%, then the overall false positive rate of a cascade classifier with two stages is 25%. With three stages, it becomes 12.5%, and so on."