人脸检测——FDDB数据集评估

人脸检测——FDDB数据集评估

一、FDDB数据集简介

FDDB数据集官网:http://vis-www.cs.umass.edu/fddb/index.html
在这里插入图片描述

  • FDDB数据集用于人脸检测算法。This data set contains the annotations for 5171 faces in a set of 2845 images taken from the Faces in the Wild data set。他的人脸原始标签的box是椭圆型,所以评估时候有rectangle和椭圆两种方式。
  • 图片文件夹:包含两个文件夹2002和2003两个文件夹
  • ├── 2002
    │ ├── 07
    │ ├── 08
    │ ├── 09
    │ ├── 10
    │ ├── 11
    │ └── 12
    ├── 2003
    │ ├── 01
    │ ├── 02
    │ ├── 03
    │ ├── 04
    │ ├── 05
    │ ├── 06
    │ ├── 07
    │ ├── 08
    │ └── 09
  • 标签文件 FDDB-folds文件夹,包括20个txt文件。
  • FDDB-fold-01-ellipseList.txt 内容格式:
FDDB-fold-xx-ellipseList.txt" in the following 
format:
...
<image name i>
<number of faces in this image =im>
<face i1>
<face i2>
...
<face im>
...

number of faces in this image =im 代表这张图的人脸个数, each face 是:
<major_axis_radius minor_axis_radius angle center_x center_y 1>.
例如:
2002/08/11/big/img_591
1
123.583300 85.549500 1.265839 269.693400 161.781200 1

  • 另外一种txt是只包含图片路径:比如:2003/01/15/big/img_763
    FDDB-folds
    │ ├── FDDB-fold-01-ellipseList.txt
    │ ├── FDDB-fold-01.txt
    │ ├── FDDB-fold-02-ellipseList.txt
    │ ├── FDDB-fold-02.txt
    │ ├── FDDB-fold-03-ellipseList.txt
    │ ├── FDDB-fold-03.txt
    │ ├── FDDB-fold-04-ellipseList.txt
    │ ├── FDDB-fold-04.txt
    │ ├── FDDB-fold-05-ellipseList.txt
    │ ├── FDDB-fold-05.txt
    │ ├── FDDB-fold-06-ellipseList.txt
    │ ├── FDDB-fold-06.txt
    │ ├── FDDB-fold-07-ellipseList.txt
    │ ├── FDDB-fold-07.txt
    │ ├── FDDB-fold-08-ellipseList.txt
    │ ├── FDDB-fold-08.txt
    │ ├── FDDB-fold-09-ellipseList.txt
    │ ├── FDDB-fold-09.txt
    │ ├── FDDB-fold-10-ellipseList.txt
    │ ├── FDDB-fold-10.txt

二、评估流程

  • 1、下载数据和评估代码,数据就是上面图片文件夹标签文件夹

  • 2、下载评估代码文件:evaluation

  • 3、编译evaluation代码(ubuntu16.04下)

    • 系统环境:opencv3.2.0 gnuplot
      安装gnuplot
    sudo apt-get install gnuplot
    
    • 编译evaluation
      1)修改Makefile文件

      # 1、加入下面内容
      INCS = -I/usr/local/include/opencv
      
      LIBS = -L/usr/local/lib -lopencv_core -lopencv_imgproc -lopencv_highgui
             -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d 
             -lopencv_objdetect -lopencv_contrib -lopencv_legacy
      		
      # 2、修改 evaluate., $(CC) $(OBJS) -o $@ $(LIBS)这一句前面Tab键自己输入下,也就是空格,要不然可能报错:***missing separator. Stop
      
      evaluate: $(OBJS)
      
          	$(CC) $(OBJS) -o $@ $(LIBS)
      

      2)修改common.hpp 13行,ppm改为jpg

      #define __IMAGE_FORMAT__ ".jpg"
      //#define __IMAGE_FORMAT__ ".ppm"
      #define __CVLOADIMAGE_WORKING__
      

      3)在evaluation 目录下

      make
      
      • 自己算输出文件的个格式:有十个文件,命名为下面格式,分别对用上面标签文件的图片内容。
        ├── fold-01-out.txt
        ├── fold-02-out.txt
        ├── fold-03-out.txt
        ├── fold-04-out.txt
        ├── fold-05-out.txt
        ├── fold-06-out.txt
        ├── fold-07-out.txt
        ├── fold-08-out.txt
        ├── fold-09-out.txt
        └── fold-10-out.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>.
  • 例如:
    2002/08/11/big/img_591
    1
    192.178558 60.700516 150.671692 210.003891 0.998205
    2002/08/26/big/img_265
    3
    302.738037 58.903488 79.118591 124.53154 0.999873
    63.425415 33.952583 84.562866 119.966179 0.999395
    162.020691 101.475128 45.098541 75.268555 0.994589

  • 3 开始评估

    • 1)修改runEvaluate.pl文件
    my $GNUPLOT = "/usr/bin/gnuplot"; # 修改为gnuplot库目录
    # where the binary is
    my $evaluateBin = "./evaluate"; 
    # where the images are
    my $imDir = "../"; # 图片目录,2002文件夹上一级目录
    # where the folds are
    my $fddbDir = "../FDDB-folds/"; # 标签目录
    # where the detections are
    my $detDir = "../resulst/" # fold-01-out.txt所在文件夹的目录
    
  • 生成四个文件

    ContROC.png
    ContROC.txt*
    DiscROC.png
    DiscROC.txt
    
  • roc curve DiscROC.png*
    在这里插入图片描述

  • 1
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值