how to draw Opencv face detection Adaboost ROC/PR (绘制方法)

关于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/

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值