1 | initial version |
To completely understand stages you should first read the Viola and Jones paper which discusses the principle of cascade classifiers which is a combination of weak classifiers to obtain a strong classifier. However compared to the official implementation, OpenCV has a slight addition, which are stages.
Basically
Now how to define how much stages you need? Start by adding for example 25 stages, and see how the returned acceptanceRatio
is small enough. I usually suggest until it goes below 10^-5. After that you are overfitting the actual model from my experience. I implemented an overload function that allows adding a acceptanceRatioBreakValue
. Take a look here.
2 | No.2 Revision |
To completely understand stages you should first read the Viola and Jones paper which discusses the principle of cascade classifiers which is a combination of weak classifiers to obtain a strong classifier. However compared to the official implementation, OpenCV has a slight addition, which are stages.
Basically
Now how to define how much stages you need? Start by adding for example 25 stages, and see how the returned acceptanceRatio
is small enough. I usually suggest until it goes below 10^-5. After that you are overfitting the actual model from my experience. I implemented an overload function that allows adding a acceptanceRatioBreakValue
. Take a look here.
Addition: if you want a complete wrapup of the traincascade parameters and useful settings, you can get the just released book OpenCV 3 Blueprints which has a complete chapter discussing the interface.