dlib

Error to run a library to python

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I follow the steps according to http://npatta01.github.io/2015/08/10/dlib/ but when I try to run (I use sudo), python python_examples/face_detector.py examples/faces/2007_007763.jpg take back error. Firstly, the error was AttributeError: 'module' object has no attribute 'image_window' to line 8. Now, the error is Illegal instruction (core dumped) but I don't know why. Please, help me to add the library correctly. import sys import dlib from skimage import io detector = dlib.get_frontal_face_detector() win = dlib.image_window() for f in sys

How to convert mat to array2d<rgb_pixel>?

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I created dll for the dlib face landmark code there used array2d to get the image, but i like to read an image using Mat and to convert to array2d because dlib supports only array2d. Can any one say how to convert mat to array2d ?? 回答1: Convert a cv::Mat image to dlib::array2d : In case of a BGR image, you can follow this: dlib::array2d<bgr_pixel> dlibImage; dlib::assign_image(dlibImage, dlib::cv_image<bgr_pixel>(cvMatImage)); And, if you have a grayscale image, simply use <unsigned char> instead of <bgr_pixel> : dlib::array2d<unsigned char>

Trouble installing Dlib for python on Mac OSX 10.10

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to install dlib-18.16 for python on my computer (running Mac OSX 10.10). I have boost python installed as well as X11, but I've been running into trouble when running ./compile_dlib_python_module.bat as instructed to after downloading the files. The errors I get are numerous, but look something like this [ 1%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/fonts.o In file included from /Users/xxx/Downloads/dlib-18.16/dlib/gui_widgets/fonts.cpp:14: /Users/xxx/Downloads/dlib-18.16/dlib/gui_widgets/nativefont.h:313:21

window系统环境下安装dlib

匿名 (未验证) 提交于 2019-12-03 00:26:01
我很敬佩写博客的人,感谢你们的辛勤劳动 可妈的一个都解决不了很坑爹好吗! 以下是dlib的python3.6的安装包,且下且珍惜: https://pan.baidu.com/s/1Ww2Bym1G4-edBlmkCfWHag 官网,很多案例: http://dlib.net/optimization.html 转载请标明出处: window系统环境下安装dlib 文章来源: window系统环境下安装dlib

dlib+opencv3.2 face detection,face landmark detection,face pose estimation人脸检测,人脸关键点检测(68点),人脸位姿估计

匿名 (未验证) 提交于 2019-12-03 00:22:01
#include <dirent.h> #include <string.h> #include <vector> #include <string> #include <iostream> #include <chrono> #include <dlib/opencv.h> #include <opencv2/highgui/highgui.hpp> #include <opencv2/calib3d/calib3d.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <dlib/image_processing/frontal_face_detector.h> #include <dlib/image_processing/render_face_detections.h> #include <dlib/image_processing.h> using namespace std ; //Intrisics can be calculated using opencv sample code under opencv/sources/samples/cpp/tutorial_code/calib3d //Normally, you can also apprximate fx and fy by image width,

dlib库的学习

匿名 (未验证) 提交于 2019-12-03 00:18:01
dlib库的生成 dlib库中examples的运行 vs使用的小技巧 dlib官网下载dlib,解压,应用cmake进行编译生成相应的工程,还有对examples文件进行编译得到所有的示例工程。 https://blog.csdn.net/ouyangying123/article/details/70847402 1、face_detecon 2、face-landmark_detection 3、w 视频的读取和使用 https://blog.csdn.net/guduruyu/article/details/68486063 https://blog.csdn.net/thefutureisour/article/details/7530344 1、仅生成和仅重新生成的区别 2、设为启动项目的作用 [ 维基百科 ] 使用简单的符号标识不同的标题,将某些文字标记为 粗体 或者 斜体 ,创建一个 链接 等,详细语法参考帮助?。 本编辑器支持 Markdown Extra ,  扩展了很多好用的功能。具体请参考 Github . Markdown Extra  表格语法: 项目 价格 Computer $1600 Phone $12 Pipe $1 可以使用冒号来定义对齐方式: 项目 价格 数量 Computer 5 Phone 12 Pipe 234 Markdown

使用dilb实现人脸检测、识别

