python与人工智能论文_python人工智能AI复现 ArcFace 毕业论文学术

InsightFace

Implementation of Additive Angular Margin Loss for Deep Face Detection. paper.

@article{deng2018arcface,

title={ArcFace: Additive Angular Margin Loss for Deep Face Recognition},

author={Deng, Jiankang and Guo, Jia and Niannan, Xue and Zafeiriou, Stefanos},

journal={arXiv:1801.07698},

year={2018}

}

DataSet

CASIA WebFace DataSet, 494,414 faces over 10,575 identities.

Dependencies

PyTorch 1.0.0

Usage

Data wrangling

Extract images, scan them, to get bounding boxes and landmarks:

$ python pre_process.py

Image alignment:

Face detection(MTCNN).

Face alignment(similar transformation).

Central face selection.

Resize -> 112x112.

Original

Aligned

Original

Aligned

0_raw.jpg

0_img.jpg

1_raw.jpg

1_img.jpg

2_raw.jpg

2_img.jpg

3_raw.jpg

3_img.jpg

4_raw.jpg

4_img.jpg

5_raw.jpg

5_img.jpg

6_raw.jpg

6_img.jpg

7_raw.jpg

7_img.jpg

8_raw.jpg

8_img.jpg

9_raw.jpg

9_img.jpg

Train

$ python train.py

To visualize the training process:

$ tensorboard --logdir=runs

Performance evaluation

DataSet

Use Labeled Faces in the Wild (LFW) dataset for performance evaluation:

13233 faces

5749 identities

1680 identities with >=2 photo

Download LFW database put it under data folder:

$ wget http://vis-www.cs.umass.edu/lfw/lfw-funneled.tgz

$ wget http://vis-www.cs.umass.edu/lfw/pairs.txt

$ wget http://vis-www.cs.umass.edu/lfw/people.txt

Get it started

$ python lfw_eval.py

Results

#

image size

network

use-se

loss func

gamma

batch size

weight decay

s

m

LFW accuracy

1

112x112

ResNet-152

True

ce

na

128

5e-4

50

0.5

99.42%

2

112x112

ResNet-152

True

focal

2.0

128

5e-4

50

0.5

99.38%

3

112x112

ResNet-101

True

focal

2.0

256

5e-4

50

0.5

99.27%

4

112x112

ResNet-101

False

focal

2.0

256

5e-4

50

0.5

99.23%

θj Distribution

%CE%B8j_dist.png

Error analysis

False Positive

8 false positives:

1

2

1

2

0_fp_0.jpg

0_fp_1.jpg

1_fp_0.jpg

1_fp_1.jpg

2_fp_0.jpg

2_fp_1.jpg

3_fp_0.jpg

3_fp_1.jpg

4_fp_0.jpg

4_fp_1.jpg

5_fp_0.jpg

5_fp_1.jpg

6_fp_0.jpg

6_fp_1.jpg

7_fp_0.jpg

7_fp_1.jpg

False Negative

27 false negative, these 10 are randomly chosen:

1

2

1

2

0_fn_0.jpg

0_fn_1.jpg

1_fn_0.jpg

1_fn_1.jpg

2_fn_0.jpg

2_fn_1.jpg

3_fn_0.jpg

3_fn_1.jpg

4_fn_0.jpg

4_fn_1.jpg

5_fn_0.jpg

5_fn_1.jpg

6_fn_0.jpg

6_fn_1.jpg

7_fn_0.jpg

7_fn_1.jpg

8_fn_0.jpg

8_fn_1.jpg

9_fn_0.jpg

9_fn_1.jpg

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值