标签: dlib

如何将dlib作为我在CLion项目中的一部分?

当前的C++设置是:

  • Clion IDE
  • DLIB

我正在运行dlib给出的一个C++示例

#include <dlib/gui_widgets.h>
#include <dlib/image_io.h>
#include <dlib/image_transforms.h>
#include <fstream>


using namespace std;
using namespace dlib;

//  ----------------------------------------------------------------------------

int main(int argc, char** argv)
{
    try
    {
        // make sure the user entered an argument to this program
        if (argc != 2)
        {
            cout << "error, you have to enter a BMP file as an argument to this program" << endl;
            return 1;
        }

        // Here we declare an image object that can store rgb_pixels.  Note that in …
Run Code Online (Sandbox Code Playgroud)

c++ c++11 dlib

2
推荐指数
1
解决办法
1580
查看次数

DLib:train_shape_predictor_ex.cpp

我试图通过在代码中描述的helen 数据集上执行train_dlib_shape_predictor_ex.cpp来训练Dlib的形状预测器,我将测试图像放在形状预测器的当前目录中的面部文件夹中.但是,当我运行代码时,它抛出以下异常:

C:\train_shape_predictor_ex\Release>train_shape_predictor_ex test

exception thrown!
ERROR: unable to open test/training_with_face_landmarks.xml for reading.
Run Code Online (Sandbox Code Playgroud)

as no training_with_face_landmarks.xml和testing_with_face_landmarks.xmlhelen数据集中的文件可用于以下页面:link

有一个名为annotation的文件夹,其中包含一个文本文件,其中包含数据集中每个图像的194个地标点位置.如何将此文件转换为training_with_face_landmarks.xml.

c++ face-detection training-data dlib

1
推荐指数
1
解决办法
4033
查看次数

具有共享 Dlib 库的 C++ 程序在 Ubuntu 14.04 上速度极慢

根据 Davis Kings 在该问题中的回答:Create a Shared Library for dlib,我为 Dlib 创建了共享库,并将它们链接到一个使用 Dlib 面部检测来检测相机图片中的面部的程序,使用以下命令:

cd dlib-19.0/dlib
mkdir build
cd build
cmake ..
make
sudo make install
Run Code Online (Sandbox Code Playgroud)

还有-ldlib选项。

我可以编译并执行该程序,但是面部检测速度非常慢。

我在 Windows 上使用 Visual Studio 2013 尝试了相同的程序。当我使用调试模式时,面部检测也非常慢,但在发布模式下运行得很好。所以我想,共享库也可能处于调试模式,并尝试使用以下命令强制它们处于发布模式:

cd examples
mkdir build
cd build
cmake ..
cmake --build . --config Release 
sudo make install
Run Code Online (Sandbox Code Playgroud)

但结果却和之前一样。

有谁有一个想法,原因可能是什么,它这么慢?

感谢您的帮助。

c++ shared-libraries dlib

1
推荐指数
1
解决办法
1487
查看次数

安装Dlib时找不到Boost

我是一个Windows用户,目前正在使用Windows 10.我试图在过去8小时内在python 3.5上安装Dlib但是我失败了.每当我尝试"pip安装Dlib",或尝试"python setup.py install"(在dlib文件夹中)时,我收到错误消息"cmake configuration failed".在整个执行过程中,我可以看到"找不到BOOST".有人能指导我吗?

>>python setup.py install
running install
running bdist_egg
running build
Detected Python architecture: 32bit
Detected platform: win32
Removing build directory C:\Users\Tabish\Desktop\dlib-master\./tools/python/build
Configuring cmake ...
-- Building for: Visual Studio 14 2015
-- The C compiler identification is MSVC 19.0.24213.1
-- The CXX compiler identification is MSVC 19.0.24213.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- …
Run Code Online (Sandbox Code Playgroud)

c++ boost python-3.x dlib

1
推荐指数
1
解决办法
3240
查看次数

我们有没有办法在浏览器上实现离线人脸检测和识别?

我需要找到一种使用浏览器完全离线实现人脸检测和识别的方法。最初可能会加载针对每个用户的训练模型。我们只需要识别每台设备一张脸。实现这一点的最佳方法是什么?

我尝试tracking.js实现人脸检测。有用。但无法找到实现识别的解决方案。我尝试过face-recognition.js。但它需要一个节点服务器。

opencv face-recognition face-detection dlib tensorflow

1
推荐指数
1
解决办法
1716
查看次数

无法在 Windows 10 上安装 dlib

尝试使用 pycharm 包管理器在 Windows 10 上安装 dlib。我安装了 Numpy、opencv-python、setuptools 和 wheel。尝试安装 dlib 然后出现第一个错误,要求我安装 CMake。

现在我得到了这个:(尝试安装visual studio,但没有效果)。

    Collecting dlib   Using cached https://files.pythonhosted.org/packages/d5/5c/aa64510aa354d562ecba7edecd500b020280741140e5d91ff5ec1c6f8289/dlib-19.13.1.tar.gz Building wheels for collected packages: dlib   Running setup.py bdist_wheel for dlib: started   Running setup.py bdist_wheel for dlib: finished with status 'error'   Complete output from command C:\Users\Tom\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Tom\\AppData\\Local\\Temp\\pycharm-packaging\\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\Tom\AppData\Local\Temp\pip-wheel-f_njkl2_ --python-tag cp36:  running bdist_wheel   running build   running build_py   package init file 'dlib\__init__.py' not found (or not a regular file)   warning: build_py: …
Run Code Online (Sandbox Code Playgroud)

python pycharm dlib

1
推荐指数
2
解决办法
2万
查看次数

Python 3.9.1 的 dlib 安装错误。如何知道哪个版本兼容?

我已经安装了 CMake,现在正在尝试为人脸识别项目安装 dlib。我看过一些视频,问题似乎是兼容性问题。对于 Python 3.9.1 哪个版本的 dlib 更兼容?我尝试使用 pip 安装 dlib,手动下载它,但仍然显示以下错误:

WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: c:\users\aviparna.biswas\appdata\local\programs\python\python39\Include\UNKNOWN
sysconfig: c:\users\aviparna.biswas\appdata\local\programs\python\python39\Include
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Collecting dlib
  Using cached dlib-19.22.0.tar.gz (7.4 MB)
Building wheels for collected packages: dlib
  Building wheel for dlib (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\aviparna.biswas\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; …
Run Code Online (Sandbox Code Playgroud)

opencv cmake dlib

1
推荐指数
1
解决办法
7440
查看次数

有没有办法通过 Mediapipe 将 468 个地标映射/转换为 68 个地标?

我试图将地面真实面部标志(68 个标志)与 Mediapipe 标志检测(468 个标志)进行比较。为了做到这一点,我认为我需要以某种方式将 468 个地标映射到 68 个地标。我可能的解决方案是手动查找最接近 68 个地标中每个地标的索引并输出它们。但我不确定这里的准确性。有人可以在这方面帮助我吗?非常感谢您的帮助。

vision dlib mediapipe

1
推荐指数
1
解决办法
2436
查看次数

python3.11安装dlib库出错

我在 Windows 10\n版本 Windows 10 家庭单语言\n版本 22H2\n安装在 \xe2\x80\x8e13-\xe2\x80\x8e07-\xe2\x80\x8e2022\n操作系统版本 19045.2251\n体验 Windows 功能时遇到问题体验包120.2212.4180.0

\n

我安装了 cmake\n\xe2\x9e\x9c cmake --version\ncmake 版本 3.24.0-rc3

\n

CMake 套件由 Kitware 维护和支持

\n

我安装了 python 3.11\n\xe2\x9e\x9c py --version\nPython 3.11.0

\n

我尝试使用 pip 安装 dlib\n我收到的错误已上传到 Pastebin

\n
File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\command\\bdist_egg.py", line 151, in call_command\n    self.run_command(cmdname)\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\_distutils\\cmd.py", line 319, in run_command\n    self.distribution.run_command(command)\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\dist.py", line 1217, in run_command\n    super().run_command(command)\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\_distutils\\dist.py", line 987, in run_command\n    cmd_obj.run()\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\command\\install_lib.py", line 11, in run\n    self.build()\n  File "C:\\Program Files\\Python311\\Lib\\site-packages\\setuptools\\_distutils\\command\\install_lib.py", …
Run Code Online (Sandbox Code Playgroud)

python cmake dlib

1
推荐指数
1
解决办法
2万
查看次数

在 PowerShell 中安装 dlib 时出现“错误:无法为 dlib 构建轮子,这是安装基于 pyproject.toml 的项目所必需的”

我一直在构建一个面部识别工具,并且正在尝试安装 dlib。

\n

每次我尝试安装 dlib 时,都会收到以下消息:

\n
  \xc3\x97 Building wheel for dlib (pyproject.toml) did not run successfully.\n  \xe2\x94\x82 exit code: 1\n  \xe2\x95\xb0\xe2\x94\x80> [78 lines of output]\n      running bdist_wheel\n      running build\n      running build_ext\n      <string>:125: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.\n      Building extension for Python 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]\n      Invoking CMake setup: 'cmake C:\\Users\\Jack\\AppData\\Local\\Temp\\pip-install-tl9fdcf0\\dlib_fee2183dfbb9404395bfedaca5728c1a\\tools\\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Jack\\AppData\\Local\\Temp\\pip-install-tl9fdcf0\\dlib_fee2183dfbb9404395bfedaca5728c1a\\build\\lib.win-amd64-cpython-311 -DPYTHON_EXECUTABLE=C:\\Users\\Jack\\AppData\\Local\\Programs\\Python\\Python311\\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Jack\\AppData\\Local\\Temp\\pip-install-tl9fdcf0\\dlib_fee2183dfbb9404395bfedaca5728c1a\\build\\lib.win-amd64-cpython-311 -A x64'\n      -- Building for: NMake Makefiles\n      CMake Error at CMakeLists.txt:5 (message):\n     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\n        You must …
Run Code Online (Sandbox Code Playgroud)

python dlib

1
推荐指数
1
解决办法
3万
查看次数