Code Monkey home page Code Monkey logo

davisking / dlib Goto Github PK

View Code? Open in Web Editor NEW
13.0K 478.0 3.3K 48.13 MB

A toolkit for making real world machine learning and data analysis applications in C++

Home Page: http://dlib.net

License: Boost Software License 1.0

CMake 0.61% C++ 97.70% C 0.23% MATLAB 0.01% Python 0.72% Makefile 0.03% Cuda 0.58% Batchfile 0.01% Shell 0.01% Java 0.04% XSLT 0.08% Perl 0.01%
machine-learning deep-learning c-plus-plus python computer-vision machine-learning-library dlib

dlib's People

Contributors

abdealiloko avatar arrufat avatar avaucher avatar dashesy avatar davisking avatar decrispell avatar dennisfrancis avatar e-fominov avatar elelel avatar ernestotapiar avatar facug91 avatar grochefort avatar jackculpepper avatar jschueller avatar mbwfl avatar oysteinmyrmo avatar patricksnape avatar pfeatherstone avatar reunanen avatar rggjan avatar seanwarren avatar skadge avatar stefan-it avatar steve98654 avatar stoperro avatar thebhatman avatar vinhkhuc avatar virgiled avatar visionworkz avatar yuriio147 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dlib's Issues

faster face alignment

Hi. The face alignment program takes about one second per image on my computer. That's far behind my requirement (at least 20 FPS). How can I make it run faster? All I can come up with is reducing the size of feature pool.

BTW, is my make statement correct? Please help. Thanks.

g++ -O3 -I.. -DDLIB_NO_GUI_SUPPORT -DDLIB_JPEG_SUPPORT ../dlib/all/source.cpp face_landmark_detection_ex.cpp -lpthread -ljpeg

Run Imglab and receive an error "Unable to connect to the X display"

I tried to run imglab to label some images, I can create a xml file, but got the following error
Howards-MacBook-Pro:build tang$ imglab aa.xml
3 FATAL [1] dlib.gui_core: Unable to connect to the X display.
Failed to initialize X11 resources

My Mac OSX 10.10.3
I used brew to install XQuartz
brew install Caskroom/cask/xquartz

I commented the following lines in the cmakelists.txt

