在windows平台上测试自己的人脸检测算法在FDDB数据集

弄了好几天终于能在FDDB数据集上测试自己用wider face数据集训练的的faster rcnn的检测器的性能了。


1、首先在官网http://vis-www.cs.umass.edu/fddb/index.html下载图片和标注文件,FDDB的标注文件,分为图片名称文件FDDB-fold-01.txt、对应的标注文件:FDDB-fold-01-ellispe.txt,各有10个,把10个文件按顺序合并,分别命名为Fold_all.txt和Elsp.txt.


2、读Fold.txt文件,依照顺序做人脸检测,将检测结果输出出来(我是将faster rcnn中test.py文件修改得到的检测结果)。


3、我的mxnet的faster rcnn生成的检测结果格式为<image name i> score x1 y1 x2 y2,与FDDB要求的格式http://vis-www.cs.umass.edu/fddb/README.txt不一致,所以写了个C++程序将我的输出格式转化为FDDB要求的格式

// ToFDDBResults.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include<iostream>
#include<fstream>
#include<sstream>
#include<string>
#include<vector>
using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{
	ifstream InputFile("comp4_det_Foldall_face.txt");
	ofstream OutputFile("comp4_det_Foldall_face_results.txt");
	string line, ImageNameTemp;
	stringstream ss;
	int count = 1;
	vector<double> vec_score;
	vector<double> vec_x1;
	vector<double> vec_y1;
	vector<double> vec_x2;
	vector<double> vec_y2;
	
	double score, x1, y1, x2, y2;
	string ImageName;
	getline(InputFile, line);
	ss << line;
	ss >> ImageName >> score >> x1 >> y1 >> x2 >> y2;
	vec_score.push_back(score);
	vec_x1.push_back(
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值