未安装Visual Studio 2015我在python中构建dlib之前已经安装了所有要求:Cmake
python 3.6和其他绑定。
使用pip安装dlib时:
pip install dlib
Run Code Online (Sandbox Code Playgroud)
出现错误:
Collecting dlib
Using cached https://files.pythonhosted.org/packages/df/aa/6a9bb2a763107bb2606d6ee1aa65fcd3b51375a9ef6436e9c9280b0dd63c/dlib-19.15.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command "c:\users\vikas tiwari\anaconda3\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\VIKAST~1\\AppData\\Local\\Temp\\pip-install-4f4b8868\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\VIKAST~1\AppData\Local\Temp\pip-wheel-nnayeybw --python-tag cp36:
running bdist_wheel
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.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) …Run Code Online (Sandbox Code Playgroud) 我正在运行一个 python Flask 服务器,它使用https://github.com/ageitgey/face_recognition进行人脸识别。
face_encodings与在我的机器中启动服务器相比,通过 docker 运行该函数需要花费 10 倍的时间,我不知道为什么。
我认为我的 Dockerfile 最重要的部分是:
FROM python:3.6-slim-stretch
RUN cd ~ && \
mkdir -p dlib && \
git clone -b 'v19.9' --single-branch https://github.com/davisking/dlib.git dlib/ && \
cd dlib/ && \
python3 setup.py install --yes USE_AVX_INSTRUCTIONS
Run Code Online (Sandbox Code Playgroud)
难道我做错了什么?为什么docker容器这么慢?dlib难道是我安装方式不对?
我正在尝试使用dlib机器学习库进行对象检测.
正如我按照指示编写的一切似乎都没问题,但即使在原始图像上也无法检测到我的对象.即使我在一个唯一的黑色图像上测试它,它也会发现一次检测.哪个不应该发生.如果我将一个经过训练的图像粘贴到黑色图像上,它会发现许多不应该发生的检测.
我没有碰到train_object_detector.cpp文件.它是原创的.
这是我的样本图片





我使用imglab创建的XML文件.
<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type='text/xsl' href='image_metadata_stylesheet.xsl'?>
<dataset>
<name>imglab dataset</name>
<comment>Created by imglab tool.</comment>
<images>
<image file='totaldata/1.jpg'>
<box top='0' left='1' width='61' height='64'/>
</image>
<image file='totaldata/2.jpg'>
<box top='0' left='1' width='63' height='65'>
<label>1</label>
</box>
</image>
<image file='totaldata/3.jpg'>
<box top='1' left='0' width='61' height='61'>
<label>1</label>
</box>
</image>
<image file='totaldata/4.jpg'>
<box top='0' left='0' width='59' height='63'>
<label>1</label>
</box>
</image>
<image file='totaldata/5.jpg'>
<box top='2' left='1' width='59' height='60'>
<label>1</label>
</box>
</image>
<image file='totaldata/6.jpg'>
<box top='0' left='2' width='60' height='62'>
<label>1</label>
</box>
</image>
</images>
</dataset>
Run Code Online (Sandbox Code Playgroud)
只有黑色的检测截图 …
我正在使用helen 数据集训练DLIB的194个面部地标的shape_predictor,该数据集用于通过face_landmark_detection_ex.cppdlib库检测面部地标.
现在它给了我一个sp.dat大约45 MB的二进制文件,与给出的68个面部标志的文件(http://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2)相比较少.在培训中
当我使用经过训练的数据获得面部地标位置时,结果我得到了......
这与68个地标的结果非常不同
68地标图片:
为什么?
我正在使用 OpenCv 和 Dlib 执行带有地标的面部识别,实时来自网络摄像头流。语言是Python。它在我的 macbook 笔记本电脑上运行良好,但我需要它在台式计算机上 24/7 全天候运行。计算机是运行 Debian Jessie 的 PC Intel® Core™2 Quad CPU Q6600 @ 2.40GHz 32bit。性能下降是剧烈的:由于处理有 10 秒的延迟!
因此,我研究了多线程以获得性能:
我从 dlib 示例代码中得到了面部地标代码。我知道它可能可以优化,但我想了解为什么我不能通过多线程使用我的(旧)计算机的全部功能?
我会把我的代码放在下面,非常感谢阅读:)
from __future__ import print_function
import numpy as np
import cv2
import dlib
from multiprocessing.pool import ThreadPool
from collections import deque
from common import clock, draw_str, StatValue
import video
class DummyTask:
def __init__(self, data):
self.data = …Run Code Online (Sandbox Code Playgroud)我pose_predictor = dlib.shape_predictor(predictor_model)在dlib python上遇到错误。
RuntimeError: Error deserializing object of type short
while deserializing a floating point number.
while deserializing a dlib::matrix
while deserializing object of type std::vector
while deserializing object of type std::vector
while deserializing object of type std::vector
Run Code Online (Sandbox Code Playgroud) 我正在研究面部地标,因此我在我的mac上安装了dlib.当我尝试从learnopencv.com在Xcode中执行程序时,编译器说:
error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code. Turn DLIB_NO_GUI_SUPPORT off if you want to use it."
error "Also make sure you have libx11-dev installed on your system"
Run Code Online (Sandbox Code Playgroud)
我已经安装了XQuartz.我不知道该怎么办了.有人可以帮我从这里出去吗?
我遵循了如何dlib python在 Windows上安装的步骤,它可以正常工作,CMD但Python's IDE它说ImportError: No module named 'dlib'

我已经pip install cmake在我的 VS Code 1.35 中安装了 CMake并尝试安装,face_recognition但它仍然给我一个 RuntimeError。我正在使用“Python 3.7.3,x32”
我也尝试安装dlibby,pip install dlib因为这是我无法安装face_recognition.
C:\Users\user>python -m pip install cmake
Requirement already satisfied: cmake in c:\users\user\appdata\roaming\python\python37\site-packages (3.14.4)
C:\Users\user>python -m pip install dlib
Collecting dlib
Using cached https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Complete output from command 'C:\Python\Python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-24vk6act\\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\user\AppData\Local\Temp\pip-record-yf2kdjpx\install-record.txt' --single-version-externally-managed --compile:
ERROR: running install …Run Code Online (Sandbox Code Playgroud) 我正在使用 Windows 10 python 3.7.4
我有一个导入 dlib 的代码
import dlib
Run Code Online (Sandbox Code Playgroud)
但是当我尝试使用 pip install dlib 安装它时,它会引发错误
ERROR : Command errored out with exit status 1 :
......
Run Code Online (Sandbox Code Playgroud)
我什至厌倦了安装 cmake 和This dlib 文件并尝试将它们复制粘贴到站点包中并尝试
python setup.py install
Run Code Online (Sandbox Code Playgroud)
它抛出一个错误说
CMake Error at CMakeLists.txt:3 (project):
Failed to run MSBuild command:
Run Code Online (Sandbox Code Playgroud)
应该怎么做才能解决这个问题??
感谢任何花时间阅读此查询并厌倦解决此问题的人。祝你工作顺利:) ..
dlib ×10
python ×4
cmake ×3
opencv ×3
python-3.x ×2
c++ ×1
docker ×1
importerror ×1
macos ×1
msbuild ×1
ocr ×1
python-3.7 ×1
raspberry-pi ×1
svm ×1
xcode ×1