在观看有关人脸识别的 YouTube 视频后,我安装了 Python 3.8.2,然后安装了 CMAKE,然后安装了 dlib。dlib 失败并显示以下消息。起初我有 python 32 位,然后我删除它并安装了 64 位版本,同样的问题。任何想法?我在另一台计算机上执行了相同的流程,但出现了类似的错误,安装 CMake 后解决了。在这种情况下,安装了 CMake。我错过了什么?C:\Users\NH5>pip install dlibDefaulting to user installation because normal site-packages is not writeableCollecting dlib Using cached dlib-19.19.0.tar.gz (3.2 MB)Could not build wheels for dlib, since package 'wheel' is not installed.Installing collected packages: dlib Running setup.py install for dlib ... error ERROR: Command errored out with exit status 1: command: 'c:\program files\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\NH5\\AppData\\Local\\Temp\\pip-install-7c571567\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\NH5\\AppData\\Local\\Temp\\pip-install-7c571567\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\NH5\AppData\Local\Temp\pip-record-wm_xgg14\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\NH5\AppData\Roaming\Python\Python38\Include\dlib' cwd: C:\Users\NH5\AppData\Local\Temp\pip-install-7c571567\dlib\ Complete output (57 lines): running install running build running build_py package init file 'dlib\__init__.py' not found (or not a regular file) running build_ext Building extension for Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)]
1 回答
红糖糍粑
TA贡献1815条经验 获得超6个赞
试试深脸。它独立于操作系统。
#!pip install deepface
from deepface import DeepFace
#face verification
obj = DeepFace.verify("img1.jpg", "img2.jpg")
#face recognition
df = DeepFace.find(img_path = "img1.jpg", db_path = "C:/workspace/my_db")
Find 函数在 my_db 文件夹中查找 img1.jpg 的身份。
添加回答
举报
0/150
提交
取消