最近对Archlinux做了一个滚动更新之后,发现人脸识别功能不行了。手工执行howdy test和howdy add 指令都会报错:
╰─➤ sudo howdy -U xxxx add
NOTICE: Each additional model slows down the face recognition engine slightly
Press Ctrl+C to cancel
Adding face model for the user cloud
Enter a label for this new model [Model #13] (max 24 characters): ssss
[ WARN:[email protected]] global cap_gstreamer.cpp:2839 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module source reported: Could not read from resource.
[ WARN:[email protected]] global cap_gstreamer.cpp:1698 open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:[email protected]] global cap_gstreamer.cpp:1173 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Please look straight into the camera
Traceback (most recent call last):
File "/usr/bin/howdy", line 95, in <module>
import cli.add
File "/usr/lib/security/howdy/cli/add.py", line 157, in <module>
face_locations = face_detector(gsframe, 1)
^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.
网上检索了下,发现这是由于numpy升级到2.0版本,而Dlib没有适配导致的。
尝试降级numpy,问题解决:
sudo downgrade python-numpy
QingYo