人脸识别的可解释性
论文标题:Explainable Face Recognition
论文链接:https://arxiv.org/abs/2008.00916
论文代码:https://github.com/stresearch/xfr
1. 下载文件
(1)下载并安装git
https://git-scm.com/downloads
(2)在git bash中运行
git lfs install
git clone https://github.com/stresearch/xfr.git
2. 配置环境
linux
numpy 1.15.2
pandas 0.23.4
python3.6
scikit-image 0.14.1
torch1.3.0
torchvision 0.4.1+cu100
vipy==0.8.16
3. 解压数据
cd data/inpainting-game
bash unpack-aligned.sh
4. 下载LightCNN-29
下载地址:https://drive.google.com/open?id=1Jn6aXtQ84WY-7J3Tpr2_j6sX0ch9yucS(需要翻墙)
将文件放到models/目录下
5. 运行程序
cd demo
python test_whitebox.py
可能出现的报错:
(1)直接下载:data下的文件损坏,.pth文件损坏
在linux下运行 bash unpack-aligned.sh文件时报错,unpickling error
解决办法:
下载git
在git bash运行:
git lfs install
git clone https://github.com/stresearch/xfr.git
下载的文件大小应该是4G多
(2)在linux下运行bash unpack-aligned.sh报错:语法错误、未预期的符号
原因:windows拷过去的,系统格式造成的
解决办法:使用notepad编辑.sh文件,右下角将windows改为linux。
(3)RuntimeError::expected device cpu and type float but get device cpu and dtype bool
错误原因:torch版本过低
解决办法:升级torch版本