关于adaboost的一些说明 cf.http://www.opencv.org.cn/forum/viewtopic.php?t=4264
Rainer Lienhart, Empirical Analysis of Detection Cascades of Boosted Classifiers for Rapid Object Detection: Receiver Operating Curves (ROCs) were constructed by varying the required number of detected faces per actual face before merging into a single detection result.
An Extended Set of Haar-like Features for Rapid Object Detection: We can easily construct an non-optimal ROC by smoothly varying offset b.
PAUL VIOLA. Robust Real-Time Face Detection: To create the ROC curve the threshold of the perceptron on the final layer classifier is adjusted from+∞to−∞. Adjusting the threshold to +∞will yield a detection rate of 0.0 and a false positive rate of 0.0. Adjusting the threshold to−∞, however, increases both the detection rate and false positive rate, but only to a certain point. Neither rate can be higher than the rate of the detection cascade minus the final layer. In effect, a threshold of−∞ is equivalent to removing that layer. Further increasing the detection and false positive rates requires decreasing the threshold of the next classifier in the cascade. Thus, in order to construct a complete ROC curve, classifier layers are removed.
生成Opencv的人脸检测的ROC曲线方法
通过在void CascadeClassifier::detectMultiScale( const Mat& image, vector<Rect>& objects, vector <int>&rejectLevels,vector<double>&levelWeights, double scaleFactor, int minNeighbors, int flags, Size minObjectSize, Size maxObjectSize, bool outputRejectLevels )中提供空的rejectLevels 和levelWeights以及设置outputRejectLevels为true,可以得到含有分数的检测结果(调用了cvHaarDetectObjectsForROC()方法生成),但是这种数据在FDDB[6]的衡量标准下曲线还挺正常,但是在VOC DevKit下的曲线就病态了(对于alt,alt2,alt-tree,default都是这样)。所以最好的办法还是修改CascadeClassifier的cascade level number and stage threshold, 对于Opencv中自带的五个cascade classifier,如profile face和alt, alt2, default,可以通过设置cascade level和stage threshold(NOTE: cascadeClassifier> oldCascade->hid_cascade->stage_classifier>threshold)来生成测试数据,对于alt_tree,只设置stage threshold 就好了,然后用DevKit的matlab 代码生成多个(precision, recall)点,这样就可以绘制PR曲线了。
1. Xiangxin Zhu, Deva Ramanan. Face Detection, Pose Estimation, and Landmark Localization in the Wild. CVPR. 2012.http://www.ics.uci.edu/~xzhu/face/
2. Rainer Lienhart. Empirical Analysis of Detection Cascades of Boosted Classifiers for Rapid Object Detection.
3. Rainer Lienhart. An Extended Set of Haar-like Features for Rapid Object Detection.
4. Wang Qiang. Part-based Object Detection for Real-time Systems.
5. UltraCompare Pro(文件内容对比工具) 8.30.0.1003. http://www.downxia.com/downinfo/1287.html
6. V. Jain and E. Learned-Miller. Fddb: A benchmark for face detection in unconstrained settings. Technical Report UMCS- 2010-009, UMass, Amherst, 2010.http://vis-www.cs.umass.edu/fddb/