windows下测试人脸检测分类器在FDDB数据库的性能
来源:互联网 发布:windows aero桌面性能 编辑:程序博客网 时间:2024/05/22 15:32
本文参考
2002文件夹、2003文件夹、Fold_all.txt、Elsp.txt、evaluation.tgz、FDDB-folds.tgz、
其中2002文件夹和2003文件夹是解压originalPics.tar.gz得到的。
而关于Fold_all.txt与Elsp.txt,则是FDDB-folds.tgz中的各个10个txt的整合版,把它们整合到一起
读Fold.txt文件,依照顺序做人脸检测,将检测结果输出出来,格式如下:
<image name i><number of faces in this image =im><face i1><face i2>...<face im>
<face im>的表达形式有以下两种: 4 a. Rectangular regions Each face region is represented as: <left_x top_y width height detection_score> 4 b. Elliptical regions Each face region is represented as: <major_axis_radius minor_axis_radius angle center_x center_y detection_score>.
http://vis-www.cs.umass.edu/fddb/README.txt
解压evaluation.tgz,将其源文件和头文件包含在工程中,添加OpenCV的属性表。
然后做以下修改:
在evaluate.cpp中的main函数,把第235行改为如下,即在max前面添加括号,否则会冲突。
Results *r = new Results(imName, (std::numeric_limits<double>::max)(), NULL, annot, det);
在项目的属性栏中做如下改动:
把下面代码中路径改成自己的:
#ifdef _WIN32 string baseDir = "F:/MachineLearningVisualApplicationGroup/face_detect/face_lib/"; string listFile = "F:/MachineLearningVisualApplicationGroup/face_detect/name.txt"; string detFile = "F:/MachineLearningVisualApplicationGroup/face_detect/data.txt"; string annotFile = "F:/MachineLearningVisualApplicationGroup/face_detect/data0.txt";
还要注意 detFormat = DET_RECTANGLE; 如果你的检测输出是椭圆,这里就要改成椭圆。编译通过,生成解决方案。
找到生成的 .exe文件,在命令行里运行,根据提示输入对应文件的路径。我的如下所示:
FDDBTest2.exe -a F:/MachineLearningVisualApplicationGroup/face_detect/data0.tx -d F:/MachineLearningVisualApplicationGroup/face_detect/data.txt -l F:/MachineLearningVisualApplicationGroup/face_detect/face_lib/
运行结束之后,生成两个ROC文件:
DiscRoc.txt和ContRoc.txt,这就是最终要画图ROC的数据。
6、生成ROC图数据
安装perl,关于perl的配置,请戳:http://jingyan.baidu.com/article/9f7e7ec0b798ae6f281554e9.html?st=2&os=0&bd_page_type=1&net_type=1
安装好之后,修改原来的一个用于评测的pl文件:
#!/usr/bin/perl -wuse strict;#### VARIABLES TO EDIT ##### where gnuplot ismy $GNUPLOT = "D:/gnuplot/bin/gnuplot"; # where the binary ismy $evaluateBin = "evaluate"; # where the images aremy $imDir = "F:/soft/c++/Test_FDDB/Test_FDDB"; #FDDB数据库的图片在哪# where the folds aremy $fddbDir = "F:/soft/c++/Test_FDDB/Test_FDDB/FDDB-Folds"; #fddb图片的两个txt# where the detections aremy $detDir = "C:/Users/strstr/Desktop/FDDB_DRAW/Filep/"; #图片存放的位置###########################my $detFormat = 0; # 0: rectangle, 1: ellipse 2: pixelssub makeGNUplotFile{ my $rocFile = shift; my $gnuplotFile = shift; my $title = shift; my $pngFile = shift; open(GF, ">$gnuplotFile") or die "Can not open $gnuplotFile for writing\n"; #print GF "$GNUPLOT\n"; print GF "set term png\n"; print GF "set size 1,1\n"; print GF "set output \"$pngFile\"\n"; #print GF "set xtics 500\n"; print GF "set ytics 0.1\n"; print GF "set grid\n"; #print GF "set size ratio -1\n"; print GF "set ylabel \"True positive rate\"\n"; print GF "set xlabel \"False positives\"\n"; #print GF "set xr [0:2000]\n"; print GF "set yr [0:1.0]\n"; print GF "set key right bottom\n"; print GF "plot \"$rocFile\" using 2:1 title \"$title\" with lines lw 2 \n"; close(GF);}my $gpFile = "C:/Users/strstr/Desktop/FDDB_DRAW/Filep/ContROC.p";my $gpFile1 = "C:/Users/strstr/Desktop/FDDB_DRAW/Filep/DistROC.p";my $title = "YotoFace";# plot the two ROC curves using GNUplotmakeGNUplotFile("C:/Users/strstr/Desktop/FDDB_DRAW/tempContROC.txt", $gpFile, $title, $detDir."ContROC.png");makeGNUplotFile("C:/Users/strstr/Desktop/FDDB_DRAW/tempDiscROC.txt", $gpFile1, $title, $detDir."DiscROC.png");
安装GUNPLOT,我装的gp501-win32-mingw。
打开刚才生成的两个.p文件,file->output,将可以看见生成的ROC曲线啦。
- windows下测试人脸检测分类器在FDDB数据库的性能
- Windows下如何在FDDB数据库上评测自己的人脸检测分类器
- Windows下测试算法在FDDB数据库的性能
- Windows下测试算法在FDDB数据库的性能
- FDDB数据库上评测人脸检测分类器
- 使用FDDB人脸样本检测库,测试自己的人脸检测算法性能并生成ROC曲线。
- 【深度学习:目标检测】 py-faster-rcnn标注FDDB人脸便于其在FDDB上进行测试
- ccv下测试fddb数据库
- py-faster-rcnn标注FDDB人脸便于其在FDDB上进行测试
- 如何看待Tencent AI 人脸检测结果在FDDB上的逆天表现?
- 人脸检测FDDB评测的详细步骤
- 最新FDDB人脸检测Top25榜单里的中国公司--广州颜鉴信息科技有限公司
- FDDB人脸检测测评数据集介绍
- FDDB数据集-人脸检测-ROC曲线绘制
- MariaDB 5.5在Windows下的性能测试
- vs2015下,使用人脸检测算法对FDDB数据集进行测评
- 性能测试的分类
- 性能测试的分类
- C语言数据类型及值域
- 汇编语言(3)寄存器与内存访问
- 03--机器学习之SVM(暂定)
- float
- java中的类
- windows下测试人脸检测分类器在FDDB数据库的性能
- 判断一棵树是否为完全二叉树
- 文件搜索指令find
- 架构
- Node.js的module.exports与exports
- SQL基本操作(一)
- margin
- spring cloud 之 config-server
- 微信公账号支付:签名验证失败的解决办法