Windows环境搭建 face_recognition,dlib
文章参考: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的更多相关文章
- Windows环境搭建Red5流媒体服务器指南
Windows环境搭建Red5流媒体服务器指南 测试环境:Windows 7 一. 下载安装程序 red5-server 下载地址 https://github.com/Red5/red5-ser ...
- Battery Historian for windows环境搭建
Battery Historian for windows环境搭建 简介:Battery historian是一款通过上传bugreport文件分析用户手机中App的电池耗电情况的工具. Batter ...
- Android NDK r8 windows环境搭建
Android NDK r8 windows环境搭建 一.默认基础环境为已经完成Android开发环境的搭建 需要的软件及插件 1. JDK-7u25 2. Eclipse 3. Android SD ...
- Windows环境搭建Red5流媒体服务器指南(转)
Windows环境搭建Red5流媒体服务器指南 Windows环境搭建Red5流媒体服务器指南 测试环境:Windows 7 一. 下载安装程序 red5-server 下载地址 https:// ...
- Windows环境搭建与第一个C# Sample
Redis入门 - Windows环境搭建与第一个C# Sample 什么是Redis? Redis是一个开源.支持网络.基于内存.键值对存储数据库,使用ANSI C编写.从2013年5月开始,R ...
- Windows环境搭建Web自动化测试框架Watir
Windows环境搭建Web自动化测试框架Watir 一.前言 Web自动化测试一直是一个比较迫切的问题,对于现在web开发的敏捷开发,却没有相对应的敏捷测试,故开此主题,一边研究,一边将We ...
- Windows环境搭建mysql服务器
Windows环境搭建mysql服务器: 1.下载mysql-installer-community-5.7.3.0-m13.2063434697并安装 安装详细步骤>> 2.安装mys ...
- Go(02)windows环境搭建和vscode配置
之前讲述过linux环境下Go语言开发环境搭建,这次简述下windows的搭建以及vscode配置 windows环境搭建 同样去https://studygolang.com/dl下载windows ...
- Windows 环境搭建Redis集群(win 64位)
转: http://blog.csdn.net/zsg88/article/details/73715947 参考:https://www.cnblogs.com/tommy-huang/p/6240 ...
随机推荐
- VLOOKUP返回#N/A结果
VLOOKUP返回#N/A结果 1.无目标值 使用control+f查找是否存在所要搜索的值. 2.位置错误 所要搜索区域,被搜索值必须在首列. 3.格式错误 搜索值和被搜索区域格式需一致. 4.特殊 ...
- docker修改存储路径(转载)
系统盘只有40G,有时docker镜像会占据大量的存储空间,于是想把docker的默认存储位置改成挂载的数据盘.docker的默认存储位置未为:/var/lib/docker 更改docker的默认存 ...
- Spring创建Bean的顺序
一直对Spring创建bean的顺序很好奇,现在总算有时间写个代码测试一下.不想看过程的小伙伴可以直接看结论 目录结构: 其中:bean4.bean5包下的class没有注解@Component,测试 ...
- google docker镜像下载
https://anjia0532.github.io/2017/11/15/gcr-io-image-mirror/
- C++ STD Gems01
本文是根据油管大神的C++标准库课程的一个学习笔记,该课程主要介绍c++标准库中一些非常有用并且代码经常用到的工具. copy .copy_backward .copy_n .copy_if.swap ...
- 2020牛客寒假算法基础集训营5 G街机争霸
题目描述 哎,又是银首,要是你这个签到题少WA一发就金了 牛牛战队的队员打完比赛以后又到了日常甩锅的时间.他们心情悲伤,吃完晚饭以后,大家相约到一个街机厅去solo.牛牛和牛能进入了一个迷宫,这个迷宫 ...
- (函数)P1217 [USACO1.5]回文质数 Prime Palindromes
题解: 第一次: 算法复杂度过高,导致编译超时,需要优化 #include<stdio.h>#include<math.h>int a[100000001] = { 0 };i ...
- split和join合写
小骆驼 第一章 简介 1. // input 和截取字符 #!usr/bin/perl use strict; use warnings; while ( <> ) { chomp; pr ...
- D11 列表 list 元祖 字典dict
取值 name = "alexdfg" print(name[3:5]) 取出 ex name = "alexdfg" print(name[3]) 取出e 列 ...
- phpExcel查询数据库导出excel表
<?php require_once 'PHPExcel.php'; require_once 'PHPExcel/Writer/Excel5.php'; re ...