dlib

Face aligment check with DLIB

对着背影说爱祢 提交于 2019-12-13 16:31:43
问题 I am just wondering is it possible to detect is the face aligned correctly, straight to the camera with DLIB and OpenCV? I tried this code to detect shape and get the points of face: detector = dlib.get_frontal_face_detector() predictor = dlib.shape_predictor(args["shape_predictor"]) vs = VideoStream(0).start() while True: # grab the frame from the threaded video stream, resize it to # have a maximum width of 400 pixels, and convert it to # grayscale frame = vs.read() frame = imutils.resize

import dlib ImportError Symbol not found: _PyClass_Type

北慕城南 提交于 2019-12-13 15:11:09
问题 When I run import dlib in Python 3.6 I get the following error: Traceback (most recent call last): File "demo.py", line 3, in <module> import dlib File "/usr/local/lib/python3.6/site-packages/dlib/__init__.py", line 1, in <module> from .dlib import * ImportError: dlopen(/usr/local/lib/python3.6/site-packages/dlib/dlib.so, 2): Symbol not found: _PyClass_Type Referenced from: /usr/local/opt/boost-python/lib/libboost_python-mt.dylib Expected in: flat namespace in /usr/local/opt/boost-python/lib

dlib load jpeg files

怎甘沉沦 提交于 2019-12-13 13:09:54
问题 I am trying to implement a program using dlib library. I have already been able to use dlib's all other files except the ones related to jpeg and png. #include "dlib\image_io.h" #define DLIB_JPEG_SUPPORT int main(){ dlib::array2d<dlib::rgb_pixel> arr1; dlib::load_jpeg(arr1,"sailboat1234.jpeg"); } I have included to my project the source.cpp file and the ones inside the dlib/external . Also i have included into c++ general the dlib-18.11 folder which contains the dlib folder. Lastly, the

OpenCV, dlib landmarks rotation

混江龙づ霸主 提交于 2019-12-13 07:23:12
问题 I am new in OpenCV an dlib, and I am not sure if my designe is correct. I want to write C++ face detector for android phone wich should detect faces with differents phone orientation and rotatrion angles. Lets stay when phone orientation is portrait and landscape. I am using OpenCV to rotate/edit image and dlib to detect faces. dlib shape predicats initialized with shape_predictor_68_face_landmarks.dat and it can detect face only in correct phone orientation (it means if I rotate phone by 90

Low accuracy of shape predictor with default dataset and training

自作多情 提交于 2019-12-12 13:58:36
问题 I'm trying to use dlib to train shape predictor with default dataset( /dlib-19.0/examples/faces/training_with_face_landmarks.xml ) and default train sample( train_shape_predictor_ex.cpp ). So I want to train shape predictor which will be exactly like default shape predictor( shape_predictor_68_face_landmarks.dat ) because I used same dataset and same training code. But I get some issues. After training I get my .dat file with 16.6mb (but default dlib predictor shape_predictor_68_face

Trouble installing Dlib for python on Mac OSX 10.10

浪子不回头ぞ 提交于 2019-12-12 11:48:37
问题 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

Is it possible for using Dlib in android like OpenCV?

放肆的年华 提交于 2019-12-12 11:19:17
问题 Well i need a clear site or information on using Dlib in android. I searched in the net throughout to get a sample application in android using Dlib but still i can't find a one. I am not still sure whether we can use Dlib methods in android for generating .a file so that we can use it as a library. Can anyone suggest me or guide me on how to use Dlib in android and what is its purpose. 回答1: This issue has already been dealt here. You can refer to https://github.com/tzutalin/dlib-android for

How to save resulted face landmark image in dlib?

喜夏-厌秋 提交于 2019-12-12 08:49:17
问题 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 : 回答1: The parameter pixel_type is used to

how to install dlib in python 32 bit? This error is coming

早过忘川 提交于 2019-12-12 06:46:10
问题 C:\Users\leatherwallZ>pip install dlib Collecting dlib Using cached https://files.pythonhosted.org/packages/1e/62/aacb236d21fbd08148b1d517d58a9d80ea31bdcd386d26f21f8b23b1eb28/dlib-19.18.0.tar.gz Installing collected packages: dlib Running setup.py install for dlib ... error ERROR: Command errored out with exit status 1: command: 'c:\users\leatherwallz\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\LEATHE~1\AppData

Assigning unique face id realtime

南楼画角 提交于 2019-12-12 04:57:31
问题 Im using the following code to generate each person an id. It works partially however the problem is that when more people comes in, each of them are getting the same id. Lets say if there are totally 3 persons, it is assigning the id 3 to everyone. I want it to be unique in incremental order. How can I sort this out? while True: ret, img = cap.read() input_img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) detected = detector(input_img, 1) current_viewers = len(detected) if current_viewers > last