face_recognition安装记录
face_recognition使用dlib最先进的面部识别功能构建而成,并且该模型在LFW数据集中有99.38%的准确率。
1.环境
Win10+anaconda+python3.6
2.安装方式
有的教程说需要安装提前安装Cmake和boost,但是新版dlib是不需要boost的,我只提前安装了Cmake
流程:安装Cmake—>安装dlib—>安装face_recognition
安装Cmake
直接在Anaconda navigator里面安装就很方便,选择自己想要安装的环境,搜索选中Apply就好了
安装dlib:
①使用whl方式安装,anaconda的软件库里面是没有dlib的,需要自己去https://pypi.org/project/dlib/#history 下载一个适用于python3.6版本的whl文件,我下载的是19.8.1
②放在想要安装的环境中的Scripts文件夹下,我的是C:\Users\Krystal\Anaconda3\envs\pytorch\Scripts
③打开Anaconda prompt,激活想要安装dlib的环境
④命令行输入pip install dlib==19.8.1
安装成功
这里有很多教程是使用pip install dlib-19.8.1-cp36-cp36m-win_amd64.whl,但我的就一直不行,显示没有此路径或文件,直接指定版本号反而很快就安装成功了
安装face_recognition
dlib安装好再安装face_recognition就简单很多了,继续输入命令pip install face_recognition
安装成功。如果显示ReadTimedoutError就再试一次。
3. 验证
命令行输入python,启动后输入import face_recognition不报错则为安装成功。
写给自己:心态要好,要努力,要上进,要毕业…┗( T﹏T )┛