匿名 (未验证) 提交于 2019-12-03 00:08:02
使用dlib实现人脸检测与识别需要先下载以下两个文件: 以下是检测代码: import dlib import numpy as np import cv2 detector = dlib . get_frontal_face_detector () # 加载正脸检测器,使用dlib sp = dlib . shape_predictor ( "dlibModel/shape_predictor_68_face_landmarks.dat" ) # 加载人脸关键点检测模型 facerec = dlib . face_recognition_model_v1 ( "dlibModel/dlib_face_recognition_resnet_model_v1.dat" ) # 加载人脸识别模型 images_file = "11.jpg" if __name__ == '__main__' : image = cv2 . imread ( images_file ) gray = cv2 . cvtColor ( image , cv2 . COLOR_BGR2GRAY ) rects = detector ( gray , 1 ) # 返回人脸,(灰度图,采样次数) tzs = [] for ( i , rect ) in enumerate ( rects ): shape68

face_recognition安装

匿名 (未验证) 提交于 2019-12-02 23:55:01
Face_Recognition更适合于Linux系统,性能方面Windows系统下只能发挥Linux系统的四分之一。 Windows系统下安装:    方法1:anaconda3.5以前的版本含3.5     安装visual studio2014:       安装C/C++ 编译器,VS主要用于之后boost库的编译。     安装boost:       下载地址:https://sourceforge.net/projects/boost/files/boost-binaries/ 我下载的是boost_1_67_0-msvc-14.1-64.exe 直接安装就行。       如果下载的zip那就需要先解压,打开vs命令,更改文件夹到boost的解压路径,输入 bootstrap.bat 在文件夹里生成b2.exe,再输入 b2,让boost库里的东西自动编译     安装cmake:       官方下载地址:https://cmake.org/ 我下载的是cmake-3.13.1-win64-x64.msi,直接双击安装。将其路径加入PATH环境变量     安装dlib:       下载地址:https://pypi.org/simple/dlib/ 我下载的是dlib-19.7.0-cp36-cp36m-win_amd64.whl

Windows10环境编译配置python版dlib19.17

匿名 (未验证) 提交于 2019-12-02 22:51:30
最近因项目需要,使用dlib库,但是pip安装的dlib无法使用gpu加速功能,故查找多方面材料,折腾了几天才弄好。 参考链接: https://blog.csdn.net/luckyfairy17/article/details/83855739 Windows10下编译python版dlib 1. 卸载原来的dlib,pip uninstall dlib 2. 安装vs2015 update3,链接: http://download.microsoft.com/download/8/4/3/843ec655-1b67-46c3-a7a4-10a1159cfa84/vs2015.3.ent_enu.iso 3. 下载与显卡匹配的cuda和cudnn 下载cuda: https://developer.nvidia.com/cuda-80-ga2-download-archive l 然后下载cudnn: https://developer.nvidia.com/rdp/cudnn-download 这里需要注册一个nVidia账号,注册登陆之后下载对应版本即可,我下载的cudnn-8.0-windows10-x64-v7.1-ga. 配置cuda+cudnn 4. 安装完成之后,将cudnn中所有文件复制到cuda安装目录; 添加环境变量 首先上述安装完成之后,系统中多了

1. python Mac 安装 dlib

匿名 (未验证) 提交于 2019-12-02 22:51:30
在macOS上: 从Mac App Store安装 XCode(或安装XCode命令行工具)(最低版本是: xcode8 以上 ) homebrew 安装 CMAKE 安装 (笔者的版本是: 3.11.1 ) 基础包 :numpy / matplotlib / Image (pip install 就可以) 1. dlib的依赖 dlib安装需要的依赖有openblas,opencv。可以直接使用brew安装。 $ brew install openblas $ brew install opencv Mac的X11 X11是执行Unix程序的图形窗口环境。Mac OS X本身的程序是Aqua界面的,但是为了能够兼容unix和linux移植过来的程序(Mac OS X由BSD-UNIX修改而来),比如MatLab,就需要x11窗口环境。 运行dlib需要X11,但Mac目前没有自带X11,需要重新下载安装,下载地址为: https://www.xquartz.org/ ,下载后直接安装,默认安装目录为 /opt/X11 ,需要在 /usr/loca/opt 目录下创建软连接,创建命令如下,创建后重启Mac。 $ cd /usr/local/opt $ ln -s /opt/X11 X11 2. 安装dlib 下载dlib,也可直接去Git下载 git clone https:/