文章参考:https://blog.csdn.net/hongbin_xu/article/details/76284134

文章参考:https://blog.csdn.net/weixin_40450867/article/details/81734815

文章参考:https://blog.csdn.net/esting_tang/article/details/80974330

该库可以通过python或者命令行即可实现人脸识别的功能。使用dlib深度学习人脸识别技术构建,在户外脸部检测数据库基准(Labeled Faces in the Wild)上的准确率为99.38%。 在github上有相关的链接和API文档。

配置环境

安装dlib

方法一

首先配置dlib

我这里有一个dlib包,链接:https://pan.baidu.com/s/1drnxz251fvVVc9qoh61TTg 提取码:9pcl

下载好后运行cmd或者 pycharm的terminal 进入dlib 包所在的路径下,运行

pip install 【所下载的包】
import dlib 

方法二

https://pypi.org/project/dlib/18.17.100/#downloads 找到需要的dlib版本

新版本需要自行编译

下载好后pip install 【文件路径】安装

安装face_recognition

直接使用 pip install 即可 我使用了 清华园的镜像

注意:下载速度过慢会报错

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple face_recognition
import face_recognition

写一小段代码进行验证,我准备了四张图片

 import face_recognition
mayun_image = face_recognition.load_image_file("mayun.jpg");
jobs_image = face_recognition.load_image_file("jobs.jpg");
task1_image = face_recognition.load_image_file("task1.jpg"); mayun_encoding = face_recognition.face_encodings(mayun_image)[0]
jobs_encoding = face_recognition.face_encodings(jobs_image)[0]
task1_encoding = face_recognition.face_encodings(task1_image)[0] results = face_recognition.compare_faces([mayun_encoding, jobs_encoding], task1_encoding)
labels = ['mayun', 'jobs'] print('results:'+str(results)) for i in range(0, len(results)):
if results[i] == True:
print('The person is:'+labels[i])

运行结果

Windows环境搭建 face_recognition,dlib的更多相关文章

  1. Windows环境搭建Red5流媒体服务器指南

    Windows环境搭建Red5流媒体服务器指南 测试环境:Windows 7 一.   下载安装程序 red5-server 下载地址 https://github.com/Red5/red5-ser ...

  2. Battery Historian for windows环境搭建

    Battery Historian for windows环境搭建 简介:Battery historian是一款通过上传bugreport文件分析用户手机中App的电池耗电情况的工具. Batter ...

  3. Android NDK r8 windows环境搭建

    Android NDK r8 windows环境搭建 一.默认基础环境为已经完成Android开发环境的搭建 需要的软件及插件 1. JDK-7u25 2. Eclipse 3. Android SD ...

  4. Windows环境搭建Red5流媒体服务器指南(转)

    Windows环境搭建Red5流媒体服务器指南 Windows环境搭建Red5流媒体服务器指南 测试环境:Windows 7 一.   下载安装程序 red5-server 下载地址 https:// ...

  5. Windows环境搭建与第一个C# Sample

    Redis入门 - Windows环境搭建与第一个C# Sample   什么是Redis? Redis是一个开源.支持网络.基于内存.键值对存储数据库,使用ANSI C编写.从2013年5月开始,R ...

  6. Windows环境搭建Web自动化测试框架Watir

    Windows环境搭建Web自动化测试框架Watir 一.前言     Web自动化测试一直是一个比较迫切的问题,对于现在web开发的敏捷开发,却没有相对应的敏捷测试,故开此主题,一边研究,一边将We ...

  7. Windows环境搭建mysql服务器

    Windows环境搭建mysql服务器: 1.下载mysql-installer-community-5.7.3.0-m13.2063434697并安装  安装详细步骤>> 2.安装mys ...

  8. Go(02)windows环境搭建和vscode配置

    之前讲述过linux环境下Go语言开发环境搭建,这次简述下windows的搭建以及vscode配置 windows环境搭建 同样去https://studygolang.com/dl下载windows ...

  9. Windows 环境搭建Redis集群(win 64位)

    转: http://blog.csdn.net/zsg88/article/details/73715947 参考:https://www.cnblogs.com/tommy-huang/p/6240 ...

随机推荐

  1. 实验吧Web-易-简单的sql注入之3(报错的sql盲注之exp)

    题目提示是报错注入,于是就用盲注技巧来注入. 这里注入时发现floor,extractvalue,updatexml被吃掉了,用exp可以注入成功.(记住大小写绕过等技巧) 1.爆库 ' or exp ...

  2. XML--XML概览

    参考 https://www.cnblogs.com/fangjian0423/p/xml-namespace.html http://www.w3school.com.cn/x.asp xmlns ...

  3. CI中site_url()和base_url()的区别

    CI中site_url()和base_url()的区别 来源:未知    时间:2014-10-20 11:38   阅读数:150   作者:xbdadmin [导读] 在使用CI框架的使用经常碰到 ...

  4. ab工具压接口的时候post传参问题

    ab  -n 10000 -c 40 -p  [参数所在文件] -T 'application/json'  http://xxx 以上命令, 压测需要post json格式的参数的api时, 一定注 ...

  5. (函数)P1149 火柴棒等式

    题解: #include<stdio.h>int a[10]={6,2,5,5,4,5,6,3,7,6};int num(int n){                          ...

  6. 面试准备 HTTP协议

    http协议的主要特点 简单快速  //某个资源是固定的 (统一资源符)UII 灵活  //http头部有个数据类型,完成不同数据类型的传输 无连接  //链接一次就会断开 无状态 //客户端和服务端 ...

  7. Linux安装已编译好的FFmpeg,基于centos7

    1.访问https://johnvansickle.com/ffmpeg/ 2.下载地址:https://johnvansickle.com/ffmpeg/releases/ffmpeg-releas ...

  8. 微信小程序官方示例 官方weui-wxss下载于安装 详解

    1.小程序示例源码:https://github.com/wechat-miniprogram/miniprogram-demo 2.微信 weui下载地址:https://github.com/we ...

  9. 84.常用的返回QuerySet对象的方法使用详解:select_related, prefetch_related

    1.select_related: 只能用在一对多或者是一对一的关联模型之间,不能用在多对多或者是多对一的关联模型间,比如可以提前获取文章的作者,但是不能通过作者获取作者的文章,或者是通过某篇文章获取 ...

  10. MyBatis 查询结果的缓存

    MyBatis的缓存指的是缓存查询结果,当以后使用相同的sql语句.传入相同的参数进行查询时,可直接从mybatis本地缓存中获取查询结果,而不必查询数据库. mybatis的缓存包括一级缓存.二级缓 ...