> ## Content Index
> Fetch the complete content index at: https://yinguobing.com/blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# FDDB人脸检测算法评价标准
- URL: https://yinguobing.com/blog/fddb/
- Published: 2018-04-24T08:13:38.000Z
- Updated: 2018-04-24T08:32:37.000Z
- Description: 适用于人脸检测算法评价的数据集与具体的评价方法
- Author: 尹国冰
- Tags: 深度学习

FDDB[\[1\]](#fn1)是Face Detection Data Set and Benchmark的缩写，这是一款专门针对人脸识别算法的评测方法与标准。

FDDB一共包含了2845张图片，包含彩色以及灰度图，其中的人脸总数达到5171个。这些人脸所呈现的状态多样，包括遮挡、罕见姿态、低分辨率以及失焦的情况。下方为一些样张。

![fddb-03](https://yinguobing.com/blog/content/images/2018/04/fddb-03.jpg)

![fddb-02](https://yinguobing.com/blog/content/images/2018/04/fddb-02.jpg)

![fddb-01](https://yinguobing.com/blog/content/images/2018/04/fddb-01.jpg)

## 面部区域标记方法

目前常用的标记方法包括矩形标记法与椭圆标记法两种。

### 矩形标记法

传统方法都采用矩形标记法，用一个矩形框将画面中的人脸区域包含在内，如下图所示。这种标记方法存在的问题在于很难给出一个恰好包含面部的矩形框，并且获得各种不同算法的一致的认可。因此采用矩形框的方法无法很好的对不同算法的结果做出准确且有效的评价。  
![fddb-04](https://yinguobing.com/blog/content/images/2018/04/fddb-04.jpg)

### 椭圆标记法

由于人脸天然呈现为椭圆形，所以用椭圆形来表征是一种较为准确的方法，如下图所示。这种方法可以对侧脸与转动后的面部进行描述。

![fddb-05](https://yinguobing.com/blog/content/images/2018/04/fddb-05.jpg)

这样人脸就可以用5个变量来表征：

- ra：椭圆长轴半径
- rb：椭圆短轴半径
- theta：椭圆长轴偏转角度
- cx：椭圆圆心x坐标
- cy：椭圆圆心y坐标

下图分别为针对正面、侧面与仰头的情形绘制的椭圆标记区域示意图。  
![fddb-06](https://yinguobing.com/blog/content/images/2018/04/fddb-06.jpg)

## 量化评价指标

### 评估前提

1. 检测应当在连续的图片区域内进行。
2. 所有涉及到融合交叠区域或者相似区域的后处理行为应当已经完成。
3. 单次检测应当检测且只检测一张完整面部，即一次检测输出多张面部或者需要多次检测才能输出一个面部区域是无效的。

### 评分方式

若一次检测输出区域为di，对应的标准区域为li，则检测结果S可以用下方公式评价：  
![fddb-eval-equ](https://yinguobing.com/blog/content/images/2018/04/fddb-eval-equ.jpg)

某些情况下可能会出现检测区域重叠，如下图所示。  
![fddb-overlap](https://yinguobing.com/blog/content/images/2018/04/fddb-overlap.jpg)

这种情况下定义如下计算方式：  
![fddb-eval-graph](https://yinguobing.com/blog/content/images/2018/04/fddb-eval-graph.jpg)

可以用公式表示为：  
![fddb-eval-equ02](https://yinguobing.com/blog/content/images/2018/04/fddb-eval-equ02.jpg)

其中：L代表评价数据，D代表检测数据。节点V是L与D的并集。图G中每一个节点di都与li相连接，并且有权重wij，从公式1计算得出。对于每一个节点di还定义了节点ni来代表检测结果di没有与任何L内的面部区域符合。因此可以匹配的路径M是所有路径E的一个子集。

### 评分类别

用di表征第i个检测获得的检测值，vi表征匹配集合M中的评价值，则可以通过以下两种方式来获得最终的评分yi。

方式1 - Discrete score (DS)  
![eval-equ-01](https://yinguobing.com/blog/content/images/2018/04/eval-equ-01.jpg)

方式2: - Continuous score (CS):  
![eval-equ-02](https://yinguobing.com/blog/content/images/2018/04/eval-equ-02.jpg)

获得具体yi值之后，可以通过Receiver Operating Characteristic (ROC) 曲线来对不同的算法进行比较。

![roc-ds](https://yinguobing.com/blog/content/images/2018/04/roc-ds.jpg)  
![roc-cs](https://yinguobing.com/blog/content/images/2018/04/roc-cs.jpg)

## 其它

FDDB官网提供了原始图像的下载[\[2\]](#fn2)。各种算法的公开检测结果可以参考官方测试[\[3\]](#fn3)

---

1. [http://vis-www.cs.umass.edu/fddb/results.html](http://vis-www.cs.umass.edu/fddb/results.html?ref=yinguobing.com) [↩︎](#fnref1)
2. [http://tamaraberg.com/faceDataset/originalPics.tar.gz](http://tamaraberg.com/faceDataset/originalPics.tar.gz?ref=yinguobing.com) [↩︎](#fnref2)
3. [http://vis-www.cs.umass.edu/fddb/results.html](http://vis-www.cs.umass.edu/fddb/results.html?ref=yinguobing.com) [↩︎](#fnref3)