dlib

Is it possible to load/read shape_predictor_68_face_landmarks.dat at compile time?

假如想象 提交于 2019-12-04 17:16:16
I am trying to build a C++ application in Visual Studio using DLIB 's face_landmark_detection_ex.cpp . The build application run from command promt and trained model and image file is passed as arguments. face_landmark_detection_ex.exe shape_predictor_68_face_landmarks.dat image.jpg this shape_predictor_68_face_landmarks.dat is the trained model for 68 landmarks to perform detection on input image and needs to load at run-time every time to perform any detection. I am trying to do following things. Load this shape_predictor_68_face_landmarks.dat at building the application or compile time.

OpenCV / Python : multi-threading for live facial recognition

你。 提交于 2019-12-04 12:14:29
I'm using OpenCv and Dlib to execute facial recognition w/ landmarks, live from the webcam stream . The language is Python . It works fine on my macbook laptop, but I need it to run from a desktop computer 24/7. The computer is a PC Intel® Core™2 Quad CPU Q6600 @ 2.40GHz 32bit running Debian Jessie. The drop in performance is drastic : there is a 10 seconds delay due to processing ! I therefore looked into multi-threading to gain performance : I first tried the sample code by OpenCv, and the result is great! All four cores hit 100%, and the performance is much better. I then replaced the frame

How to save resulted face landmark image in dlib?

穿精又带淫゛_ 提交于 2019-12-04 07:17:24
I am using dlib's face_landmark_detection_ex.cpp which display the detected face image and all face landmarks on the original image. I want to save the original image with all 68 face face landmarks to my computer. I know it can be done by save_png and draw_rectangle function of dlib but draw_rectangle only give detected face rectangle position, along with it, I also want to draw the landmark points on the original image and save them like this : The parameter pixel_type is used to specify the kind of pixels to be used to draw the rectangle. In the header declaration of the function it is

circleci: pip install dlib fails

佐手、 提交于 2019-12-04 06:23:48
问题 I have a python project that requires dlib . I am trying to setup CircleCI and wrote my config.yml as follows: # Python CircleCI 2.0 configuration file # # Check https://circleci.com/docs/2.0/language-python/ for more details # version: 2 jobs: build: docker: # specify the version you desire here # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` - image: circleci/python:3.6.1 # Specify service dependencies here if necessary # CircleCI maintains a library of pre-built images #

DLib : train_shape_predictor_ex.cpp

时光毁灭记忆、已成空白 提交于 2019-12-04 02:06:10
问题 I am trying to train the shape predictor of Dlib by executing train_dlib_shape_predictor_ex.cpp on helen dataset as described in the code, I place test images in a face folder in current directory of shape predictor. But when I run the code it throws following exception: 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. as no training_with_face_landmarks.xml and testing_with_face

Drawing fancy rectangle around face

蓝咒 提交于 2019-12-03 13:58:54
I am using the following code to detect face and draw rectangle on top of the face. while True: # get video frame ret, img = cap.read() input_img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) img_h, img_w, _ = np.shape(input_img) detected = detector(input_img, 1) for i, d in enumerate(detected): x1, y1, x2, y2, w, h = d.left(), d.top(), d.right() + 1, d.bottom() + 1, d.width(), d.height() cv2.rectangle(img, (x1, y1), (x2, y2), (255, 0, 0), 2) cv2.imshow("result", img) key = cv2.waitKey(30) if key == 27: break The rectangle appears to be like this: However Im trying to get a rectangle similar to this:

转:Windows系统环境下安装dlib

二次信任 提交于 2019-12-03 08:15:43
原文链接 因为今天安装Face Recognition,需要先按照 dlib 。需要在windows环境下做一些图片处理,所以需要在pycharm中配置环境,而其中需要的主要是dlib的安装: 下面说一下关于dlib的配置安装: —-dlib安装—— 1、下载文件 首先需要从网上下载 dlib: http://dlib.net/ 或者 https://github.com/davisking/dlib 下载完成后,解压缩 这时候需要的是dist文件夹中的下面图片中的两个文件夹(这里先不用管,下面已经完成的): 2、编译 ->打开终端,并且定位在dlib文件夹,使用python setup.py install产生上面的文件夹 在运行上面的命令时可能会遇见以下两种问题: ① 在运行的时候会出现找不到cmake的问题 解决方法: 当遇见这个问题的时候,说明你的系统环境中并没有 cmake ,所以这时候需要你在你的电脑上安装cmake编译环境。 ->官网下载安装包: https://cmake.org/download/ ->下载完成之后,解压缩,然后将cmake的bin文件夹添加在系统环境路径中。 ->添加环境变量 然后理论上讲,应该不会出现cmake的错误,但是后面会出现第二个错误 ② 再次运行python setup.py install,出现could not find

how to build DLIB for iOS

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm trying to build DLIB for an iOS project. Running the cmake results in a libdlib.a and a load of .o files. When I add the library to an Xcode project I get warning that the library hasn't been built for arm64 . My question is two-part: How can I build DLIB for iOS (I tried cmake **path_to_source** -DCMAKE_OSX_ARCHITECTURE="arm64" but it caused loads of errors e.g. unknown type name '__uint32_t'; did you mean '__uint128_t' )? What is the purpose of all the .o files that get built when you run cmake? Do I need to include them in

Install dlib with cuda support ubuntu 18.04

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have CUDA 9.0 and CUDNN 7.1 installed on Ubuntu 18.04(Linux mint 19). Tensorflow-gpu works fine on GPU(GTX 1080ti). Now i am trying to build dlib with CUDA support: sudo python3 setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA --clean Got the error: user@user-pc:~/Downloads/dlib$ sudo python3 setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA --clean running install running bdist_egg running egg_info writing dlib.egg-info/PKG-INFO writing dependency_links to dlib.egg-info/dependency_links.txt writing top-level

Include dlib in c++ project

匿名 (未验证) 提交于 2019-12-03 01:46:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to get the dlib library working in my c++ project and don't know what to do with my Makefile and the #include<...> in the header file of my script. I have placed my header file and my script in the src directory. A symbolic link has been made to the dlib library, the link is in the include directory (see the folder structure below). On the dlib website it says: You should not add the dlib folder itself to your compiler's include path Instead you should add the folder that contains the dlib folder to your include search path and