在Ubuntu中实现人脸识别登录的完整步骤
1、安装Howdy:howdy项目地址
sudoadd-apt-repositoryppa:boltgolt/howdy sudoaptupdate sudoaptinstallhowdy
2、添加自己的face
sudohowdyadd
报错:
Enteralabelforthisnewmodel[Initialmodel](max24characters):tiger Camerapathisnotconfiguredcorrectly,pleaseeditthe'device_path'configvalue. Exceptionignoredin:> Traceback(mostrecentcalllast): File"/lib/security/howdy/recorders/video_capture.py",line55,in__del__ self.internal.release() AttributeError:'VideoCapture'objecthasnoattribute'internal'
解决方案:
$sudoapt-getinstallv4l-utils #查看摄像头路径 $v4l2-ctl--list-devices USB2.0Camera:USBCamera(usb-0000:03:00.0-14): /dev/video0 $sudohowdyconfig #接下来更改config中的device_path=/dev/video0
$sudohowdyadd Addingfacemodelfortheusertiger Enteralabelforthisnewmodel[Initialmodel](max24characters):tiger Pleaselookstraightintothecamera Scancomplete Addedanewmodeltotiger
3、测试
打开一个terminal
$sudo-i Identifiedfaceastiger
$sudohowdytest Openingawindowwithatestfeed Pressctrl+Cinthisterminaltoquit Clickontheimagetoenableordisableslowmode Closingwindow
4、屏幕锁屏后,enter进入输密码界面,程序就会识别出人,直接解锁。
5、其它命令
Usage:
howdy[-Uuser][-y]command[argument]
Command | Description |
---|---|
add | Addanewfacemodelforanuser |
clear | Removeallfacemodelsforanuser |
config | Opentheconfigfileinyourdefaulteditor |
disable | Disableorenablehowdy |
list | Listallsavedfacemodelsforanuser |
remove | Removeaspecificmodelforanuser |
snapshot | Takeasnapshotofyourcamerainput |
test | Testthecameraandrecognitionmethods |
version | Printthecurrentversionnumber |
总结
到此这篇关于在Ubuntu中实现人脸识别登录的文章就介绍到这了,更多相关Ubuntu人脸识别登录内容请搜索毛票票以前的文章或继续浏览下面的相关文章希望大家以后多多支持毛票票!