OpenCV Haar Classifier result table explanation

∥☆過路亽.° 提交于 2019-12-03 12:38:10

Searching for "HR" in the OpenCV source leads us to this file. Lines 1703-1707 inside CvCascadeBoost::isErrDesired print the table:

cout << "|"; cout.width(4); cout << right << weak->total;
cout << "|"; cout.width(9); cout << right << hitRate;
cout << "|"; cout.width(9); cout << right << falseAlarm;
cout << "|" << endl;
cout << "+----+---------+---------+" << endl;

So HR and FA stand for hit rate and false alarm. Conceptually: hitRate = % of positive samples that are classified correctly as such. falseAlarm = % of negative samples incorrectly classified as positive.

Reading the code for CvCascadeBoost::train, we can see the following while loop

cout << "+----+---------+---------+" << endl;
cout << "| N  | HR      | FA      |" << endl;
cout << "+----+---------+---------+" << endl;

do
{
    [...]
}
while( !isErrDesired() && (weak->total < params.weak_count) );

Just looking at this, and not knowing much about the specifics of boosting, we can make the educated guess that training works until error is low enough, as measured by falseAlarm.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!