在Ubuntu中实现人脸识别登录的完整步骤

1、安装Howdy: howdy项目地址

sudo add-apt-repository ppa:boltgolt/howdy
sudo apt update
sudo apt install howdy

2、添加自己的face

sudo howdy add

报错:

Enter a label for this new model [Initial model] (max 24 characters): tiger
Camera path is not configured correctly, please edit the 'device_path' config value.
Exception ignored in: <bound method VideoCapture.__del__ of <recorders.video_capture.VideoCapture object at 0x7f6bc5be02b0>>
Traceback (most recent call last):
 File "/lib/security/howdy/recorders/video_capture.py", line 55, in __del__
  self.internal.release()
AttributeError: 'VideoCapture' object has no attribute 'internal'

解决方案:

$ sudo apt-get install v4l-utils
# 查看摄像头路径
$ v4l2-ctl --list-devices
USB 2.0 Camera: USB Camera (usb-0000:03:00.0-14):
 /dev/video0
$ sudo howdy config
# 接下来更改config中的device_path = /dev/video0
$ sudo howdy add
Adding face model for the user tiger
Enter a label for this new model [Initial model] (max 24 characters): tiger

Please look straight into the camera
Scan complete

Added a new model to tiger

3、测试

打开一个terminal

$ sudo -i
Identified face as tiger
$ sudo howdy test

Opening a window with a test feed

Press ctrl+C in this terminal to quit
Click on the image to enable or disable slow mode

Closing window

4、屏幕锁屏后,enter进入输密码界面,程序就会识别出人,直接解锁。

5、其它命令

Usage:

howdy [-U user] [-y] command [argument]
Command Description
add Add a new face model for an user
clear Remove all face models for an user
config Open the config file in your default editor
disable Disable or enable howdy
list List all saved face models for an user
remove Remove a specific model for an user
snapshot Take a snapshot of your camera input
test Test the camera and recognition methods
version Print the current version number

总结

到此这篇关于在Ubuntu中实现人脸识别登录的文章就介绍到这了,更多相关Ubuntu人脸识别登录内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!

(0)

