how to draw Opencv face detection Adaboost ROC/PR (绘制方法)
2012-11-18 17:08
288 查看
关于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/
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/
相关文章推荐
- how to draw Opencv face detection Adaboost ROC/PR (绘制方法)
- OpenCV怎么画箭头(How to draw an arrow)
- 怎么在UIView上绘制文本?(How to draw text in UIView?)
- OpenCV怎么画箭头(How to draw an arrow)
- 如何绘制用例图 - How to Draw Use Case Diagram
- CCDrawNode(是一个节点有drawDot drawSegment drawPolygon方法 可以类绘制点 线段 多边形--与drawing primitives不同 采用批渲染)
- How To: 屏蔽组件 Design-time 显示的属性以及方法
- hdu 4723 How Long Do You Have to Draw(贪心)
- adaboost xgboost gbdt 三个boosting方法整理
- OpenCV例程2 how to scan images
- Android配置opencv开发环境并运行face-detection 人脸检测例程
- EF 接收OUTPUT参数的方法 How to Retrieve Stored Procedure Output Parameters in Entity Framework
- 【Video Tracking & Detection】系列三之Algorithm Adaboost
- opencv haar+adaboost使用心得
- OpenCV中的Haar+Adaboost(五):AdaBoost之DAB与GAB
- 《FAQ:OpenCV Haartraining》——使用OpenCV训练Haar like+Adaboost分类器的常见问题
- opencv4android --- android studio上的face_detection过程记录
- How to Draw with HTML 5 Canvas
- How To Draw Graphs with Core Plot, Part 2
- HDU 4723 How Long Do You Have to Draw