Revision history [back]

This is not an error! Given the samples presented and the settings of the training, your cascade has reached its desired potential. Either add more data OR make your requirements harsher! For now it just states, does as good as you requested...

This is not an error! Given the samples presented and the settings of the training, your cascade has reached its desired potential. Either add more data OR make your requirements harsher! For now it just states, does as good as you requested...

Update 1

So lets make it more clear. When setting up a cascade classifier training using your command opencv_traincascade -numPos 7500 -numNeg 3000 -featureType LBP -mode ALL -numStages 12 -w 48 -h 48 most of the deciding parameters are selected automatically.

For example

-minHitRate is set to 0.995 by default and -maxFalseAlarmRate is set to 0.5 by default. This means that for your current model, you allow 5 out of 1000 positive samples to get wrongly classified during the training process, whereas each stage needs to reach a individual false acceptance rate (good classification of negatives) that is a bit better than random guessing, symbolized by 0.5 value.

So try one of the following things

1. Change -minHitRate to 0.998 for example and make it harder to reach your goals. However this is not the best approach, since you force your model to overfit to the training data.
2. Change -maxFalseAlarmRate to for example 0.7, which forces individual stages to be more complex. This is what I suggest if you dont want to add data.

But like being suggested, best thing is to add more discriminative training data to the process. Just to be curious, what is the reported accuracy (value reported after the negative image grabbing) of your model at stage 9?

This is not an error! Given the samples presented and the settings of the training, your cascade has reached its desired potential. Either add more data OR make your requirements harsher! For now it just states, does as good as you requested...

Update 1

So lets make it more clear. When setting up a cascade classifier training using your command opencv_traincascade -numPos 7500 -numNeg 3000 -featureType LBP -mode ALL -numStages 12 -w 48 -h 48 most of the deciding parameters are selected automatically.

For example

-minHitRate is set to 0.995 by default and -maxFalseAlarmRate is set to 0.5 by default. This means that for your current model, you allow 5 out of 1000 positive samples to get wrongly classified during the training process, whereas each stage needs to reach a individual false acceptance rate (good classification of negatives) that is a bit better than random guessing, symbolized by 0.5 value.

So try one of the following things

1. Change -minHitRate to 0.998 for example and make it harder to reach your goals. However this is not the best approach, since you force your model to overfit to the training data.
2. Change -maxFalseAlarmRate to for example 0.7, 0.3, which forces individual stages to be more complex. This is what I suggest if you dont want to add data.

But like being suggested, best thing is to add more discriminative training data to the process. Just to be curious, what is the reported accuracy (value reported after the negative image grabbing) of your model at stage 9?