开源人脸识别face_recognition
环境:python36
1、安装dlib、face_recognition
windows版
下载dlib,cp后面是py版本
下载地址:https://pypi.org/simple/dlib/
提供一个36版本的网盘下载地址:https://pan.baidu.com/s/1nVXQWf0v6Mhvgq8uSNI7qg
进入文件目录执行

安装face_recognition
pip3 install face_recognition
其他模块缺什么安装什么,pip3 install xxx
备注一下:
1、cv2对应的是openCV,下载地址:https://pypi.org/project/opencv-python/#files
百度网盘地址:https://pan.baidu.com/s/1q7G3Xbt2MZ0Ynm_etaAIDw(windows)、https://pan.baidu.com/s/1T7Wdj0XqHVBdZbK5eGjMJw(linux)
2、dlib官网:http://dlib.net/
dlib是C++的库
3、Pillow是PIL的升级版,PIL最多只支持到py27
linux版
第一步:
yum -y install gcc gcc-c++ cmake boost-devel openblas-devel
第二步:
pip3 install dlib
第三步:
pip3 install face_recognition
常见错误:https://xwsoul.com/posts/684
internal compiler error: Killed (program cc1plus)造成错误可能的原因:系统没有交换分区, 编译过程中内存耗尽, 导致了编译中断 …
解决方式也很简单, 就是增加一个交换分区:1. 创建分区文件, 大小 2G
dd if=/dev/zero of=/swapfile bs=1k count=20480002. 生成 swap 文件系统
mkswap /swapfile3. 激活 swap 文件
swapon /swapfile这样就没有问题了, 但是这样并不能在系统重启的时候自动挂载交换分区, 这样我们就需要修改 fstab.
修改 /etc/fstab 文件, 新增如下内容:/swapfile swap swap defaults 0 0这样每次重启系统的时候就会自动加载 swap 文件了.
1.2、测试
import face_recognition
import dlib
import numpy as np
import PIL.Image
import cv2
import matplotlib.pyplot as plt basepath = 'D:\\pyimgtest\\G0000001\\'
first_image = face_recognition.load_image_file(basepath + "201901241133425.jpg")
second_image = face_recognition.load_image_file(basepath + "201901241133427.jpg") f1 = face_recognition.face_locations(first_image,number_of_times_to_upsample=0, model="cnn")
f2 = face_recognition.face_locations(second_image,number_of_times_to_upsample=0, model="cnn") first_encoding = face_recognition.face_encodings(first_image,f1)[0]
second_encoding = face_recognition.face_encodings(second_image,f2)[0] results = face_recognition.compare_faces([first_encoding], second_encoding,0.38) print('results:'+str(results))
尴尬的是电脑跑不动,配置太差
转载请注明博客出处:http://www.cnblogs.com/cjh-notes/
开源人脸识别face_recognition的更多相关文章
- face_recognition开源人脸识别库:离线识别率高达99.38%
基于Python的开源人脸识别库:离线识别率高达99.38%——新开源的用了一下感受一下 原创 2017年07月28日 21:25:28 标签: 人脸识别 / 人脸自动定位 / 人脸识别开源库 / f ...
- Github开源人脸识别项目face_recognition
Github开源人脸识别项目face_recognition 原文:https://www.jianshu.com/p/0b37452be63e 译者注: 本项目face_recognition是一个 ...
- Python的开源人脸识别库:离线识别率高达99.38%
Python的开源人脸识别库:离线识别率高达99.38% github源码:https://github.com/ageitgey/face_recognition#face-recognitio ...
- Python的开源人脸识别库:离线识别率高达99.38%(附源码)
Python的开源人脸识别库:离线识别率高达99.38%(附源码) 转https://cloud.tencent.com/developer/article/1359073 11.11 智慧上云 ...
- Python 人工智能之人脸识别 face_recognition 模块安装
Python人工智能之人脸识别face_recognition安装 face_recognition 模块使用系统环境搭建 系统环境 Ubuntu / deepin操作系统 Python 3.6 py ...
- Dome 多人人脸识别 face_recognition
Dome 多人人脸识别 face_recognition 注意 face_recognition 依赖 face_recognition_models 中文字体文件需要自己下载 1.多人人脸识别 # ...
- 基于Python的开源人脸识别库:离线识别率高达99.38%
项目地址:https://github.com/ageitgey/face_recognition#face-recognition 本文的模型使用了C++工具箱dlib基于深度学习的最新人脸识别方法 ...
- paper 129 : 比较好的开源人脸识别软件
1.face.com 以色列公司,某年六月时被Facebook收购,同时暂停了API服务,之前测试过他们的服务,基本上是了解到的应用中做得最牛的了. 2.orbe Orbeus由麻省理工学院和波士顿大 ...
- 开源 人脸识别 openface 实用介绍 实例演示 训练自己的模型
1.OpenFace 是 卡耐基梅陇(CMU)大学的一个图像+机器学习项目,整体程序包含:人脸发现,特征提取,特征神经网络训练,人脸识别这四部分. github https://github.co ...
随机推荐
- Webservice返回SoapHeader
Webservice在请求中加入自定义的SoapHeader,比较常用的场景是在SoapHeader中携带用户登陆信息,由服务端进行身份验证.今天遇到一个需求,除了在请求时要携带SoapHeader外 ...
- 20155239 《Java程序设计》实验三(敏捷开发与XP实践)实验报告
实验三 敏捷开发与XP实践 实验内容 XP基础 XP核心实践 学会使用git 学会代码的重构 实现团队合作 团队分工 20155239:按照老师的实验三教程,逐步实验,编写代码,并用git上传,下载团 ...
- 第八周课上额外项目:pwd的实现
项目要求: 1 学习pwd命令 2 研究pwd实现需要的系统调用(man -k; grep),写出伪代码 3 实现mypwd 4 测试mypwd 并且上交博客链接. 实验步骤 我首先不懂pwd到底是个 ...
- CentOS 6.5关闭防火墙
关闭命令: service iptables stop 永久关闭防火墙:chkconfig iptables off 两个命令同时运行,运行完成后查看防火墙关闭状态 service iptables ...
- python根据正则表达式的简单爬虫
今天根据正则表达式简单的爬了一下大众点评,把北京的美食爬了爬,(店铺名,人均消费,地址) import re import urllib.request from urllib.request imp ...
- 自动化运维工具saltstack01 -- 之SaltStack介绍、安装与基础使用
SaltStack介绍 官网地址:http://www.saltstack.com 官方文档地址:http://docs.saltstack.com Github:http://Github.com/ ...
- 451. Swap Nodes in Pairs【LintCode java】
Description Given a linked list, swap every two adjacent nodes and return its head. Example Given 1- ...
- Mybatis中的几种注解映射
1. 普通映射 2. @Select("select * from mybatis_Student where id=#{id}") 3. public Student getS ...
- Laxcus大数据操作系统2.0(5)- 第二章 数据组织
第二章 数据组织 在数据的组织结构设计上,Laxcus严格遵循数据和数据描述分离的原则,这个理念与关系数据库完全一致.在此基础上,为了保证大规模数据存取和计算的需要,我们设计了大量新的数据处理技术.同 ...
- 数据库MySql在python中的使用
随着需要存储数据的结构不断复杂化,使用数据库来存储数据是一个必须面临的问题.那么应该如何在python中使用数据库?下面就在本篇博客中介绍一下在python中使用mysql. 首先,本博客已经假定阅读 ...