set (DLIB_NO_GUI_SUPPORT_STR

#”Enable this if you don't want to compile any of the dlib GUI code" )

When I built imglab, I had the following config in my cmakecache.txt and not sure if it's right
DLIB_NO_GUI_SUPPORT:BOOL=OFF

Thanks a lot,

SefFault on module import in Python

I compiled the python bindings using the included setup.py file (python setup.py install). It seemed to compile fine but when I import the module to the python interpreter it causes a segfault. How should I go about troubleshooting this? I attached the output of the setup file below

┌[user@dyn-160-39-234-85] [/dev/ttys000] [master ⚡] [1]
└[~/Devspace/dlib]> sudo python setup.py install
running install
running bdist_egg
running build
Detected Python architecture: 64bit
Removing build directory /Users/gabriel/Devspace/dlib/./tools/python/build
Configuring cmake ...
-- The C compiler identification is AppleClang 7.0.0.7000176
-- The CXX compiler identification is AppleClang 7.0.0.7000176
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.59.0
-- Found the following Boost libraries:
-- python
-- Found PythonLibs: /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib (found suitable version "2.7.10", minimum required is "2.6")
-- USING BOOST_LIBS: /usr/local/lib/libboost_python-mt.dylib
-- USING PYTHON_LIBS: /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
-- Enabling SSE4 instructions


*** DLIB GUI SUPPORT DISABLED BECAUSE X11 DEVELOPMENT LIBRARIES NOT FOUND ***
*** Make sure XQuartz is installed if you want GUI support. ***
*** You can download XQuartz from: http://xquartz.macosforge.org/landing/ ***


-- Looking for png_create_read_struct
-- Looking for png_create_read_struct - found
-- Looking for jpeg_read_header
-- Looking for jpeg_read_header - found
-- Searching for BLAS and LAPACK
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Found LAPACK library
-- Found CBLAS library
-- Looking for cblas_ddot
-- Looking for cblas_ddot - found
-- Check for STD namespace
-- Check for STD namespace - found
-- Looking for C++ include iostream
-- Looking for C++ include iostream - found
-- Configuring done
-- Generating done
Build using cmake ...
Scanning dependencies of target dlib
[ 0%] Building CXX object dlib_build/CMakeFiles/dlib.dir/base64/base64_kernel_1.o
[ 1%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_1.o
[ 2%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_2.o
[ 3%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bit_stream/bit_stream_kernel_1.o
[ 4%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_1.o
[ 5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_2.o
[ 6%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_1.o
[ 7%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_2.o
[ 8%] Building CXX object dlib_build/CMakeFiles/dlib.dir/md5/md5_kernel_1.o
[ 9%] Building CXX object dlib_build/CMakeFiles/dlib.dir/tokenizer/tokenizer_kernel_1.o
[ 10%] Building CXX object dlib_build/CMakeFiles/dlib.dir/unicode/unicode.o
[ 11%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/image_dataset_metadata.o
[ 12%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_1.o
[ 13%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bsp/bsp.o
[ 14%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_1.o
[ 15%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_2.o
[ 16%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_extensions.o
[ 17%] Building CXX object dlib_build/CMakeFiles/dlib.dir/linker/linker_kernel_1.o
[ 18%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/extra_logger_headers.o
[ 19%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_kernel_1.o
[ 20%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_config_file.o
[ 21%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_1.o
[ 22%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_2.o
[ 23%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_extensions.o
[ 24%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_2.o
[ 25%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf.o
[ 25%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf_unbuffered.o
[ 26%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_kernel.o
[ 27%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_iostream.o
[ 28%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_http.o
[ 29%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/multithreaded_object_extension.o
[ 30%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threaded_object_extension.o
[ 31%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_1.o
[ 32%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_2.o
[ 33%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_shared.o
[ 34%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/thread_pool_extension.o
[ 35%] Building CXX object dlib_build/CMakeFiles/dlib.dir/timer/timer.o
[ 36%] Building CXX object dlib_build/CMakeFiles/dlib.dir/stack_trace.o
[ 37%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_loader/png_loader.o
[ 38%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_saver/save_png.o
[ 39%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jcomapi.o
[ 40%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdapimin.o
[ 41%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdapistd.o
[ 42%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdatasrc.o
[ 43%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdcoefct.o
[ 44%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdcolor.o
[ 45%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jddctmgr.o
[ 46%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdhuff.o
[ 47%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdinput.o
[ 48%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdmainct.o
[ 49%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdmarker.o
[ 50%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdmaster.o
[ 50%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdmerge.o
[ 51%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdphuff.o
[ 52%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdpostct.o
[ 53%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdsample.o
[ 54%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jerror.o
[ 55%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jidctflt.o
[ 56%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jidctfst.o
[ 57%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jidctint.o
[ 58%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jidctred.o
[ 59%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jmemmgr.o
[ 60%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jmemnobs.o
[ 61%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jquant1.o
[ 62%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jquant2.o
[ 63%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jutils.o
[ 64%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jcapimin.o
[ 65%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jdatadst.o
[ 66%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jcparam.o
[ 67%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jcapistd.o
[ 68%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jcmarker.o
[ 69%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jcinit.o
[ 70%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jcmaster.o
[ 71%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jcdctmgr.o
[ 72%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jccoefct.o
[ 73%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jccolor.o
[ 74%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jchuff.o
[ 75%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jcmainct.o
[ 75%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jcphuff.o
[ 76%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jcprepct.o
[ 77%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jcsample.o
[ 78%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jfdctint.o
[ 79%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jfdctflt.o
[ 80%] Building CXX object dlib_build/CMakeFiles/dlib.dir/external/libjpeg/jfdctfst.o
[ 81%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_loader/jpeg_loader.o
[ 82%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_saver/save_jpeg.o
[ 83%] Linking CXX static library libdlib.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(sockets_kernel_1.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(dir_nav_kernel_1.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(threads_kernel_1.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(stack_trace.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(sockets_kernel_1.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(dir_nav_kernel_1.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(threads_kernel_1.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(stack_trace.o) has no symbols
[ 83%] Built target dlib
Scanning dependencies of target dlib_
[ 84%] Building CXX object CMakeFiles/dlib_.dir/src/dlib.cpp.o
[ 85%] Building CXX object CMakeFiles/dlib_.dir/src/matrix.cpp.o
[ 86%] Building CXX object CMakeFiles/dlib_.dir/src/vector.cpp.o
[ 87%] Building CXX object CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o
[ 88%] Building CXX object CMakeFiles/dlib_.dir/src/svm_rank_trainer.cpp.o
[ 89%] Building CXX object CMakeFiles/dlib_.dir/src/decision_functions.cpp.o
[ 90%] Building CXX object CMakeFiles/dlib_.dir/src/other.cpp.o
[ 91%] Building CXX object CMakeFiles/dlib_.dir/src/basic.cpp.o
[ 92%] Building CXX object CMakeFiles/dlib_.dir/src/cca.cpp.o
[ 93%] Building CXX object CMakeFiles/dlib_.dir/src/sequence_segmenter.cpp.o
[ 94%] Building CXX object CMakeFiles/dlib_.dir/src/svm_struct.cpp.o
[ 95%] Building CXX object CMakeFiles/dlib_.dir/src/image.cpp.o
[ 96%] Building CXX object CMakeFiles/dlib_.dir/src/rectangles.cpp.o
[ 97%] Building CXX object CMakeFiles/dlib_.dir/src/object_detection.cpp.o
[ 98%] Building CXX object CMakeFiles/dlib_.dir/src/shape_predictor.cpp.o
[ 99%] Building CXX object CMakeFiles/dlib_.dir/src/correlation_tracker.cpp.o
[100%] Linking CXX shared library dlib.so
[100%] Built target dlib_
Install the project...
-- Install configuration: "Release"
-- Installing: /Users/gabriel/Devspace/dlib/tools/python/../../python_examples/dlib.so
Populating the distribution directory /Users/gabriel/Devspace/dlib/./dist/dlib ...
Copying file /Users/gabriel/Devspace/dlib/./python_examples/correlation_tracker.py -> /Users/gabriel/Devspace/dlib/./dist/dlib/examples/correlation_tracker.py.
Copying file /Users/gabriel/Devspace/dlib/./python_examples/dlib.so -> /Users/gabriel/Devspace/dlib/./dist/dlib/dlib.so.
Copying file /Users/gabriel/Devspace/dlib/./python_examples/face_detector.py -> /Users/gabriel/Devspace/dlib/./dist/dlib/examples/face_detector.py.
Copying file /Users/gabriel/Devspace/dlib/./python_examples/face_landmark_detection.py -> /Users/gabriel/Devspace/dlib/./dist/dlib/examples/face_landmark_detection.py.
Copying file /Users/gabriel/Devspace/dlib/./python_examples/find_candidate_object_locations.py -> /Users/gabriel/Devspace/dlib/./dist/dlib/examples/find_candidate_object_locations.py.
Copying file /Users/gabriel/Devspace/dlib/./python_examples/LICENSE_FOR_EXAMPLE_PROGRAMS.txt -> /Users/gabriel/Devspace/dlib/./dist/dlib/examples/LICENSE_FOR_EXAMPLE_PROGRAMS.txt.
Copying file /Users/gabriel/Devspace/dlib/./python_examples/max_cost_assignment.py -> /Users/gabriel/Devspace/dlib/./dist/dlib/examples/max_cost_assignment.py.
Copying file /Users/gabriel/Devspace/dlib/./python_examples/sequence_segmenter.py -> /Users/gabriel/Devspace/dlib/./dist/dlib/examples/sequence_segmenter.py.
Copying file /Users/gabriel/Devspace/dlib/./python_examples/svm_rank.py -> /Users/gabriel/Devspace/dlib/./dist/dlib/examples/svm_rank.py.
Copying file /Users/gabriel/Devspace/dlib/./python_examples/svm_struct.py -> /Users/gabriel/Devspace/dlib/./dist/dlib/examples/svm_struct.py.
Copying file /Users/gabriel/Devspace/dlib/./python_examples/train_object_detector.py -> /Users/gabriel/Devspace/dlib/./dist/dlib/examples/train_object_detector.py.
Copying file /Users/gabriel/Devspace/dlib/./python_examples/train_shape_predictor.py -> /Users/gabriel/Devspace/dlib/./dist/dlib/examples/train_shape_predictor.py.
running build_py
creating build
creating build/lib.macosx-10.11-x86_64-2.7
creating build/lib.macosx-10.11-x86_64-2.7/dlib
copying dist/dlib/init.py -> build/lib.macosx-10.11-x86_64-2.7/dlib
running egg_info
creating dist/dlib.egg-info
writing dist/dlib.egg-info/PKG-INFO
writing top-level names to dist/dlib.egg-info/top_level.txt
writing dependency_links to dist/dlib.egg-info/dependency_links.txt
writing manifest file 'dist/dlib.egg-info/SOURCES.txt'
reading manifest file 'dist/dlib.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '' found under directory 'dlib/build'
warning: no files found matching '*.bat' under directory 'python_examples'
warning: no previously-included files matching '
' found under directory 'python_examples/build'
writing manifest file 'dist/dlib.egg-info/SOURCES.txt'
copying dist/dlib/dlib.so -> build/lib.macosx-10.11-x86_64-2.7/dlib
creating build/lib.macosx-10.11-x86_64-2.7/dlib/examples
copying dist/dlib/examples/LICENSE_FOR_EXAMPLE_PROGRAMS.txt -> build/lib.macosx-10.11-x86_64-2.7/dlib/examples
copying dist/dlib/examples/init.py -> build/lib.macosx-10.11-x86_64-2.7/dlib/examples
copying dist/dlib/examples/correlation_tracker.py -> build/lib.macosx-10.11-x86_64-2.7/dlib/examples
copying dist/dlib/examples/face_detector.py -> build/lib.macosx-10.11-x86_64-2.7/dlib/examples
copying dist/dlib/examples/face_landmark_detection.py -> build/lib.macosx-10.11-x86_64-2.7/dlib/examples
copying dist/dlib/examples/find_candidate_object_locations.py -> build/lib.macosx-10.11-x86_64-2.7/dlib/examples
copying dist/dlib/examples/max_cost_assignment.py -> build/lib.macosx-10.11-x86_64-2.7/dlib/examples
copying dist/dlib/examples/sequence_segmenter.py -> build/lib.macosx-10.11-x86_64-2.7/dlib/examples
copying dist/dlib/examples/svm_rank.py -> build/lib.macosx-10.11-x86_64-2.7/dlib/examples
copying dist/dlib/examples/svm_struct.py -> build/lib.macosx-10.11-x86_64-2.7/dlib/examples
copying dist/dlib/examples/train_object_detector.py -> build/lib.macosx-10.11-x86_64-2.7/dlib/examples
copying dist/dlib/examples/train_shape_predictor.py -> build/lib.macosx-10.11-x86_64-2.7/dlib/examples
running build_ext
installing library code to build/bdist.macosx-10.11-x86_64/egg
running install_lib
creating build/bdist.macosx-10.11-x86_64
creating build/bdist.macosx-10.11-x86_64/egg
creating build/bdist.macosx-10.11-x86_64/egg/dlib
copying build/lib.macosx-10.11-x86_64-2.7/dlib/init.py -> build/bdist.macosx-10.11-x86_64/egg/dlib
copying build/lib.macosx-10.11-x86_64-2.7/dlib/dlib.so -> build/bdist.macosx-10.11-x86_64/egg/dlib
creating build/bdist.macosx-10.11-x86_64/egg/dlib/examples
copying build/lib.macosx-10.11-x86_64-2.7/dlib/examples/init.py -> build/bdist.macosx-10.11-x86_64/egg/dlib/examples
copying build/lib.macosx-10.11-x86_64-2.7/dlib/examples/correlation_tracker.py -> build/bdist.macosx-10.11-x86_64/egg/dlib/examples
copying build/lib.macosx-10.11-x86_64-2.7/dlib/examples/face_detector.py -> build/bdist.macosx-10.11-x86_64/egg/dlib/examples
copying build/lib.macosx-10.11-x86_64-2.7/dlib/examples/face_landmark_detection.py -> build/bdist.macosx-10.11-x86_64/egg/dlib/examples
copying build/lib.macosx-10.11-x86_64-2.7/dlib/examples/find_candidate_object_locations.py -> build/bdist.macosx-10.11-x86_64/egg/dlib/examples
copying build/lib.macosx-10.11-x86_64-2.7/dlib/examples/LICENSE_FOR_EXAMPLE_PROGRAMS.txt -> build/bdist.macosx-10.11-x86_64/egg/dlib/examples
copying build/lib.macosx-10.11-x86_64-2.7/dlib/examples/max_cost_assignment.py -> build/bdist.macosx-10.11-x86_64/egg/dlib/examples
copying build/lib.macosx-10.11-x86_64-2.7/dlib/examples/sequence_segmenter.py -> build/bdist.macosx-10.11-x86_64/egg/dlib/examples
copying build/lib.macosx-10.11-x86_64-2.7/dlib/examples/svm_rank.py -> build/bdist.macosx-10.11-x86_64/egg/dlib/examples
copying build/lib.macosx-10.11-x86_64-2.7/dlib/examples/svm_struct.py -> build/bdist.macosx-10.11-x86_64/egg/dlib/examples
copying build/lib.macosx-10.11-x86_64-2.7/dlib/examples/train_object_detector.py -> build/bdist.macosx-10.11-x86_64/egg/dlib/examples
copying build/lib.macosx-10.11-x86_64-2.7/dlib/examples/train_shape_predictor.py -> build/bdist.macosx-10.11-x86_64/egg/dlib/examples
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/init.py to init.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/examples/init.py to init.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/examples/correlation_tracker.py to correlation_tracker.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/examples/face_detector.py to face_detector.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/examples/face_landmark_detection.py to face_landmark_detection.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/examples/find_candidate_object_locations.py to find_candidate_object_locations.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/examples/max_cost_assignment.py to max_cost_assignment.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/examples/sequence_segmenter.py to sequence_segmenter.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/examples/svm_rank.py to svm_rank.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/examples/svm_struct.py to svm_struct.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/examples/train_object_detector.py to train_object_detector.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/examples/train_shape_predictor.py to train_shape_predictor.pyc
creating stub loader for dlib/dlib.so
byte-compiling build/bdist.macosx-10.11-x86_64/egg/dlib/dlib.py to dlib.pyc
creating build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
copying dist/dlib.egg-info/PKG-INFO -> build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
copying dist/dlib.egg-info/SOURCES.txt -> build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
copying dist/dlib.egg-info/dependency_links.txt -> build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
copying dist/dlib.egg-info/not-zip-safe -> build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
copying dist/dlib.egg-info/top_level.txt -> build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
writing build/bdist.macosx-10.11-x86_64/egg/EGG-INFO/native_libs.txt
creating 'dist/dlib-18.18.99-py2.7-macosx-10.11-x86_64.egg' and adding 'build/bdist.macosx-10.11-x86_64/egg' to it
removing 'build/bdist.macosx-10.11-x86_64/egg' (and everything under it)
Processing dlib-18.18.99-py2.7-macosx-10.11-x86_64.egg
removing '/usr/local/lib/python2.7/site-packages/dlib-18.18.99-py2.7-macosx-10.11-x86_64.egg' (and everything under it)
creating /usr/local/lib/python2.7/site-packages/dlib-18.18.99-py2.7-macosx-10.11-x86_64.egg
Extracting dlib-18.18.99-py2.7-macosx-10.11-x86_64.egg to /usr/local/lib/python2.7/site-packages
dlib 18.18.99 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/site-packages/dlib-18.18.99-py2.7-macosx-10.11-x86_64.egg
Processing dependencies for dlib==18.18.99
Finished processing dependencies for dlib==18.18.99

More Python implicit numerical conversions and adding .as_array()

It will be helpful to do some implicit conversions, to allow more seamless integration with Python applications.
For example if I want to use shape predictor with a rectangle object that has 32 bit integer instead of Python's long or double I get this error:

rectangle.__init__(rectangle, numpy.int32, numpy.int32, numpy.int32, numpy.int32) did not match C++ signature:

I noticed I can add e.g. irectangle to rectangles.cpp with a line like bellow to have this also work:

.def(init<boost::int32_t,boost::int32_t,boost::int32_t,boost::int32_t>( (arg("left"),arg("top"),arg("right"),arg("bottom")) ))
  1. I was wondering if boost has a better implicit conversion for some known numeric types. Of course I could just create my rectangle with long(x) but that leaks c++ implementation to Python and the code will look foreign. The reason I had int32 was because it came from another library that is integrated with numpy and if rectangle could just accept the integer type that would have been more Pythonic. This is not just to make dlib work, because it works damn fine already, but a matter of aesthetics and convenience for Python users, and making Python a first-class user of dlib. Even better would be to accept a list (or something iterable) also as rectangle too, and it seems to also be possible with boost.
  2. Some functions return an object that has properties, for example rectangle has top(), bottom(), ... but these objects can be easily converted to a simple numpy array like what OpenCV does. If we could have .to_array() and .to_list() defined for them, it will be less verbose when dealing with those objects than calling those accessors.

Rectangle is just an example, I am sure there are more places that will benefit from relaxing the interface, or adding some helper methods or just adding __repr__.

I have used Cython a lot to build glue layers but boost python integration is new to me, and before looking at dlib I did not even know how well it works already, with docstrings and all!

Do you think in general PRs to do this relaxation are acceptable? or you prefer to have a one-to-one relation to c++ library with API's look-and-feel?

Object detector training results don't detect very much

First things first: I'm posting here because it seems like the SourceForge discussion isn't very active. My issue is almost certainly a mistake on my part and not a dlib bug, though, so if I am abusing the Issues section here, just close this and I'll seek guidance on the appropriate channels.

I'm using the object detector to detect fingertips, and I've prepared about 800 truth boxes in about 200 images. The range of angles for the fingers is no more than +/- 45 degrees, which I figure is probably OK, since the face detector seems to work with similar angles. Training works just fine, and when I generate an image with draw_fhog(), I can clearly see a representation of a finger (I love this feature!)

When I go to use the detector, I rarely get results. Even when I run the detector on the same images that I trained with, I rarely get any rectangles out of the detector. When I do, they are correct though. I also find that the fewer images I train with, the more results I do get, though they pretty much only happen with images from the training set. If I train with more than 50 truth boxes, it seems I will not ever detect anything.

I'm sure we're all very busy, so I don't expect much assistance here. I'm just wondering if anything comes to mind why I might be experiencing this? I am mostly using default parameters for training (c=1, epsilon=0.01, pyramid_down<6>, which I think means the downsampling ratio is 5/6). I've increased c and epsilon with no noticeable results. Fingers don't have a lot of detail for the training to fit to, but I expected that I'd have false positives, not a lack of positives. I don't mind false positives if I can at least get the training set to be detected.

error while using train_object_detector.py

Hi,
Thank you for the nice library.
I have a question. I am using 'train_object_detector' to detect whales(some images attached). When trying to train my detector, I got the following error:
Training with C: 5
Training with epsilon: 0.01
Training using 8 threads.
Training with sliding window 88 pixels wide by 73 pixels tall.
Training on both left and right flipped versions of images.
Traceback (most recent call last):
File "/Users/mas/dlib/python_examples/train_object_detector.py", line 76, in
dlib.train_simple_object_detector(training_xml_path, "detector.svm", options)
RuntimeError: An impossible set of object labels was detected. This is happening because none
of the object locations checked by the supplied image scanner is a close enough
match to one of the truth boxes. To resolve this you need to either lower the
match_eps or adjust the settings of the image scanner so that it hits this
truth box. Or you could adjust the offending truth rectangle so it can be
matched by the current image scanner. Also, if you are using the
scan_image_pyramid object then you could try using a finer image pyramid or
adding more detection templates. E.g. if one of your existing detection
templates has a matching width/height ratio and smaller area than the offending
rectangle then a finer image pyramid would proably help.

image index 108
match_eps: 0.5
best possible match: 0.480948
truth rect: [(792, 412) (1134, 945)]
truth rect width/height: 0.642322
truth rect area: 183162
nearest detection template rect: [(778, 537) (1122, 813)]
nearest detection template rect width/height: 1.24549
nearest detection template rect area: 95565

screen shot 2015-09-30 at 5 34 01 pm

screen shot 2015-09-30 at 5 34 19 pm

screen shot 2015-09-30 at 5 34 39 pm

how to convert cv_image to array2d?

I want to read images using opencv's imread, and then wrap it using cv_image from dlib
However, when I try to feed this image to a front face detector, I got an error "invalid argument". How can transform cv_image to array2d.
Here is my pieces of code define the data type:

frontal_face_detector detector = get_frontal_face_detector();
Mat img_opencv = imread(argv[i]);
cv_image<rgb_pixel> img(img_opencv);
std::vector<rectangle> dets = detector(img);

undefined symbol: _Z8bind_guiv

I use python_examples/compile_dlib_python_module.bat build dlib.so,and copy dlib.so to
/usr/lib/python2.7/site-packages/
Logs:

[mersdk@SailfishSDK python_examples]$ python
Python 2.7.6 (default, May 09 2013, 12:34:56) 
[GCC 4.8.3 20140106 (Mer 4.8.3-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: ./dlib.so: undefined symbol: _Z8bind_guiv

The same issue like http://sourceforge.net/p/dclib/discussion/442518/thread/c05888de/

Fix dlib installation

dlib recommends a non-standard way of integrating with other projects CMake projects, by directly including dlib's CMake. Besides being non standard, it forces the user to recompile dlib everytime we use it.

dlib should support an official way to install it instead.
Amongst the advantages:

  • this would allow to compile the library only once
  • this would ease integration with CMake project (one would just write find_package(dlib) to include it)
  • providing a real installation target would make it possible to package dlib in the various Linux/MacOSX distributions
  • it would also permit a standard way to access the version number, which is really important considering the recent API break between minor versions

If the maintainer is willing to consider a pull-request implementing such changes, I am willing to contribute it

Compiling with clang++-3.7 and -D_GLIBCXX_DEBUG breaks dlib

clang++-3.7 -Wall -Wextra -std=c++11 -MMD -fPIC -g -O1 -D_GLIBCXX_USE_CXX11_ABI=0 -D_GLIBCXX_DEBUG -Isrc -I/usr/src/dlib -DDLIB_JPEG_SUPPORT -c -o bin/face_fhog.o src/face_fhog.cpp
In file included from src/face_fhog.cpp:3:
In file included from /usr/src/dlib/dlib/image_processing.h:7:
/usr/src/dlib/dlib/image_processing/scan_image_pyramid.h:498:38: error: default initialization of an object of const type 'const std::vector<rectangle>' without a user-provided default constructor
        const std::vector<rectangle> movable_feature_extraction_regions;
                                     ^
                                                                       {}

(This happens on ubuntu 15.10)

Import Error: ... Undefined symbol dormqr_

Hi,
I have worked on dlib v18.17 and the experience has been wonderful.

I am working on an AMI Linux system now.
To use dlib, I cloned your repository, instead of downloading dlib (I guess the latest one is v18.18). Anyway, I seem to face some issues on importing dlib.

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/dlib-18.18.99-py2.7-linux-x86_64.egg/dlib/init.py", line 1, in
from .dlib import *
ImportError: /usr/local/lib/python2.7/dist-packages/dlib-18.18.99-py2.7-linux-x86_64.egg/dlib/dlib.so: undefined symbol: dormqr_

Have I cloned the repo properly?
Kindly help with the solution.

Thanks.

face_landmark_detection_ex.cpp slow processing of images

Hi sir, I would like to know if you have any suggestion on how to increase the speed of this example program for landmark detection in high quality images? I plan to utilize this library for mobile phones and performance would be a key issue in this case.

Thank you very much!

Tuning pegasos parameters

I'm trying to tune pegasos parameters without no luck.

Here is simple example using 6 one-dimensional points.

void dlib_svm_test()
{
    for(double lambda= 10e-10;lambda<=10e10;lambda*=10)
    {
        typedef dlib::matrix<double, 0, 1> sample_type;
        typedef dlib::linear_kernel<sample_type> kernel_type;

        dlib::svm_pegasos<kernel_type> pegasos;

        cout << lambda <<endl;

        pegasos.set_lambda(lambda);
        pegasos.set_kernel(kernel_type());

        std::vector<sample_type> samples(6);
        sample_type sample;
        sample.set_size(1);

        sample(0)= 188.0d;
        samples[0]= sample;
        sample(0)= 168.0d;
        samples[1]= sample;
        sample(0)= 191.0d;
        samples[2]= sample;
        sample(0)= 150.0d;
        samples[3]= sample;
        sample(0)= 154.0d;
        samples[4]= sample;
        sample(0)= 124.0d;
        samples[5]= sample;

        pegasos.train(samples[0],+1);
        pegasos.train(samples[1],+1);
        pegasos.train(samples[2],+1);
        pegasos.train(samples[3],-1);
        pegasos.train(samples[4],-1);
        pegasos.train(samples[5],-1);

        cout<< pegasos(samples[0]) <<endl;
        cout<< pegasos(samples[1]) <<endl;
        cout<< pegasos(samples[2]) <<endl;
        cout<< pegasos(samples[3]) <<endl;
        cout<< pegasos(samples[4]) <<endl;
        cout<< pegasos(samples[5]) <<endl;

        pegasos.clear();
    }
}

The output tha tI get:

0.0000000010
-3963387.1199921928
-3541750.1923335334
-4026632.6591409920
-3162276.9574407390
-3246604.3429724714
-2614148.9514844813
0.0000000100
-1253333.0548153266
-1119999.7511116527
-1273333.0503708781
-999999.7777783460
-1026666.4385190808
-826666.4829635697
0.0000001000
-396338.7119995961
-354175.0192337657
-402663.2659144707
-316227.6957445183
-324660.4342976844
-261414.8951489388
0.0000010000
-125333.3054819095
-111999.9751115777
-127333.3050374593
-99999.9777782790
-102666.6438523454
-82666.6482968476
0.0000100000
-39633.8712003365
-35417.5019237890
-40266.3265918186
-31622.7695748963
-32466.0434302058
-26141.4895153846
0.0001000000
-12533.3305485679
-11199.9975115703
-12733.3305041176
-9999.9977782724
-10266.6643856720
-8266.6648301755
0.0010000000
-3963.3871204108
-3541.7501927916
-4026.6326595536
-3162.2769579343
-3246.6043434582
-2614.1489520294
0.0100000000
-1253.3330552344
-1119.9997515702
-1273.3330507840
-999.9997782725
-1026.6664390053
-826.6664835091
0.1000000000
-396.3387124203
-354.1750196940
-402.6632663292
-316.2276962404
-324.6604347856
-261.4148956963
1.0000000000
-125.3333059077
-111.9999755772
-127.3333054573
-99.9999782797
-102.6666443458
-82.6666488500
10.0000000000
-39.6338716427
-35.4175024067
-40.2663270281
-31.6227700943
-32.4660439415
-26.1414900875
100.0000000000
-12.5333310483
-11.1999980544
-12.7333309973
-9.9999983600
-10.2666649587
-8.2666654680
1000.0000000000
-3.7091542406
-3.3145634810
-3.7683428546
-2.9594317974
-3.0383499493
-2.4464638100
10000.0000000000
-0.4292670207
-0.3836003494
-0.4361170215
-0.3425003451
-0.3516336794
-0.2831336723
100000.0000000000
0.0372866667
0.0333200000
0.0378816667
0.0297500000
0.0305433333
0.0245933333
1000000.0000000000
0.0037286667
0.0033320000
0.0037881667
0.0029750000
0.0030543333
0.0024593333
10000000.0000000000
0.0003728667
0.0003332000
0.0003788167
0.0002975000
0.0003054333
0.0002459333
100000000.0000000000
0.0000372867
0.0000333200
0.0000378817
0.0000297500
0.0000305433
0.0000245933
1000000000.0000000000
0.0000037287
0.0000033320
0.0000037882
0.0000029750
0.0000030543
0.0000024593
10000000000.0000000000
0.0000003729
0.0000003332
0.0000003788
0.0000002975
0.0000003054
0.0000002459
100000000000.0000000000
0.0000000373
0.0000000333
0.0000000379
0.0000000297
0.0000000305
0.0000000246

So the problem that I get all samples predicted as negative or positive.

dlib on Android

Hi,
Dlib is a cross platform library, so dlib is supposed to compile and run successfully on Android? It seems the only thing to do is writing Android.mk. Does someone have the similar experiences?

Problem with library installation using cmake

Hello,

I know building the project as a library is not the common way of using it, but since the CMakeLists.txt is written for it, and because it is convenient for cmake-based projects, I would like to report something.

Headers installation has a strange behaviour here and installs the wrong headers (the ones necessary for the build only). I checked cmake's documentation and it seems your code is right but it still behaves strangely here (cmake 3.4.1). I propose the following modification:

--- a/dlib/CMakeLists.txt   2015-10-29 01:27:41.000000000 +0100
+++ b/dlib/CMakeLists.txt   2016-01-08 09:13:10.410043662 +0100
@@ -429,7 +429,8 @@

        install(DIRECTORY ${CMAKE_SOURCE_DIR}/ DESTINATION include/dlib
                FILES_MATCHING PATTERN "*.h"
-               REGEX "${CMAKE_CURRENT_BINARY_DIR}" EXCLUDE)
+               REGEX "config.h" EXCLUDE 
+               REGEX "revision.h" EXCLUDE)


        configure_file(${CMAKE_SOURCE_DIR}/../dlib/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)

Also I don't understand the role of CONF_INSTALL_PATH, as it seems to ignore the standard CMAKE_INSTALL_PREFIX variable. Below is a proposal of a modification.

--- a/dlib/CMakeLists.txt   2015-10-29 01:27:41.000000000 +0100
+++ b/dlib/CMakeLists.txt   2016-01-08 09:13:10.410043662 +0100
@@ -448,7 +449,6 @@
             NAMESPACE dlib::
             DESTINATION ${ConfigPackageLocation})

-       set(CONF_INSTALL_PATH "\${dlib_CMAKE_DIR}/../../../")
        configure_file(dlibConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/config/dlibConfig.cmake" @ONLY)

        include(CMakePackageConfigHelpers)

--- a/dlib/dlibConfig.cmake.in  2016-01-08 09:00:05.647628418 +0100
+++ b/dlib/dlibConfig.cmake.in  2016-01-08 09:00:40.744104951 +0100
@@ -22,11 +22,7 @@
 # Compute paths
 get_filename_component(dlib_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)

-if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 2.8)
-    get_filename_component(dlib_INSTALL_PATH "@CONF_INSTALL_PATH@" ABSOLUTE)
-else()
-    get_filename_component(dlib_INSTALL_PATH "@CONF_INSTALL_PATH@" REALPATH)
-endif()
+set(dlib_INSTALL_PATH "@CMAKE_INSTALL_PREFIX@")

 set(dlib_INCLUDE_DIRS "${dlib_INSTALL_PATH}/include")

Integrating dlib with android ndk

I would like to integrate the dlib library with my android app which has the ndk configuration, But I am facing problems in building the library using the ndk-build command it outputs a lot of errors as undefined reference toXOpenDisplay``. But it seems that I have correctly installed the X11 library, I would like to know is it possible to integrate your library code with android ndk?

Submit for PyPI

Do you plan to submit the package for PyPI (Python Package Index)? It will bring in many more Python programmers in the scientific computing community, who otherwise are less willing to compile from the source.

Python examples compile fails when using code from git

Hi,
I cloned the current git version and when I try to compile the python examples, it fails with the following error:

[ 94%] Building CXX object CMakeFiles/dlib_.dir/src/rectangles.cpp.o
[ 95%] Building CXX object CMakeFiles/dlib_.dir/src/object_detection.cpp.o
In file included from /tmp/dlib/dlib/../dlib/image_processing/../image_processing.h:12:0,
from /tmp/dlib/dlib/../dlib/image_processing/scan_image_pyramid.h:9,
from /tmp/dlib/dlib/../dlib/image_processing/remove_unobtainable_rectangles.h:7,
from /tmp/dlib/tools/python/src/simple_object_detector.h:12,
from /tmp/dlib/tools/python/src/object_detection.cpp:9:
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:70:9: error: variable or field ‘setup_hashed_features’ declared void
scan_image_pyramid<pyramid, feature_image<feature_extractor, projection_hash> >& scanner,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:70:9: error: ‘scan_image_pyramid’ was not declared in this scope
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:70:35: error: expected primary-expression before ‘,’ token
scan_image_pyramid<pyramid, feature_image<feature_extractor, projection_hash> >& scanner,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:70:87: error: expected primary-expression before ‘>’ token
scan_image_pyramid<pyramid, feature_image<feature_extractor, projection_hash> >& scanner,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:70:90: error: ‘scanner’ was not declared in this scope
scan_image_pyramid<pyramid, feature_image<feature_extractor, projection_hash> >& scanner,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:71:9: error: expected primary-expression before ‘const’
const image_array& images,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:72:9: error: expected primary-expression before ‘const’
const feature_extractor& fe,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:73:9: error: expected primary-expression before ‘int’
int bits,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:74:9: error: expected primary-expression before ‘unsigned’
unsigned long num_samples = 200000
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:114:9: error: variable or field ‘setup_hashed_features’ declared void
scan_image_pyramid<pyramid, feature_image<feature_extractor, projection_hash> >& scanner,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:114:9: error: ‘scan_image_pyramid’ was not declared in this scope
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:114:35: error: expected primary-expression before ‘,’ token
scan_image_pyramid<pyramid, feature_image<feature_extractor, projection_hash> >& scanner,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:114:87: error: expected primary-expression before ‘>’ token
scan_image_pyramid<pyramid, feature_image<feature_extractor, projection_hash> >& scanner,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:114:90: error: ‘scanner’ was not declared in this scope
scan_image_pyramid<pyramid, feature_image<feature_extractor, projection_hash> >& scanner,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:115:9: error: expected primary-expression before ‘const’
const image_array& images,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:116:9: error: expected primary-expression before ‘int’
int bits,
^
/tmp/dlib/dlib/../dlib/image_processing/../image_processing/setup_hashed_features.h:117:9: error: expected primary-expression before ‘unsigned’
unsigned long num_samples = 200000
^
make[2]: *** [CMakeFiles/dlib_.dir/src/object_detection.cpp.o] Error 1
make[1]: *** [CMakeFiles/dlib_.dir/all] Error 2
make: *** [all] Error 2

  • K

my classifier doesn't detect any object in the training dataset

I changed the true boxes so to get rid of the error due to the variation in the aspect ratio of the truth box. the code is now training the classier. However, the trained classifier did not detect a single box in the whole training dataset consisting of around 100 images.

Any help will be appreciated

Thank you.

PS: those are few images from my training dataset
screen shot 2015-10-03 at 9 26 55 pm
screen shot 2015-10-03 at 9 28 20 pm
screen shot 2015-10-03 at 9 29 13 pm
screen shot 2015-10-03 at 9 29 23 pm
screen shot 2015-10-03 at 9 29 30 pm
screen shot 2015-10-03 at 9 29 44 pm
screen shot 2015-10-03 at 9 29 57 pm
screen shot 2015-10-03 at 9 30 12 pm

Is there examples to illustrate hash?

Hi, davisking
I'm really appreciate the lib dlib you develop. I have used it to detect object task. Recently, I want to the lib to build a fast index. Luckily, I find the lib contains hash module. However, there is not a example to illustrate how to use these functions such as LSH. Can you write a example to compact data to binary code, then compute the hamming distance between them?

Yours,

Yong Yuan

Using without an X server

Hi, I'd like to use dlib to batch process images on a server with X.
Is there a flag I can set to enable this?

The first error I get is from matplotlib/pyplot:

(naive-dlib-frontalization.py:28314): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
Traceback (most recent call last):
  File "./scripts/naive-dlib-frontalization.py", line 19, in <module>
    from skimage import io
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/__init__.py", line 15, in <module>
    reset_plugins()
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 89, in reset_plugins
    _load_preferred_plugins()
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 69, in _load_preferred_plugins
    _set_plugin(p_type, preferred_plugins['all'])
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 81, in _set_plugin
    use_plugin(plugin, kind=plugin_type)
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 251, in use_plugin
    _load(name)
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/manage_plugins.py", line 295, in _load
    fromlist=[modname])
  File "/usr/local/lib/python2.7/dist-packages/skimage/io/_plugins/matplotlib_plugin.py", line 4, in <module>
    import matplotlib.pyplot as plt
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 109, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_gtk3agg.py", line 11, in <module>
    from . import backend_gtk3
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_gtk3.py", line 55, in <module>
    cursors.MOVE          : Gdk.Cursor.new(Gdk.CursorType.FLEUR),
TypeError: constructor returned NULL

I can get around this error with the following imports before importing dlib:

import matplotlib as mpl
mpl.use('Agg')

Next, I get the following error, which I'm not yet sure how to resolve.

 1029 FATAL [1] dlib.gui_core: Unable to connect to the X display.
RuntimeError: Failed to initialize X11 resources

Can't run example code in Xcode using webcam_face_pose_ex.cpp?

The error like this:

Undefined symbols for architecture x86_64:
  "_USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives", referenced from:
      _dlib_check_consistent_assert_usage in main.o
  "dlib::base_window::invalidate_rectangle(dlib::rectangle const&)", referenced from:
      void dlib::image_display::set_image<dlib::cv_image<dlib::bgr_pixel> >(dlib::cv_image<dlib::bgr_pixel> const&) in main.o
  "dlib::base_window::set_size(int, int)", referenced from:
      void dlib::image_window::set_image<dlib::cv_image<dlib::bgr_pixel> >(dlib::cv_image<dlib::bgr_pixel> const&) in main.o
  "dlib::image_window::add_overlay(std::__1::vector<dlib::image_display::overlay_line, std::__1::allocator<dlib::image_display::overlay_line> > const&)", referenced from:
      _main in main.o
  "dlib::image_window::clear_overlay()", referenced from:
      _main in main.o
  "dlib::image_window::image_window()", referenced from:
      _main in main.o
  "dlib::image_window::~image_window()", referenced from:
      _main in main.o
  "dlib::popup_menu_region::disable()", referenced from:
      void dlib::image_display::set_image<dlib::cv_image<dlib::bgr_pixel> >(dlib::cv_image<dlib::bgr_pixel> const&) in main.o
  "dlib::scrollable_region::set_total_rect_size(unsigned long, unsigned long)", referenced from:
      void dlib::image_display::set_image<dlib::cv_image<dlib::bgr_pixel> >(dlib::cv_image<dlib::bgr_pixel> const&) in main.o
  "dlib::draw_sunken_rectangle(dlib::canvas const&, dlib::rectangle const&, unsigned char)", referenced from:
      dlib::scrollable_region_style_default::draw_scrollable_region_border(dlib::canvas const&, dlib::rectangle const&, bool) const in main.o
  "dlib::entropy_decoder_kernel_2::get_target(unsigned int)", referenced from:
      dlib::compress_stream_kernel_1<dlib::entropy_encoder_model_kernel_5<257ul, dlib::entropy_encoder_kernel_2, 200000ul, 4ul>, dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>, dlib::crc32>::decompress(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in main.o
      dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>::decode(unsigned long&) in main.o
  "dlib::entropy_decoder_kernel_2::set_stream(std::__1::basic_istream<char, std::__1::char_traits<char> >&)", referenced from:
      dlib::compress_stream_kernel_1<dlib::entropy_encoder_model_kernel_5<257ul, dlib::entropy_encoder_kernel_2, 200000ul, 4ul>, dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>, dlib::crc32>::decompress(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in main.o
  "dlib::entropy_decoder_kernel_2::decode(unsigned int, unsigned int)", referenced from:
      dlib::compress_stream_kernel_1<dlib::entropy_encoder_model_kernel_5<257ul, dlib::entropy_encoder_kernel_2, 200000ul, 4ul>, dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>, dlib::crc32>::decompress(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in main.o
      dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>::decode(unsigned long&) in main.o
  "dlib::entropy_decoder_kernel_2::entropy_decoder_kernel_2()", referenced from:
      dlib::compress_stream_kernel_1<dlib::entropy_encoder_model_kernel_5<257ul, dlib::entropy_encoder_kernel_2, 200000ul, 4ul>, dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>, dlib::crc32>::decompress(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in main.o
  "dlib::entropy_decoder_kernel_2::~entropy_decoder_kernel_2()", referenced from:
      dlib::compress_stream_kernel_1<dlib::entropy_encoder_model_kernel_5<257ul, dlib::entropy_encoder_kernel_2, 200000ul, 4ul>, dlib::entropy_decoder_model_kernel_5<257ul, dlib::entropy_decoder_kernel_2, 200000ul, 4ul>, dlib::crc32>::decompress(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in main.o
  "dlib::base64::base64()", referenced from:
      dlib::get_serialized_frontal_faces() in main.o
  "dlib::base64::~base64()", referenced from:
      dlib::get_serialized_frontal_faces() in main.o
  "dlib::base_window::is_closed() const", referenced from:
      _main in main.o
  "dlib::image_display::get_image_display_rect() const", referenced from:
      void dlib::image_window::set_image<dlib::cv_image<dlib::bgr_pixel> >(dlib::cv_image<dlib::bgr_pixel> const&) in main.o
  "dlib::base64::decode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const", referenced from:
      dlib::get_serialized_frontal_faces() in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

did I missing some *.dylib?I did not find dylib file about dlib.

Porting to armv7 on iOS

Hello,
Is there anyone try to port dlib to iOS? Or knowning any repository which already there?

Thank you!

Unable to build face detection example on OS X Yosemite

@davisking

Thanks for making dlib available on github. I am unable to build the example with the latest code as of Feb 03, 2015 because of the following error:

Linking CXX executable face_detection_ex
Undefined symbols for architecture x86_64:
"jpeg_CreateDecompress", referenced from:
dlib::jpeg_loader::read_image(char const
) in libdlib.a(jpeg_loader.o)
"jpeg_destroy_decompress", referenced from:
dlib::jpeg_loader::read_image(char const
) in libdlib.a(jpeg_loader.o)
"jpeg_finish_decompress", referenced from:
dlib::jpeg_loader::read_image(char const
) in libdlib.a(jpeg_loader.o)
"jpeg_read_header", referenced from:
dlib::jpeg_loader::read_image(char const
) in libdlib.a(jpeg_loader.o)
"jpeg_read_scanlines", referenced from:
dlib::jpeg_loader::read_image(char const
) in libdlib.a(jpeg_loader.o)
"jpeg_start_decompress", referenced from:
dlib::jpeg_loader::read_image(char const
) in libdlib.a(jpeg_loader.o)
"jpeg_std_error", referenced from:
dlib::jpeg_loader::read_image(char const
) in libdlib.a(jpeg_loader.o)
"jpeg_stdio_src", referenced from:
dlib::jpeg_loader::read_image(char const
) in libdlib.a(jpeg_loader.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [face_detection_ex] Error 1
make[1]: *** [CMakeFiles/face_detection_ex.dir/all] Error 2
make: *** [all] Error 2

I'm aware of a change that forced libjpeg to be built statically on Apple. But I still continue to see the above linker error. Can you please advise what else might be missing/wrong that is preventing me from building the examples?

Thanks,

-Vimal

Python dlib module has no image_window attribute?

Hi! Thanks for making a Python API for dlib -- I'm excited to try it out (once I get it working)!

I compiled the examples today and tried to run train_object_detector.py but it gave the following error:

File "train_object_detector.py", line 95, in <module>
    win_det = dlib.image_window()
AttributeError: 'module' object has no attribute 'image_window'

I get the same error from the Python interpreter:

$ python
Python 2.7.9 (default, Jan 18 2015, 00:53:20) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dlib
>>> window = dlib.image_window()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'image_window'
>>>

I'm on OS X 10.10.2. Any help you can offer would be greatly appreciated.

auto_ptr is deprecated in >= C++11

auto_ptr are deprecated in recent versions of C++ (c++11 and above).

dlib uses them in four files:

dlib/smart_pointers/shared_ptr_thread_safe.h
dlib/smart_pointers/shared_ptr_thread_safe_abstract.h
dlib/smart_pointers/shared_ptr_abstract.h
dlib/smart_pointers/shared_ptr.h

While not critical, it causes recent compilers to emit deprecation warnings every time one includes dlib in a project, which is annoying.

This is a more serious issue for users who want to compile their code with -Werror.

Remediation options include:

  • putting the offending code behind a guard (#if __cplusplus <= 199711L)
  • removing the offending code
  • removing completely dlib's custom smart pointers to use standard ones (std::shared_ptr and std::unique_ptr) -- this would raise the minimum compiler requirements to C++11.
  • selectively ignore these warnings by surrounding offending code with:
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
//...
#pragma GCC diagnostic pop

(note that this is more like a workaround, and besides, a GCC-only one)

68-points trained face model should be distributed along with dlib

Since a few months, dlib comes with a state-of-art face tracker, and provides an use example that is impressive.

This example requires a trained model, and suggests to download it from here: http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2. The model is however not part of dlib source, and no information regarding its license is provided.

Since this 68-features face tracker with this model is by itself extremely valuable, I would suggest to have it directly bundled with dlib (like OpenCV which provides trained haar classifiers for face detection).

If the size of the file is a concern, it could possibly belong to a different repo (dlib-models or dlib-data for instance).

In any case, it would be nice to know about the license of the model (at first sight, CC-BY would be a possible match to the apache 2 license used for dlib source).

When test it with for videos, six movies cannot be opened

Falcon:CLM-framework-master zhaotsuchikaqin$ ./bin/SimpleCLM -f "./videos/changeLighting.wmv" -f "./videos/0188_03_021_al_pacino.avi" -f "./videos/0217_03_006_alanis_morissette.avi" -f "./videos/0244_03_004_anderson_cooper.avi" -f "./videos/0294_02_004_angelina_jolie.avi" -f "./videos/0417_02_003_bill_clinton.avi" -f "./videos/0490_03_007_bill_gates.avi" -f "./videos/0686_02_003_gloria_estefan.avi" -f "./videos/1034_03_006_jet_li.avi" -f "./videos/1192_01_006_julia_roberts.avi" -f "./videos/1461_01_021_noam_chomsky.avi" -f "./videos/1804_03_006_sylvester_stallone.avi" -f "./videos/1815_01_008_tony_blair.avi" -f "./videos/1869_03_009_victoria_beckham.avi" -f "./videos/1878_01_002_vladimir_putin.avi"
Reading the CLM landmark detector/tracker from: ./bin/model/main_ccnf_general.txt
Reading the CLM module from: ./bin/model/clm_ccnf_general.txt
Reading the PDM module from: ./bin/model/pdms/In-the-wild_aligned_PDM_68.txt....Done
Reading the Triangulations module from: ./bin/model/tris_68.txt....Done
Reading the intensity CCNF patch experts from: ./bin/model/patch_experts/ccnf_patches_0.25_general.txt....Done
Reading the intensity CCNF patch experts from: ./bin/model/patch_experts/ccnf_patches_0.35_general.txt....Done
Reading the intensity CCNF patch experts from: ./bin/model/patch_experts/ccnf_patches_0.5_general.txt....Done
Reading part based module....inner
Reading the CLM landmark detector/tracker from: ./bin/model/model_inner/main_ccnf_inner.txt
Reading the CLM module from: ./bin/model/model_inner/clm_ccnf_inner.txt
Reading the PDM module from: ./bin/model/model_inner/pdms/pdm_51_inner.txt....Done
Reading the intensity CCNF patch experts from: ./bin/model/model_inner/patch_experts/ccnf_patches_1.00_inner.txt....Done
Done
Reading part based module....left_eye_28
Reading the CLM landmark detector/tracker from: ./bin/model/model_eye/main_ccnf_synth_left.txt
Reading the CLM module from: ./bin/model/model_eye/clm_ccnf_left_synth.txt
Reading the PDM module from: ./bin/model/model_eye/pdms/pdm_28_l_eye_3D_closed.txt....Done
Reading the intensity CCNF patch experts from: ./bin/model/model_eye/patch_experts/left_ccnf_patches_1.00_synth_lid_.txt....Done
Reading the intensity CCNF patch experts from: ./bin/model/model_eye/patch_experts/left_ccnf_patches_1.50_synth_lid_.txt....Done
Done
Reading part based module....right_eye_28
Reading the CLM landmark detector/tracker from: ./bin/model/model_eye/main_ccnf_synth_right.txt
Reading the CLM module from: ./bin/model/model_eye/clm_ccnf_right_synth.txt
Reading the PDM module from: ./bin/model/model_eye/pdms/pdm_28_eye_3D_closed.txt....Done
Reading the intensity CCNF patch experts from: ./bin/model/model_eye/patch_experts/ccnf_patches_1.00_synth_lid_.txt....Done
Reading the intensity CCNF patch experts from: ./bin/model/model_eye/patch_experts/ccnf_patches_1.50_synth_lid_.txt....Done
Done
Reading the landmark validation module....Done
Attempting to read from file: ./videos/changeLighting.wmv
WARNING: Couldn't read movie file ./videos/changeLighting.wmv
Fatal error: Failed to open video source
Abort trap: 6

and when testing it for multiple faces,there is nothing happening actually..

i was using mac os.

error compiling imglab tool

When I try to compile the imglab tool provided with dlib following the instructions, I got this error:

[ 89%] Building CXX object CMakeFiles/imglab.dir/src/main.cpp.o
In file included from /home/zhuoc/Packages/Dlib/dlib/dlib/../dlib/data_io/../algs.h:75:0,
from /home/zhuoc/Packages/Dlib/dlib/dlib/../dlib/data_io/libsvm_io.h:11,
from /home/zhuoc/Packages/Dlib/dlib/dlib/../dlib/data_io.h:6,
from /home/zhuoc/Packages/Dlib/dlib/tools/imglab/src/main.cpp:2:
/home/zhuoc/Packages/Dlib/dlib/dlib/../dlib/data_io/../image_saver/save_png.h: In instantiation of ‘typename dlib::disable_ifdlib::is_matrix<image_type >::type dlib::save_png(const image_type&, const string&) [with image_type = dlib::array2ddlib::rgb_pixel; typename dlib::disable_ifdlib::is_matrix<image_type >::type = void; std::string = std::basic_string]’:
/home/zhuoc/Packages/Dlib/dlib/tools/imglab/src/main.cpp:301:32: required from here
/home/zhuoc/Packages/Dlib/dlib/dlib/../dlib/data_io/../assert.h:76:53: error: incomplete type ‘dlib::compile_time_assert’ used in nested name specifier
DLIB_NO_WARN_UNUSED typedef char BOOST_JOIN(DLIB_CTA, LINE)[::dlib::compile_time_assert<(bool)(expression)>::value]

I'm working on Ubuntu14.04. I have built all examples with no problem. Did I do anything wrong with this?

AttributeError: 'module' object has no attribute 'image_window'

Hi,
I tried to run face_detector in python_examples, but I get the following error:

Traceback (most recent call last):
  File "face_detector.py", line 44, in <module>
    win = dlib.image_window()
AttributeError: 'module' object has no attribute 'image_window'

I tried deleting the build folder and running again ./compile_dlib_python_module.bat but I still get the same error message.
Any help would be appreciated.

Get a lot of error while compiling Dlib

Hi,I want to build examples on mac using comment line "cmake --build ."but I got an error like this:

In file included from /Users/xxh/dlib/dlib/gui_widgets/fonts.cpp:14:
/Users/xxh/dlib/dlib/gui_widgets/nativefont.h:313:21: error: use of undeclared identifier
      'XAllocColor'
                    XAllocColor(d, cmap, &xcol);
                    ^
/Users/xxh/dlib/dlib/gui_widgets/nativefont.h:319:36: error: use of undeclared identifier
      'XmbTextExtents'; did you mean 'XTextExtents'?
                            return XmbTextExtents(fs, str, len, ink, logical);
                                   ^~~~~~~~~~~~~~
                                   XTextExtents
/Users/xxh/dlib/dlib/gui_widgets/nativefont.h:318:43: note: 'XTextExtents' declared here
                        inline static int XTextExtents (XFontSet fs, char *str, int len...
                                          ^
/Users/xxh/dlib/dlib/gui_widgets/nativefont.h:322:36: error: use of undeclared identifier
      'XwcTextExtents'; did you mean 'XTextExtents'?
                            return XwcTextExtents(fs, str, len, ink, logical);
                                   ^~~~~~~~~~~~~~
                                   XTextExtents

what's that mean?

Boost 1_57 not working with version 18.14 of dlib

Hey, when trying to build the dlib python module I receive errors, because boost can not be found, I believe this is because the boost folder structure has changed

https://github.com/davisking/dlib/blob/master/dlib/add_python_module#L119-L127

I had to build the shared libraries as well, this is very bad documented
also I had to rename the lib and dll files because they are not recognized

I was building for python3.4 on windows8.1 64 bit

I now built the python bindings with boost 1_55 successfully but had to copy and rename the boost libs anyway to the build folder during compilation and before linking

Comparable/hashable (d)rectangles in Python

As of now, dlib.drectangle and dlib.rectangle instances are not comparable (nor hash-stable):

>>> import dlib
>>> x1 = dlib.drectangle(0, 1, 2, 3)
>>> x2 = dlib.drectangle(0, 1, 2, 3)
>>> assert x1 == x2, 'Rectangles differ'
AssertionError: Rectangle differ
>>> assert hash(x1) == hash(x2), 'Hashes differ'
AssertionError: Hashes differ

Therefore, they cannot be used as dictionary keys for instance, nor in a set.
Solving this issue can be solved by implementing __hash__ and __eq__ methods in Python API.

I am willing to help but am not familiar with interfacing C and Python API so I don't really know where to start...

object detectors saved with C++ API can not be loaded by Python API

If I train a detector using the C tool

$ /train_object_detector -tv ....

that generates a file object_detector.svm. However if I load that file with the python API it doesn't work.

dlib.simple_object_detector("object_detector.svm")

gives RuntimeError: Error deserializing object of type int

Interestingly however, the following does work

print dlib.test_simple_object_detector(training_xml_path, "object_detector.svm")

and works perfectly, giving the same precision and recall as the trained C api.

HOG detector

Hi Davisking,
Excuse me, do yo have a model which can detect person using HOG detector?

I would like to do a demo for my dlib-android application.

Currently, I use opencv HOG person detector instead of dlib.

Could you share the model if you have?

https://github.com/tzutalin/dlib-android-app

Use in Android

I want use lib in Android, but when I use the libdlib.so or libdlib.a, it will error in encoder, but use dlib in iOS it no error. can you try dlib in Android

How to change the d or dets (rectangle) in python for getting landmarks without face detector?

Hi, Davisking,

Now I use dlib with python wrapper to get facial landmarks.

But I have a problem that if the detector don't find the face, we can't get the landmark points.

dets = detector(img, 1)
for k, d in enumerate(dets):
shape = predictor(img, d)

But in fact, I know the rectangle of face in image.

So I want to ask you how I can change the d or dets in python for getting landmarks without face detector?

Thank you so much.

regression target of shape predictor trainer

I am confused about the regression target when training a shape predictor model. In your code, the target is the difference of ground truth and current shape. According to this paper, Face Alignment by Explicit Shape Regression, however, the real target is product of difference and similarity transformation matrix, which has been computed when extracting pixel values. Have you ever considered that? It may influence the performance.

find_candidate_object_proposal of python and c++ output different

I try to use the find_candidate_object_proposal, but I found it seems output different number of proposals of find_candidate_object_proposal.py and find_candidate_object_proposal function. python's version output 996 proposals, but the other one output 18776 proposals. Please help me!

extract features about object detect

I use alex-net(deeplearning) to extract features of images, can I use your object detect framework?can you give me some advise?my feature is full connect layer data

Reference to mutex is ambiguous

I get the following error while building the examples provided in the project:

[ 75%] Building CXX object CMakeFiles/parallel_for_ex.dir/parallel_for_ex.cpp.o
/Users/anmoluppal/Downloads/dlib-18.10/examples/parallel_for_ex.cpp:197:5: error:
reference to 'mutex' is ambiguous
mutex m;
^
/Users/anmoluppal/Downloads/dlib-18.10/dlib/../dlib/threads/threads_kernel_2.h:38:11: note:
candidate found by name lookup is 'dlib::mutex'
class mutex
^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:27:24: note:
candidate found by name lookup is 'std::__1::mutex'
class _LIBCPP_TYPE_VIS mutex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.