【人脸活体检测】参数介绍

1 TP、TN、FP、FN

TP、TN、FP、FN中第一个字母表示分类器识别结果是否正确,正确用True的首字母T表示,错误用False的首字母F表示。第二个字母表示分类器的判定结果,P表示分类器判定为正样本,N表示分类器判定为负样本。所以:

TP:分类器识别正确,分类器认为该样本为正样本;
TN:分类器识别正确,分类器认为该样本为负样本;
FP:分类器识别结果错误,分类器认为该样本是正样本;所以实际上该样本是负样本;
FN:分类器识别结果错误,分类器认为该样本是负样本;所以实际上该样本是正样本;

项目真实_1真实_0预测_1TPFP预测_0FN TN

2 APCER/BPCER/ACER/FRR/FAR/HTER

  • Attack Presentation Classification Error Rate[APCER] : FP / (TN + FP)
  • Bona Fide Presentation Classification Error Rate[BPCER] : FN / (TP + FN )
  • Average Classification Error Rate[ACER] : (APCER + BPCER) / 2.0
  • False Rejection Rate[FRR] : FN / (TN + FN )
  • False Acceptance Rate[FAR] : FP / (TP + FP)
  • Half Total Error Rate [HTER] : (FAR + FNR) / 2.0

3 roc_curve-副本,别看

fpr, tpr, threshold = roc_curve(test_labels, test_scores, pos_label=1)

test_labels = [[1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0…] (list:595)
test_labels为真实的样本标签

test_scores = [0.863, 0.999, 0.999, 0.979, 0.998, 0.720, 0.996, 0.968, 0.952, 0.980, 0.812, 0.933, 0.895, 0.924, 0.982…] (list:595)
test_scores 对每个样本的预测分数

pos_label = 1
pos_label正样本的标签。 说明test_label = 1是真实人脸。

roc_curve() 函数有3个返回值:

fpr:False positive rate。
tpr:True positive rate。
thresholds

在本例子中,
fpr = [0. 0.002 0.145 0.149 0.170 0.174, 0.231 0.235 0.250 0.254 0.265 0.269, 0.28 0.284 0.517 0.517 0.555…] (ndarray(80,))

tpr = [0. 0. 0. 0. 0. 0., 0. 0. 0. 0. 0. 0., 0. 0. 0. 0.00833 0.0083 0.0166, 0.0166 0.025 0.025 0.033 0.033 0.0416, …](ndarray(80,))

thresholds = [2. 1. 0.999 0.999 0.998 0.998, 0.998 0.998 0.997 0.997 0.997 0.9972, 0.9969 0.9969 0.9828 0.9827 0.9781 0.9781, 0.9780 …](ndarray(80,))

其中,thresholds就是原来的test_scores从高到低排序。每个阈值对应一个 fpr 和 tpr。

例如,当thresholds = 2时

test_scores预测(2为阈值)真实(看相应的test_labels)0.863

Original: https://blog.csdn.net/m0_45682738/article/details/123474839
Author: 菜菜子-
Title: 【人脸活体检测】参数介绍

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/663774/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球