相关推荐

  • ubuntu16.04服务器配置ssh免密码登录

    在客户端操作 ssh-keygen -t rsa 文件位置写/home/try/.ssh/server_rsa,不使用默认值,我命名为server_rsa担心影响到git的key(因为我的git使用的是默认值) ssh-copy-id root@123.45.56.78(你的服务器ip), 或这使用 cat ~/.ssh/id_rsa.pub | ssh user@123.45.56.78 "mkdir -p ~/.ssh && cat >> ~/.ssh/autho

  • ubuntu使用root用户登录/切换root权限的实现

    ubuntu系统默认root用户是不能登录的,密码也是空的. 如果要使用root用户登录,必须先为root用户设置密码 打开终端,输入:sudo passwd root 然后按回车 此时会提示你输入密码,在password:后输入你现在登录的用户的密码 然后系统提示你输入新的UNIX密码 Enter new UNIX password:这里输入你想为root设置的密码,要输入两次 此时系统会出现密码设置成功的提示 最后退出终端,重启计算机,选择用户进入系统的地方,选择其他 然后输入root 再输

  • 解决ubuntu 16.04安装mysql5.7.17后,登录时出现ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题

    一.问题描述 今天,笔者为了练习sql,在ubuntu16.04上安装了MySQL.笔者在网上搜索了在ubuntu16.04安装mysql的步骤,并跟着步骤一步步操作,然而,让笔者无法明白的是,网上说在安装mysql的过程会弹出输入密码的窗口,然而笔者在安装的过程中没有弹出任何窗口,而且也没有报错. 正当笔者在登录mysql时,问题就出现了,如图: 如图,笔者尝试多种输入方式,但都得到了一个同样地令人忧伤的结果,ERROR 1045 (28000): Access denied for user

  • linux(ubuntu)用户连续N次输入错误密码进行登陆时自动锁定X分钟

    1.编辑PAM的配置文件 sudo vim /etc/pam.d/login 在第二行添加 auth required pam_tally2.so deny=3 unlock_time=5 even_deny_root root_unlock_time=10 参数介绍 even_deny_root 也限制root用户: deny 设置普通用户和root用户连续错误登陆的最大次数,超过最大次数,则锁定该用户: unlock_time 设定普通用户锁定后,多少时间后解锁,单位是秒: root_unl

  • Ubuntu 远程登陆服务器 ssh的安装和配置详解

    以下命令若无加粗备注说明在本地计算机操作,则都是在服务器端操作 1 安装并使用ssh远程登陆 更新软件列表 sudo apt-get update 更新本地软件 sudo apt-get upgrade 安装ssh服务 sudo apt-get install openssh-server 开启ssh服务 sudo /etc/init.d/ssh start 查看本机IP地址 inet字段后面的就是你的IP地址 sudo ifconfig 远程登陆 在本地计算机终端内输入ssh <usernam

  • 详解Ubuntu14.04桥接网络设置与SSH登陆

    操作系统:Unbuntu14.04 虚拟机:VMware10 一.网络设置 1.设置vmware Bridge Protocol 本地链接->属性->vmware Bridge Protocol打钩 2.然后主机设定静态ip(如果已设置好了的不用管) 3.vmware 设置 编辑->虚拟网络编辑器 4.Ununtu设置 确认关闭,接下来设定ubuntu的IP和DNS ,终端:(Alt+Ctrl+T打开 ) sudo vi /etc/network/interfaces 然后输入以下内容:

  • ubuntu16.04登录后无dash,无启动栏launch,无menu bar只有桌面背景的快速解决办法

    今天打开电脑,与往常一样输入用户名密码登录后,发现桌面上空空如也,启动栏launch,menu bar什么的都消失了,桌面上文件可以打开,但是无法拖动位置,无法关闭(因为menu bar没了,无法鼠标点击关闭), 经过苦苦搜索几个小时之后找到解决方案如下,记录下来方便有相同问题的人: 问题原因:unity Plugin 被误删或禁用了 解决方案: 1.尝试用 ctrl + alt + t 打开命令行 2.若 ctrl + alt + t 不起作用,则可在桌面右键选择打开终端 3.若上述方法仍不起

  • ubuntu 14.04 忘记用户登录密码的图文解决方法

    1.在VMware Workstatiom中点击"开启此虚拟机",注意,进入系统自启时随即先点击一下屏幕,目的是让鼠标从VM切换到ubuntu启动(否则下面长按shift时可能不会进入GNU GRUN界面): 2.点击屏幕后随即长按shift,系统会进入GUN GRUB界面(对此界面的操作可看界面下面的说明),如图 1所示:如果进入图 2 所示的界面则此步骤的操作失败,不要着急再试一下. 图 1 图 2 3.在GNU GRUB界面中选中ubuntu 高级选项,回车 ,进入图 3所示界面

  • Ubuntu下如何设置ssh免密码登录安装

    1.首先在本机安装openssh-server和openssh-client. 命令:sudo apt-get install openssh-server openssh-client 2.在检查当前的目录下有没有.ssh这个文件,没有的话就mkdir下. 3.生成公钥与私钥.命令:ssh-keygen -t rsa 4.将.ssh文件中的id_isa_pub复制到其他机器的authorized_keys下.并修改authorized_keys权限为600. 5.ssh nodeXX即可

  • 详解Ubuntu下ssh服务的安装与登陆(ssh远程登陆)

    Ubuntu默认并没有安装ssh服务,如果通过ssh远程连接到Ubuntu,需要自己手动安装ssh-server. 判断是否安装ssh服务,可以通过如下命令进行: ps -e|grep ssh 输出如下: zht@zht-Ubuntu:~$ ps -e|grep ssh 2151 ? 00:00:00 ssh-agent 5313 ? 00:00:00 sshd ssh-agent表示ssh-client启动,sshd表示ssh-server启动了. 如果缺少sshd,说明ssh服务没有启动或者

随机推荐