how to draw Opencv face detection Adaboost ROC/PR (绘制方法)
2016-07-28 10:43
295 查看
关于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/
转载来自:http://blog.csdn.net/pobudeyi/article/details/8196699
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/
转载来自:http://blog.csdn.net/pobudeyi/article/details/8196699
相关文章推荐
- python中使用OpenCV进行人脸检测的例子
- opencv 做人脸识别 opencv 人脸匹配分析
- 使用opencv拉伸图像扩大分辨率示例
- Android Studio中配置OpenCV库开发环境的教程
- 基于C++实现kinect+opencv 获取深度及彩色数据
- visual studio 2012安装配置方法图文教程 附opencv配置教程
- OpenCV 2.4.3 C++ 平滑处理分析
- Python中使用OpenCV库来进行简单的气象学遥感影像计算
- 利用Python和OpenCV库将URL转换为OpenCV格式的方法
- python结合opencv实现人脸检测与跟踪
- Python环境搭建之OpenCV的步骤方法
- 用Python从零实现贝叶斯分类器的机器学习的教程
- Python+Opencv识别两张相似图片
- Python实现OpenCV的安装与使用示例
- 在树莓派2或树莓派B+上安装Python和OpenCV的教程
- My Machine Learning
- 机器学习---学习首页 3ff0
- Spark机器学习(一) -- Machine Learning Library (MLlib)
- opencv-python学习一--人脸检测
- 反向传播(Backpropagation)算法的数学原理